JBoss Tools SVN: r39519 - trunk/jst/plugins/org.jboss.tools.jst.jsp.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-14 19:33:48 -0400 (Wed, 14 Mar 2012)
New Revision: 39519
Modified:
trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
Log:
JBIDE-11303
https://issues.jboss.org/browse/JBIDE-11303
Content assist in event attributes is fixed.
Modified: trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2012-03-14 21:20:34 UTC (rev 39518)
+++ trunk/jst/plugins/org.jboss.tools.jst.jsp/plugin.xml 2012-03-14 23:33:48 UTC (rev 39519)
@@ -918,30 +918,35 @@
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
<partitionType id="org.eclipse.wst.css.STYLE" />
+ <partitionType id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER"/>
</contentType>
<contentType id="org.jboss.tools.jst.jsp.phpsource">
<partitionType id="org.eclipse.wst.html.HTML_DEFAULT" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
<partitionType id="org.eclipse.wst.css.STYLE" />
+ <partitionType id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER"/>
</contentType>
<contentType id="org.eclipse.php.core.phpsource">
<partitionType id="org.eclipse.wst.html.HTML_DEFAULT" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
<partitionType id="org.eclipse.wst.css.STYLE" />
+ <partitionType id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER"/>
</contentType>
<contentType id="jsf.facelet">
<partitionType id="org.eclipse.wst.html.HTML_DEFAULT" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
<partitionType id="org.eclipse.wst.css.STYLE" />
+ <partitionType id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER"/>
</contentType>
<contentType id="jsf.facelet.composite">
<partitionType id="org.eclipse.wst.html.HTML_DEFAULT" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL" />
<partitionType id="org.eclipse.jst.jsp.SCRIPT.JSP_EL2" />
<partitionType id="org.eclipse.wst.css.STYLE" />
+ <partitionType id="org.eclipse.wst.html.SCRIPT.EVENTHANDLER"/>
</contentType>
</proposalComputer>
12 years, 8 months
JBoss Tools SVN: r39518 - workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-03-14 17:20:34 -0400 (Wed, 14 Mar 2012)
New Revision: 39518
Modified:
workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/Activator.java
workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/CDIAllTests.java
Log:
copyright text added
Modified: workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/Activator.java
===================================================================
--- workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/Activator.java 2012-03-14 21:16:49 UTC (rev 39517)
+++ workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/Activator.java 2012-03-14 21:20:34 UTC (rev 39518)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.cdi.test.launcher;
import org.osgi.framework.BundleActivator;
Modified: workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/CDIAllTests.java
===================================================================
--- workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/CDIAllTests.java 2012-03-14 21:16:49 UTC (rev 39517)
+++ workspace/dgolovin/org.jboss.tools.cdi.test.launcher/src/org/jboss/tools/cdi/test/launcher/CDIAllTests.java 2012-03-14 21:20:34 UTC (rev 39518)
@@ -1,3 +1,13 @@
+/*******************************************************************************
+ * Copyright (c) 2012 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
package org.jboss.tools.cdi.test.launcher;
import org.jboss.tools.cdi.core.test.CDICoreAllTests;
@@ -17,9 +27,9 @@
public static Test suite() {
TestSuite suiteAll = new TestSuite("CDI Core Tests");
+ suiteAll.addTest(CdiSeamConfigUIAllTests.suite());
suiteAll.addTest(CDICoreAllTests.suite());
suiteAll.addTest(CDISeamConfigCoreAllTests.suite());
- suiteAll.addTest(CdiSeamConfigUIAllTests.suite());
suiteAll.addTest(CDISeamCoreAllTests.suite());
suiteAll.addTest(CDISeamSolderCoreAllTests.suite());
suiteAll.addTest(CdiSeamTextExtAllTests.suite());
12 years, 8 months
JBoss Tools SVN: r39517 - workspace/dgolovin/org.jboss.tools.cdi.test.launcher.
by jbosstools-commits@lists.jboss.org
Author: dgolovin
Date: 2012-03-14 17:16:49 -0400 (Wed, 14 Mar 2012)
New Revision: 39517
Modified:
workspace/dgolovin/org.jboss.tools.cdi.test.launcher/pom.xml
Log:
artifact id fixed to match plugin id
Modified: workspace/dgolovin/org.jboss.tools.cdi.test.launcher/pom.xml
===================================================================
--- workspace/dgolovin/org.jboss.tools.cdi.test.launcher/pom.xml 2012-03-14 21:11:58 UTC (rev 39516)
+++ workspace/dgolovin/org.jboss.tools.cdi.test.launcher/pom.xml 2012-03-14 21:16:49 UTC (rev 39517)
@@ -7,7 +7,7 @@
<version>1.2.0-SNAPSHOT</version>
</parent>
<groupId>org.jboss.tools.cdi.tests</groupId>
- <artifactId>org.jboss.tools.cdi.testlauncher</artifactId>
+ <artifactId>org.jboss.tools.cdi.test.launcher</artifactId>
<packaging>eclipse-test-plugin</packaging>
<properties>
@@ -21,13 +21,6 @@
<artifactId>tycho-surefire-plugin</artifactId>
<configuration>
<product>org.jboss.tools.tests.product</product>
- <explodedBundles>
- <bundle>org.jboss.tools.cdi.core.test</bundle>
- <bundle>org.jboss.tools.cdi.seam.config.core.test</bundle>
- <bundle>org.jboss.tools.cdi.seam.core.test</bundle>
- <bundle>org.jboss.tools.cdi.seam.faces.core.test</bundle>
- <bundle>org.jboss.tools.cdi.seam.solder.core.test</bundle>
- </explodedBundles>
</configuration>
</plugin>
</plugins>
12 years, 8 months
JBoss Tools SVN: r39516 - in trunk/modeshape: plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd and 5 other directories.
by jbosstools-commits@lists.jboss.org
Author: elvisisking
Date: 2012-03-14 17:11:58 -0400 (Wed, 14 Mar 2012)
New Revision: 39516
Added:
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedName.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedNameTest.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/testdata/jsr_283_builtins.cnd
Modified:
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/MultiValidationStatus.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Utils.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/ValidationStatus.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinition.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndImporter.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndNotationPreferences.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CompactNodeTypeDefinition.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/LocalName.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NamespaceMapping.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinition.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinition.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/AttributeState.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultType.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultValues.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ListAttributeState.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeAttributes.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeTypeAttributes.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyAttributes.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyType.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypes.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ValueConstraints.java
trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinitionTest.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/Constants.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinitionTest.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinitionTest.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypesTest.java
trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/test/AllTests.java
Log:
JBIDE-10702 Editor for JCR Compact Node Definition (CND) files. Added QualifiedName to business objects. Some code reorganizing.
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Messages.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -141,6 +141,11 @@
public static String emptySuperTypes;
/**
+ * A message indicating the unqualified name part of a qualified name is empty. One parameter, the name or type of qualified
+ * name, is required.
+ */
+ public static String emptyUnqualifiedName;
+ /**
* A message indicating a missing value was found. One parameter, a string identifying what the value is, is required.
*/
public static String emptyValue;
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/MultiValidationStatus.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/MultiValidationStatus.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/MultiValidationStatus.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -15,6 +15,11 @@
*/
public class MultiValidationStatus extends ValidationStatus {
+ /**
+ * An OK multi-validation status with a standard, localized message.
+ */
+ public static MultiValidationStatus OK_STATUS = new MultiValidationStatus();
+
private final List<ValidationStatus> errors = new ArrayList<ValidationStatus>();
private ValidationStatus primary = null;
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Utils.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Utils.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/Utils.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -19,6 +19,11 @@
public final class Utils {
/**
+ * And empty object array.
+ */
+ public static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
+
+ /**
* An empty string constant.
*/
public static final String EMPTY_STRING = ""; //$NON-NLS-1$
@@ -29,11 +34,16 @@
public static final String[] EMPTY_STRING_ARRAY = new String[0];
/**
+ * A string with one space character.
+ */
+ public static final String SPACE_STRING = " "; //$NON-NLS-1$
+
+ /**
* @param builder the builder where the text will be appended (cannot be <code>null</code>)
* @param addDelimiter the flag indicating if a delimiter should be added
* @param delimiter the delimiter string added before the text if there is text (can be <code>null</code> or empty)
* @param text the text being appended (can be <code>null</code> or empty
- * @return <code>true</code> if text was appened
+ * @return <code>true</code> if text was appended
*/
public static boolean build( final StringBuilder builder,
final boolean addDelimiter,
@@ -142,27 +152,11 @@
}
/**
- * @param object the object being checked (can be <code>null</code>)
- * @param name the name of the object to use in the error message (cannot be <code>null</code>)
- * @throws IllegalArgumentException if the object is <code>null</code>
- */
- public static void isNotNull( final Object object,
- String name ) {
- if ((name == null) || name.isEmpty()) {
- name = Utils.EMPTY_STRING;
- }
-
- if (object == null) {
- throw new IllegalArgumentException(NLS.bind(Messages.objectIsNull, name));
- }
- }
-
- /**
* @param items the items being upper-cased (cannot be <code>null</code>)
* @return a new collection of upper-cased items
*/
public static String[] toUpperCase( final String[] items ) {
- Utils.isNotNull(items, "items"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(items, "items"); //$NON-NLS-1$
final String result[] = new String[items.length];
int i = 0;
@@ -181,16 +175,32 @@
*/
public static void verifyIsNotEmpty( final String text,
String name ) {
- if ((name == null) || name.isEmpty()) {
- name = Utils.EMPTY_STRING;
- }
+ if (isEmpty(text)) {
+ if ((name == null) || name.isEmpty()) {
+ name = Utils.EMPTY_STRING;
+ }
- if (isEmpty(text)) {
throw new IllegalArgumentException(NLS.bind(Messages.stringIsEmpty, name));
}
}
/**
+ * @param object the object being checked (can be <code>null</code>)
+ * @param name the name of the object to use in the error message (cannot be <code>null</code>)
+ * @throws IllegalArgumentException if the object is <code>null</code>
+ */
+ public static void verifyIsNotNull( final Object object,
+ String name ) {
+ if (object == null) {
+ if ((name == null) || name.isEmpty()) {
+ name = Utils.EMPTY_STRING;
+ }
+
+ throw new IllegalArgumentException(NLS.bind(Messages.objectIsNull, name));
+ }
+ }
+
+ /**
* Don't allow construction.
*/
private Utils() {
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/ValidationStatus.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/ValidationStatus.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/ValidationStatus.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -21,7 +21,7 @@
* @param message the validation message (cannot be <code>null</code> or empty)
* @return the error validation message (never <code>null</code>)
*/
- public static ValidationStatus createErrorMessage( String message ) {
+ public static ValidationStatus createErrorMessage( final String message ) {
return new ValidationStatus(Severity.ERROR, message);
}
@@ -29,7 +29,7 @@
* @param message the validation message (cannot be <code>null</code> or empty)
* @return the information validation message (never <code>null</code>)
*/
- public static ValidationStatus createInfoMessage( String message ) {
+ public static ValidationStatus createInfoMessage( final String message ) {
return new ValidationStatus(Severity.INFO, message);
}
@@ -37,7 +37,7 @@
* @param message the validation message (cannot be <code>null</code> or empty)
* @return the OK validation message (never <code>null</code>)
*/
- public static ValidationStatus createOkMessage( String message ) {
+ public static ValidationStatus createOkMessage( final String message ) {
return new ValidationStatus(Severity.OK, message);
}
@@ -45,7 +45,7 @@
* @param message the validation message (cannot be <code>null</code> or empty)
* @return the warning validation message (never <code>null</code>)
*/
- public static ValidationStatus createWarningMessage( String message ) {
+ public static ValidationStatus createWarningMessage( final String message ) {
return new ValidationStatus(Severity.WARNING, message);
}
@@ -63,8 +63,8 @@
* @param severity the status severity (cannot be <code>null</code>)
* @param message the status localized user message (cannot be <code>null</code>)
*/
- protected ValidationStatus( Severity severity,
- String message ) {
+ protected ValidationStatus( final Severity severity,
+ final String message ) {
assert (severity != null) : "severity is null"; //$NON-NLS-1$
Utils.verifyIsNotEmpty(message, "message"); //$NON-NLS-1$
@@ -78,7 +78,7 @@
* @see java.lang.Comparable#compareTo(java.lang.Object)
*/
@Override
- public int compareTo( ValidationStatus that ) {
+ public int compareTo( final ValidationStatus that ) {
if ((this == that) || (this.severity == that.severity)) {
return getMessage().compareTo(that.getMessage());
}
@@ -202,8 +202,8 @@
* @param that the validation being compared (cannot be <code>null</code>)
* @return <code>true</code> if this status more severe
*/
- public boolean isMoreSevere( Severity that ) {
- Utils.isNotNull(that, "that"); //$NON-NLS-1$
+ public boolean isMoreSevere( final Severity that ) {
+ Utils.verifyIsNotNull(that, "that"); //$NON-NLS-1$
if ((this == that) || (this == WARNING)) {
return false;
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinition.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinition.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinition.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -9,8 +9,6 @@
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
-import java.util.ArrayList;
-import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
import javax.jcr.nodetype.NodeDefinitionTemplate;
@@ -29,54 +27,9 @@
/**
*
*/
-public class ChildNodeDefinition implements CndElement, NodeDefinitionTemplate {
+public class ChildNodeDefinition implements CndElement, Comparable, NodeDefinitionTemplate {
/**
- * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
- */
- public enum PropertyName {
- /**
- * The autocreated indicator.
- */
- AUTOCREATED,
-
- /**
- * The default type.
- */
- DEFAULT_TYPE,
-
- /**
- * The mandatory indicator.
- */
- MANDATORY,
-
- /**
- * The property name.
- */
- NAME,
-
- /**
- * The on parent version value.
- */
- ON_PARENT_VERSION,
-
- /**
- * The protected indicator.
- */
- PROTECTED,
-
- /**
- * The collection of required types.
- */
- REQUIRED_TYPES,
-
- /**
- * The supports same name siblings indicator.
- */
- SAME_NAME_SIBLINGS,
- }
-
- /**
* The prefix used in CND notation before the property definition.
*/
public static final String NOTATION_PREFIX = "+"; //$NON-NLS-1$
@@ -84,12 +37,12 @@
/**
* The node attributes (never <code>null</code>).
*/
- private NodeAttributes attributes;
+ private final NodeAttributes attributes;
/**
* The node default type (never <code>null</code>).
*/
- private DefaultType defaultType;
+ private final DefaultType defaultType;
/**
* The registered property change listeners (never <code>null</code>).
@@ -99,19 +52,19 @@
/**
* The node identifier (can be <code>null</code> or empty).
*/
- private final LocalName name;
+ private final QualifiedName name;
/**
* The node required types (never <code>null</code>).
*/
- private RequiredTypes requiredTypes;
+ private final RequiredTypes requiredTypes;
/**
* Constructs an instance set to all defaults.
*/
public ChildNodeDefinition() {
this.attributes = new NodeAttributes();
- this.name = new LocalName();
+ this.name = new QualifiedName();
this.defaultType = new DefaultType();
this.requiredTypes = new RequiredTypes();
this.listeners = new CopyOnWriteArrayList<PropertyChangeListener>();
@@ -121,8 +74,8 @@
* @param newListener the listener being added (cannot be <code>null</code>)
* @return <code>true</code> if successfully added
*/
- public boolean addListener( PropertyChangeListener newListener ) {
- Utils.isNotNull(newListener, "newListener"); //$NON-NLS-1$
+ public boolean addListener( final PropertyChangeListener newListener ) {
+ Utils.verifyIsNotNull(newListener, "newListener"); //$NON-NLS-1$
return this.listeners.addIfAbsent(newListener);
}
@@ -133,8 +86,8 @@
* @param requiredTypeBeingAdded the required type being added (cannot be <code>null</code>)
* @return <code>true</code> if added
*/
- public boolean addRequiredType( String requiredTypeBeingAdded ) {
- if (this.requiredTypes.add(requiredTypeBeingAdded)) {
+ public boolean addRequiredType( final String requiredTypeBeingAdded ) {
+ if (this.requiredTypes.add(QualifiedName.parse(requiredTypeBeingAdded))) {
notifyChangeListeners(PropertyName.REQUIRED_TYPES, null, requiredTypeBeingAdded);
return true; // added
}
@@ -161,10 +114,10 @@
* @param newState the new attribute state (cannot be <code>null</code>)
* @return <code>true</code> if the attribute state was changed
*/
- public boolean changeState( PropertyName propertyName,
- Value newState ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
- Utils.isNotNull(newState, "newState"); //$NON-NLS-1$
+ public boolean changeState( final PropertyName propertyName,
+ final Value newState ) {
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newState, "newState"); //$NON-NLS-1$
Object oldValue = null;
Object newValue = newState;
@@ -211,7 +164,7 @@
* @return <code>true</code> if at least one required type was removed
*/
public boolean clearRequiredTypes() {
- List<String> oldValue = new ArrayList<String>(requiredTypes.getSupportedItems());
+ final String[] oldValue = this.requiredTypes.toArray();
if (this.requiredTypes.clear()) {
notifyChangeListeners(PropertyName.REQUIRED_TYPES, oldValue, null);
@@ -224,23 +177,66 @@
/**
* {@inheritDoc}
*
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo( final Object object ) {
+ final ChildNodeDefinition that = (ChildNodeDefinition)object;
+ final String thisName = getName();
+ final String thatName = that.getName();
+
+ if (Utils.isEmpty(thisName)) {
+ if (Utils.isEmpty(thatName)) {
+ return 0;
+ }
+
+ // thatName is not empty
+ return 1;
+ }
+
+ // thisName is not empty
+ if (thatName == null) {
+ return 1;
+ }
+
+ // thisName and thatName are not empty
+ return thisName.compareTo(thatName);
+ }
+
+ /**
+ * @param notationType the notation type being requested (cannot be <code>null</code>)
+ * @return the CND notation (never <code>null</code>)
+ */
+ public String getAttributesCndNotation( final NotationType notationType ) {
+ final String cndNotation = this.attributes.toCndNotation(notationType);
+
+ if (cndNotation == null) {
+ return Utils.EMPTY_STRING;
+ }
+
+ return cndNotation;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see javax.jcr.nodetype.ItemDefinition#getDeclaringNodeType()
+ * @throws UnsupportedOperationException if method is called
*/
@Override
public NodeType getDeclaringNodeType() {
- // TODO implement
- return null;
+ throw new UnsupportedOperationException();
}
/**
* {@inheritDoc}
*
* @see javax.jcr.nodetype.NodeDefinition#getDefaultPrimaryType()
+ * @throws UnsupportedOperationException if method is called
*/
@Override
public NodeType getDefaultPrimaryType() {
- // TODO implement
- return null;
+ throw new UnsupportedOperationException();
}
/**
@@ -250,7 +246,7 @@
*/
@Override
public String getDefaultPrimaryTypeName() {
- String primaryType = this.defaultType.getDefaultType();
+ final String primaryType = this.defaultType.getDefaultType();
// per API should return null if empty
if (Utils.isEmpty(primaryType)) {
@@ -296,6 +292,10 @@
return this.attributes.getOnParentVersion().asJcrValue();
}
+ private String getPrefixEndDelimiter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.CHILD_NODE_DEFINITION_END_PREFIX_DELIMITER);
+ }
+
/**
* {@inheritDoc}
*
@@ -310,14 +310,28 @@
* {@inheritDoc}
*
* @see javax.jcr.nodetype.NodeDefinition#getRequiredPrimaryTypes()
+ * @throws UnsupportedOperationException if method is called
*/
@Override
public NodeType[] getRequiredPrimaryTypes() {
- // TODO implement
- return null;
+ throw new UnsupportedOperationException();
}
/**
+ * @param notationType the notation type being requested (cannot be <code>null</code>)
+ * @return the CND notation (never <code>null</code>)
+ */
+ public String getRequiredTypesCndNotation( final NotationType notationType ) {
+ final String cndNotation = this.requiredTypes.toCndNotation(notationType);
+
+ if (cndNotation == null) {
+ return Utils.EMPTY_STRING;
+ }
+
+ return cndNotation;
+ }
+
+ /**
* Can be used to find the attribute state of the autocreated, default type, mandatory, protected, required types, same name
* siblings, and on parent version properties.
*
@@ -325,8 +339,8 @@
* @return the attribute state (never <code>null</code>)
* @throws IllegalArgumentException if a property that does not have an attribute state is specified
*/
- public Value getState( PropertyName propertyName ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ public Value getState( final PropertyName propertyName ) {
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
if (PropertyName.AUTOCREATED == propertyName) {
return this.attributes.getAutocreated().get();
@@ -397,8 +411,8 @@
* @param propertyName the property being checked (cannot be <code>null</code>)
* @return <code>true</code> if property is a variant
*/
- public boolean isVariant( PropertyName propertyName ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ public boolean isVariant( final PropertyName propertyName ) {
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
if (PropertyName.ON_PARENT_VERSION == propertyName) {
return (this.attributes.getOnParentVersion() == OnParentVersion.VARIANT);
@@ -415,12 +429,12 @@
private void notifyChangeListeners( final PropertyName property,
final Object oldValue,
final Object newValue ) {
- PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
+ final PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
for (final Object listener : this.listeners.toArray()) {
try {
((PropertyChangeListener)listener).propertyChange(event);
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO log this
this.listeners.remove(listener);
}
@@ -431,8 +445,8 @@
* @param listener the listener who no longer will receive property change events (cannot be <code>null</code>)
* @return <code>true</code> if successfully removed
*/
- public boolean removeListener( PropertyChangeListener listener ) {
- Utils.isNotNull(listener, "listener"); //$NON-NLS-1$
+ public boolean removeListener( final PropertyChangeListener listener ) {
+ Utils.verifyIsNotNull(listener, "listener"); //$NON-NLS-1$
return this.listeners.remove(listener);
}
@@ -443,8 +457,10 @@
* @param requiredTypeBeingRemoved the required type being removed (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeRequiredType( String requiredTypeBeingRemoved ) {
- if (this.requiredTypes.remove(requiredTypeBeingRemoved)) {
+ public boolean removeRequiredType( final String requiredTypeBeingRemoved ) {
+ final QualifiedName qname = QualifiedName.parse(requiredTypeBeingRemoved);
+
+ if (this.requiredTypes.remove(qname)) {
notifyChangeListeners(PropertyName.REQUIRED_TYPES, requiredTypeBeingRemoved, null);
return true; // removed
}
@@ -458,8 +474,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setAutoCreated(boolean)
*/
@Override
- public void setAutoCreated( boolean newAutocreated ) {
- Value newState = (newAutocreated ? Value.IS : Value.IS_NOT);
+ public void setAutoCreated( final boolean newAutocreated ) {
+ final Value newState = (newAutocreated ? Value.IS : Value.IS_NOT);
changeState(PropertyName.AUTOCREATED, newState);
}
@@ -469,8 +485,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setDefaultPrimaryTypeName(java.lang.String)
*/
@Override
- public void setDefaultPrimaryTypeName( String newTypeName ) {
- String oldValue = this.defaultType.getDefaultType();
+ public void setDefaultPrimaryTypeName( final String newTypeName ) {
+ final String oldValue = this.defaultType.getDefaultType();
if (this.defaultType.setDefaultType(newTypeName)) {
notifyChangeListeners(PropertyName.DEFAULT_TYPE, oldValue, newTypeName);
@@ -483,8 +499,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setMandatory(boolean)
*/
@Override
- public void setMandatory( boolean newMandatory ) {
- Value newState = (newMandatory ? Value.IS : Value.IS_NOT);
+ public void setMandatory( final boolean newMandatory ) {
+ final Value newState = (newMandatory ? Value.IS : Value.IS_NOT);
changeState(PropertyName.MANDATORY, newState);
}
@@ -494,8 +510,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setName(java.lang.String)
*/
@Override
- public void setName( String newName ) {
- Object oldValue = this.name.get();
+ public void setName( final String newName ) {
+ final Object oldValue = getName();
if (this.name.set(newName)) {
notifyChangeListeners(PropertyName.NAME, oldValue, newName);
@@ -508,8 +524,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setOnParentVersion(int)
*/
@Override
- public void setOnParentVersion( int newOpv ) {
- OnParentVersion oldValue = this.attributes.getOnParentVersion();
+ public void setOnParentVersion( final int newOpv ) {
+ final OnParentVersion oldValue = this.attributes.getOnParentVersion();
if (this.attributes.setOnParentVersion(OnParentVersion.findUsingJcrValue(newOpv))) {
notifyChangeListeners(PropertyName.ON_PARENT_VERSION, oldValue, newOpv);
@@ -522,8 +538,8 @@
* @param newOpv the new OPV value (cannot be <code>null</code>)
* @return <code>true</code> if successfully changed
*/
- public boolean setOnParentVersion( String newOpv ) {
- OnParentVersion oldValue = this.attributes.getOnParentVersion();
+ public boolean setOnParentVersion( final String newOpv ) {
+ final OnParentVersion oldValue = this.attributes.getOnParentVersion();
if (this.attributes.setOnParentVersion(OnParentVersion.find(newOpv))) {
notifyChangeListeners(PropertyName.ON_PARENT_VERSION, oldValue, newOpv);
@@ -539,8 +555,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setProtected(boolean)
*/
@Override
- public void setProtected( boolean newProtected ) {
- Value newState = (newProtected ? Value.IS : Value.IS_NOT);
+ public void setProtected( final boolean newProtected ) {
+ final Value newState = (newProtected ? Value.IS : Value.IS_NOT);
changeState(PropertyName.PROTECTED, newState);
}
@@ -550,13 +566,13 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setRequiredPrimaryTypeNames(java.lang.String[])
*/
@Override
- public void setRequiredPrimaryTypeNames( String[] newTypeNames ) {
- List<String> items = this.requiredTypes.getSupportedItems();
+ public void setRequiredPrimaryTypeNames( final String[] newTypeNames ) {
+ final String[] items = this.requiredTypes.toArray();
boolean changed = this.requiredTypes.clear();
if (!Utils.isEmpty(newTypeNames)) {
- for (String typeName : newTypeNames) {
- if (this.requiredTypes.add(typeName)) {
+ for (final String typeName : newTypeNames) {
+ if (this.requiredTypes.add(QualifiedName.parse(typeName))) {
changed = true;
}
}
@@ -573,8 +589,8 @@
* @see javax.jcr.nodetype.NodeDefinitionTemplate#setSameNameSiblings(boolean)
*/
@Override
- public void setSameNameSiblings( boolean newAllowSameNameSiblings ) {
- Value newState = (newAllowSameNameSiblings ? Value.IS : Value.IS_NOT);
+ public void setSameNameSiblings( final boolean newAllowSameNameSiblings ) {
+ final Value newState = (newAllowSameNameSiblings ? Value.IS : Value.IS_NOT);
changeState(PropertyName.SAME_NAME_SIBLINGS, newState);
}
@@ -584,16 +600,63 @@
* @see org.jboss.tools.modeshape.jcr.cnd.CndElement#toCndNotation(org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType)
*/
@Override
- public String toCndNotation( NotationType notationType ) {
+ public String toCndNotation( final NotationType notationType ) {
+ final StringBuilder builder = new StringBuilder(NOTATION_PREFIX);
+ builder.append(getPrefixEndDelimiter());
+
final String DELIM = getFormatDelimiter();
- StringBuilder builder = new StringBuilder();
- builder.append(NOTATION_PREFIX).append(this.name.toCndNotation(notationType));
- boolean addDelim = Utils.build(builder, false, DELIM, this.requiredTypes.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.defaultType.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.attributes.toCndNotation(notationType));
+ builder.append(this.name.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.requiredTypes.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.defaultType.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.attributes.toCndNotation(notationType));
return builder.toString();
}
+ /**
+ * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
+ */
+ public enum PropertyName {
+ /**
+ * The autocreated indicator.
+ */
+ AUTOCREATED,
+
+ /**
+ * The default type.
+ */
+ DEFAULT_TYPE,
+
+ /**
+ * The mandatory indicator.
+ */
+ MANDATORY,
+
+ /**
+ * The property name.
+ */
+ NAME,
+
+ /**
+ * The on parent version value.
+ */
+ ON_PARENT_VERSION,
+
+ /**
+ * The protected indicator.
+ */
+ PROTECTED,
+
+ /**
+ * The collection of required types.
+ */
+ REQUIRED_TYPES,
+
+ /**
+ * The supports same name siblings indicator.
+ */
+ SAME_NAME_SIBLINGS,
+ }
+
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndImporter.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndImporter.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndImporter.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -62,7 +62,7 @@
* Constructs an importer that is not JCR 170 compatible.
*/
public CndImporter() {
- this.jcr170 = false;
+ this.jcr170 = true;
}
/**
@@ -130,7 +130,7 @@
* @throws ParsingException if there is a problem parsing the content
*/
public CompactNodeTypeDefinition parse( final String content ) {
- Utils.isNotNull(content, "content is null"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(content, "content is null"); //$NON-NLS-1$
final CompactNodeTypeDefinition cnd = new CompactNodeTypeDefinition();
final Tokenizer tokenizer = new CndTokenizer(false, false);
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndNotationPreferences.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndNotationPreferences.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndNotationPreferences.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -20,6 +20,84 @@
public class CndNotationPreferences {
/**
+ * Default preferences.
+ */
+ public static final CndNotationPreferences DEFAULT_PREFERENCES = new CndNotationPreferences();
+
+ /**
+ * The preferences (never <code>null</code>).
+ */
+ private final Map<Preference, String> prefs;
+
+ /**
+ * Constructs default preferences.
+ */
+ private CndNotationPreferences() {
+ final Map<Preference, String> temp = new HashMap<Preference, String>();
+ loadDefaults(temp);
+ this.prefs = Collections.unmodifiableMap(temp);
+ }
+
+ /**
+ * @param overrideValues the preferences whose values are being overridden (cannot be <code>null</code>)
+ */
+ public CndNotationPreferences( final Map<Preference, String> overrideValues ) {
+ Utils.verifyIsNotNull(overrideValues, "overrideValues"); //$NON-NLS-1$
+
+ final Map<Preference, String> temp = new HashMap<Preference, String>();
+ loadDefaults(temp);
+
+ if ((overrideValues != null) && !overrideValues.isEmpty()) {
+ for (final Entry<Preference, String> entry : overrideValues.entrySet()) {
+ temp.put(entry.getKey(), entry.getValue());
+ }
+ }
+
+ this.prefs = Collections.unmodifiableMap(temp);
+ }
+
+ /**
+ * @param pref the preference name whose value is being requested (cannot be <code>null</code>)
+ * @return the preference value (never <code>null</code> but can be empty)
+ */
+ public String get( final Preference pref ) {
+ Utils.verifyIsNotNull(pref, "pref"); //$NON-NLS-1$
+ return this.prefs.get(pref);
+ }
+
+ private void loadDefaults( final Map<Preference, String> map ) {
+ assert (map != null) : "preference map is null"; //$NON-NLS-1$
+
+ map.put(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER, ", "); //$NON-NLS-1$
+ map.put(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR, Utils.EMPTY_STRING);
+ map.put(Preference.CHILD_NODE_DEFINITION_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.CHILD_NODE_DEFINITION_END_PREFIX_DELIMITER, " "); //$NON-NLS-1$
+ map.put(Preference.CHILD_NODE_PROPERTY_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.DEFAULT_VALUES_END_PREFIX_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.DEFAULT_VALUES_QUOTE_CHARACTER, "'"); //$NON-NLS-1$
+ map.put(Preference.DEFAULT_TYPE_END_PREFIX_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.CHILD_NODE_DEFINITION_SECTION_END_DELIMITER, Utils.EMPTY_STRING);
+ map.put(Preference.CHILD_NODE_DEFINITION_START_DELIMITER, "\t"); //$NON-NLS-1$
+ map.put(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.ATTRIBUTE_LIST_QUOTE_CHAR, Utils.EMPTY_STRING);
+ map.put(Preference.NAMESPACE_MAPPING_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.NAMESPACE_MAPPING_SECTION_END_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.CHILD_NODE_ATTRIBUTES_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.NODE_TYPE_DEFINITION_ATTRIBUTES_END_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.NODE_TYPE_DEFINITION_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.NODE_TYPE_DEFINITION_NAME_END_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.NODE_TYPE_DEFINITION_SECTION_END_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.PROPERTY_DEFINITION_ATTRIBUTES_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.PROPERTY_DEFINITION_DELIMITER, "\n"); //$NON-NLS-1$
+ map.put(Preference.PROPERTY_DEFINITION_END_PREFIX_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.PROPERTY_DEFINITION_SECTION_END_DELIMITER, Utils.EMPTY_STRING);
+ map.put(Preference.PROPERTY_DEFINITION_START_DELIMITER, "\t"); //$NON-NLS-1$
+ map.put(Preference.REQUIRED_TYPES_END_PREFIX_DELIMITER, Utils.EMPTY_STRING);
+ map.put(Preference.SUPER_TYPES_END_DELIMITER, Utils.SPACE_STRING);
+ map.put(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER, "'"); //$NON-NLS-1$
+ }
+
+ /**
* All preferences used during CND notation construction.
*/
public enum Preference {
@@ -30,6 +108,12 @@
ATTRIBUTE_LIST_ELEMENT_DELIMITER,
/**
+ * The string version of the quote character (empty string, single quote, or double quote) surrounding each item in
+ * attribute lists.
+ */
+ ATTRIBUTE_LIST_ITEM_QUOTE_CHAR,
+
+ /**
* The delimiter after the prefix to attribute lists.
*/
ATTRIBUTE_LIST_PREFIX_END_DELIMITER,
@@ -50,16 +134,42 @@
CHILD_NODE_DEFINITION_DELIMITER,
/**
+ * The delimiter after the plus sign and before the child node definition name.
+ */
+ CHILD_NODE_DEFINITION_END_PREFIX_DELIMITER,
+
+ /**
* The delimiter after the last child node definition.
*/
CHILD_NODE_DEFINITION_SECTION_END_DELIMITER,
/**
+ * The delimiter before a child node definition.
+ */
+ CHILD_NODE_DEFINITION_START_DELIMITER,
+
+ /**
* The delimiter between child node properties.
*/
CHILD_NODE_PROPERTY_DELIMITER,
/**
+ * The delimiter after the equals sign and before the default type.
+ */
+ DEFAULT_TYPE_END_PREFIX_DELIMITER,
+
+ /**
+ * The delimiter after the equals sign and before the list of default values.
+ */
+ DEFAULT_VALUES_END_PREFIX_DELIMITER,
+
+ /**
+ * The string form of the quotation character used to surround the one or more default values. Value can be either empty,
+ * the single quote, or the double quote.
+ */
+ DEFAULT_VALUES_QUOTE_CHARACTER,
+
+ /**
* The delimiter between namespace mappings.
*/
NAMESPACE_MAPPING_DELIMITER,
@@ -72,7 +182,7 @@
/**
* The delimiter between node type definition attributes.
*/
- NODE_TYPE_DEFINITION_ATTRIBUTES_DELIMITER,
+ NODE_TYPE_DEFINITION_ATTRIBUTES_END_DELIMITER,
/**
* The delimiter between node type definitions.
@@ -100,81 +210,34 @@
PROPERTY_DEFINITION_DELIMITER,
/**
+ * The delimiter after the dash and before the property definition name.
+ */
+ PROPERTY_DEFINITION_END_PREFIX_DELIMITER,
+
+ /**
* The delimiter after the last property definition.
*/
PROPERTY_DEFINITION_SECTION_END_DELIMITER,
/**
+ * The delimiter before a property definition.
+ */
+ PROPERTY_DEFINITION_START_DELIMITER,
+
+ /**
+ * The delimiter after the open paren and before the required types.
+ */
+ REQUIRED_TYPES_END_PREFIX_DELIMITER,
+
+ /**
* The delimiter after the last super type.
*/
SUPER_TYPES_END_DELIMITER,
- }
- /**
- * Default preferences.
- */
- public static final CndNotationPreferences DEFAULT_PREFERENCES = new CndNotationPreferences();
-
- /**
- * The preferences (never <code>null</code>).
- */
- private final Map<Preference, String> prefs;
-
- /**
- * Constructs default preferences.
- */
- private CndNotationPreferences() {
- Map<Preference, String> temp = new HashMap<Preference, String>();
- loadDefaults(temp);
- this.prefs = Collections.unmodifiableMap(temp);
+ /**
+ * The string version of the quote character (empty string, single quote, or double quote) surrounding each item in value
+ * constraints list.
+ */
+ VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER,
}
-
- /**
- * @param overrideValues the preferences whose values are being overridden (cannot be <code>null</code>)
- */
- public CndNotationPreferences( Map<Preference, String> overrideValues ) {
- Utils.isNotNull(overrideValues, "overrideValues"); //$NON-NLS-1$
-
- Map<Preference, String> temp = new HashMap<Preference, String>();
- loadDefaults(temp);
-
- if ((overrideValues != null) && !overrideValues.isEmpty()) {
- for (Entry<Preference, String> entry : overrideValues.entrySet()) {
- temp.put(entry.getKey(), entry.getValue());
- }
- }
-
- this.prefs = Collections.unmodifiableMap(temp);
- }
-
- /**
- * @param pref the preference name whose value is being requested (cannot be <code>null</code>)
- * @return the preference value (never <code>null</code> but can be empty)
- */
- public String get( Preference pref ) {
- Utils.isNotNull(pref, "pref"); //$NON-NLS-1$
- return this.prefs.get(pref);
- }
-
- private void loadDefaults( Map<Preference, String> map ) {
- assert (map != null) : "preference map is null"; //$NON-NLS-1$
-
- map.put(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER, ", "); //$NON-NLS-1$
- map.put(Preference.CHILD_NODE_DEFINITION_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.CHILD_NODE_PROPERTY_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.CHILD_NODE_DEFINITION_SECTION_END_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER, " "); //$NON-NLS-1$
- map.put(Preference.ATTRIBUTE_LIST_QUOTE_CHAR, "'"); //$NON-NLS-1$
- map.put(Preference.NAMESPACE_MAPPING_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.NAMESPACE_MAPPING_SECTION_END_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.CHILD_NODE_ATTRIBUTES_DELIMITER, " "); //$NON-NLS-1$
- map.put(Preference.NODE_TYPE_DEFINITION_ATTRIBUTES_DELIMITER, " "); //$NON-NLS-1$
- map.put(Preference.NODE_TYPE_DEFINITION_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.NODE_TYPE_DEFINITION_NAME_END_DELIMITER, " "); //$NON-NLS-1$
- map.put(Preference.NODE_TYPE_DEFINITION_SECTION_END_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.PROPERTY_DEFINITION_ATTRIBUTES_DELIMITER, " "); //$NON-NLS-1$
- map.put(Preference.PROPERTY_DEFINITION_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.PROPERTY_DEFINITION_SECTION_END_DELIMITER, "\n"); //$NON-NLS-1$
- map.put(Preference.SUPER_TYPES_END_DELIMITER, "\n"); //$NON-NLS-1$
- }
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CndValidator.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -36,7 +36,7 @@
public static ValidationStatus isValid( final String value,
final PropertyType propertyType,
final String propertyName ) {
- Utils.isNotNull(propertyType, "propertyType"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(propertyType, "propertyType"); //$NON-NLS-1$
if (Utils.isEmpty(value)) {
return ValidationStatus.createErrorMessage(NLS.bind(Messages.emptyValue, propertyName));
@@ -44,11 +44,11 @@
try {
if (PropertyType.STRING == propertyType) {
- return ValidationStatus.OK_STATUS;
+ return ValidationStatus.OK_STATUS; // always valid
}
if (PropertyType.BINARY == propertyType) {
- // TODO implement BINARY validation
+ return ValidationStatus.OK_STATUS; // always valid
} else if (PropertyType.BOOLEAN == propertyType) {
if (!value.equalsIgnoreCase(Boolean.TRUE.toString()) && !value.equalsIgnoreCase(Boolean.FALSE.toString())) {
return ValidationStatus.createErrorMessage(NLS.bind(Messages.invalidPropertyValueForType, new Object[] { value,
@@ -87,13 +87,13 @@
} else if (PropertyType.PATH == propertyType) {
// TODO implement PATH validation
} else if (PropertyType.REFERENCE == propertyType) {
- // TODO implement REFERENCE validation
+ return ValidationStatus.OK_STATUS; // always valid
} else if (PropertyType.UNDEFINED == propertyType) {
- // TODO implement UNDEFINED validation
+ return ValidationStatus.OK_STATUS; // always valid
} else if (PropertyType.URI == propertyType) {
return validateUri(value, propertyName);
} else if (PropertyType.WEAKREFERENCE == propertyType) {
- // TODO implement WEAKREFERENCE validation
+ return ValidationStatus.OK_STATUS; // always valid
}
return ValidationStatus.OK_STATUS;
@@ -125,7 +125,7 @@
* @return the status (never <code>null</code>)
*/
public static ValidationStatus validateChildNodeDefinition( final ChildNodeDefinition childNodeDefinition ) {
- Utils.isNotNull(childNodeDefinition, "childNodeDefinition"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(childNodeDefinition, "childNodeDefinition"); //$NON-NLS-1$
/**
* <pre>
@@ -212,11 +212,71 @@
}
/**
+ * @param nodeTypeName the node type name whose child node definitions are being checked (cannot be <code>null</code> or empty)
+ * @param childNodeDefinitions the collection of a node type definition's child node definitions to validate (can be
+ * <code>null</code> or empty)
+ * @return the status (never <code>null</code>)
+ */
+ public static MultiValidationStatus validateChildNodeDefinitions( final String nodeTypeName,
+ final List<ChildNodeDefinition> childNodeDefinitions ) {
+ Utils.verifyIsNotEmpty(nodeTypeName, "nodeTypeName"); //$NON-NLS-1$
+
+ /**
+ * <pre>
+ * ERROR - Duplicate child node definition names
+ * </pre>
+ */
+
+ // OK to have none
+ if (Utils.isEmpty(childNodeDefinitions)) {
+ return MultiValidationStatus.OK_STATUS;
+ }
+
+ final MultiValidationStatus status = new MultiValidationStatus();
+ final List<String> childNodeNames = new ArrayList<String>(childNodeDefinitions.size());
+
+ for (final ChildNodeDefinition childNodeDefn : childNodeDefinitions) {
+ validateChildNodeDefinition(childNodeDefn, status);
+
+ { // ERROR - Duplicate child node definition names
+ final String childNodeName = childNodeDefn.getName();
+
+ if (!Utils.isEmpty(childNodeName)) {
+ if (childNodeNames.contains(childNodeName)) {
+ status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.duplicateChildNodeDefinitionName,
+ nodeTypeName, childNodeName)));
+ } else {
+ childNodeNames.add(childNodeName);
+ }
+ }
+ }
+ }
+
+ return status;
+ }
+
+ /**
+ * @param nodeTypeName the node type name whose child node definitions are being checked (cannot be <code>null</code> or empty)
+ * @param childNodeDefinitions the collection of a node type definition's child node definitions to validate (can be
+ * <code>null</code> or empty)
+ * @param status the status to add the new status to (never <code>null</code>)
+ */
+ public static void validateChildNodeDefinitions( final String nodeTypeName,
+ final List<ChildNodeDefinition> childNodeDefinitions,
+ final MultiValidationStatus status ) {
+ final MultiValidationStatus newStatus = validateChildNodeDefinitions(nodeTypeName, childNodeDefinitions);
+
+ if (!newStatus.isOk()) {
+ status.add(newStatus);
+ }
+ }
+
+ /**
* @param cnd the CND being validated (cannot be <code>null</code>)
* @return the status (never <code>null</code>)
*/
public static ValidationStatus validateCnd( final CompactNodeTypeDefinition cnd ) {
- Utils.isNotNull(cnd, "cnd"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(cnd, "cnd"); //$NON-NLS-1$
/**
* <pre>
@@ -325,7 +385,7 @@
* @return the status (never <code>null</code>)
*/
public static ValidationStatus validateNamespaceMapping( final NamespaceMapping namespaceMapping ) {
- Utils.isNotNull(namespaceMapping, "namespaceMapping"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(namespaceMapping, "namespaceMapping"); //$NON-NLS-1$
/**
* <pre>
@@ -370,13 +430,12 @@
* </pre>
*/
- final MultiValidationStatus status = new MultiValidationStatus();
-
// OK not to have namespaces
if (Utils.isEmpty(namespaceMappings)) {
- return status;
+ return MultiValidationStatus.OK_STATUS;
}
+ final MultiValidationStatus status = new MultiValidationStatus();
final List<String> prefixes = new ArrayList<String>(namespaceMappings.size());
final List<String> uris = new ArrayList<String>(namespaceMappings.size());
@@ -429,7 +488,7 @@
* @return the status (never <code>null</code>)
*/
public static ValidationStatus validateNodeTypeDefinition( final NodeTypeDefinition nodeTypeDefinition ) {
- Utils.isNotNull(nodeTypeDefinition, "nodeTypeDefinition"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(nodeTypeDefinition, "nodeTypeDefinition"); //$NON-NLS-1$
/**
* <pre>
@@ -465,28 +524,8 @@
status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.emptySuperTypes, nodeTypeDefinitionName)));
}
} else {
- final List<String> names = new ArrayList<String>(superTypeNames.length);
-
- for (final String superTypeName : superTypeNames) {
- // ERROR - Invalid super type name
- validateLocalName(superTypeName, Messages.superTypeName, status);
-
- if (!Utils.isEmpty(superTypeName)) {
- // ERROR - Duplicate super type name
- if (names.contains(superTypeName)) {
- status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.duplicateSuperType,
- nodeTypeDefinitionName, superTypeName)));
- } else {
- names.add(superTypeName);
- }
- }
- }
-
- // ERROR - Cannot have explicit super types when super types is marked as a variant
- if (nodeTypeDefinition.getState(NodeTypeDefinition.PropertyName.SUPERTYPES) != Value.IS) {
- status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.superTypesExistButMarkedAsVariant,
- nodeTypeDefinitionName)));
- }
+ validateSuperTypes(nodeTypeDefinitionName, nodeTypeDefinition.getState(NodeTypeDefinition.PropertyName.SUPERTYPES),
+ superTypeNames, status);
}
}
@@ -512,24 +551,7 @@
if (Utils.isEmpty(propertyDefinitions)) {
noPropertyDefinitions = true;
} else {
- final List<String> propNames = new ArrayList<String>(propertyDefinitions.size());
-
- for (final PropertyDefinition propertyDefn : propertyDefinitions) {
- validatePropertyDefinition(propertyDefn, status);
-
- { // ERROR - Duplicate property definition names
- final String propName = propertyDefn.getName();
-
- if (!Utils.isEmpty(propName)) {
- if (propNames.contains(propName)) {
- status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.duplicatePropertyDefinitionName,
- nodeTypeDefinitionName, propName)));
- } else {
- propNames.add(propName);
- }
- }
- }
- }
+ validatePropertyDefinitions(nodeTypeDefinitionName, propertyDefinitions, status);
}
}
@@ -539,24 +561,7 @@
if (Utils.isEmpty(childNodeDefinitions)) {
noChildNodeDefinitions = true;
} else {
- final List<String> childNodeNames = new ArrayList<String>(childNodeDefinitions.size());
-
- for (final ChildNodeDefinition childNodeDefn : childNodeDefinitions) {
- validateChildNodeDefinition(childNodeDefn, status);
-
- { // ERROR - Duplicate child node definition names
- final String childNodeName = childNodeDefn.getName();
-
- if (!Utils.isEmpty(childNodeName)) {
- if (childNodeNames.contains(childNodeName)) {
- status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.duplicateChildNodeDefinitionName,
- nodeTypeDefinitionName, childNodeName)));
- } else {
- childNodeNames.add(childNodeName);
- }
- }
- }
- }
+ validateChildNodeDefinitions(nodeTypeDefinitionName, childNodeDefinitions, status);
}
}
@@ -585,20 +590,19 @@
* @param nodeTypeDefinitions the collection of namespace mappings to validate (can be <code>null</code> or empty)
* @return the status (never <code>null</code>)
*/
- public static ValidationStatus validateNodeTypeDefinitions( final List<NodeTypeDefinition> nodeTypeDefinitions ) {
+ public static MultiValidationStatus validateNodeTypeDefinitions( final List<NodeTypeDefinition> nodeTypeDefinitions ) {
/**
* <pre>
* ERROR - Duplicate node type definition names
* </pre>
*/
- final MultiValidationStatus status = new MultiValidationStatus();
-
// OK not to have node type definitions
if (Utils.isEmpty(nodeTypeDefinitions)) {
- return status;
+ return MultiValidationStatus.OK_STATUS;
}
+ final MultiValidationStatus status = new MultiValidationStatus();
final List<String> names = new ArrayList<String>(nodeTypeDefinitions.size());
for (final NodeTypeDefinition nodeTypeDefinition : nodeTypeDefinitions) {
@@ -638,7 +642,7 @@
* @return the status (never <code>null</code>)
*/
public static ValidationStatus validatePropertyDefinition( final PropertyDefinition propertyDefinition ) {
- Utils.isNotNull(propertyDefinition, "propertyDefinition"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(propertyDefinition, "propertyDefinition"); //$NON-NLS-1$
/**
* <pre>
@@ -797,6 +801,121 @@
}
/**
+ * @param nodeTypeName the node type name whose property definitions are being checked (cannot be <code>null</code> or empty)
+ * @param propertyDefinitions the collection of a node type definition's property definitions to validate (can be
+ * <code>null</code> or empty)
+ * @return the status (never <code>null</code>)
+ */
+ public static MultiValidationStatus validatePropertyDefinitions( final String nodeTypeName,
+ final List<PropertyDefinition> propertyDefinitions ) {
+ Utils.verifyIsNotEmpty(nodeTypeName, "nodeTypeName"); //$NON-NLS-1$
+
+ /**
+ * <pre>
+ * ERROR - Duplicate property definition names
+ * </pre>
+ */
+
+ // OK to have none
+ if (Utils.isEmpty(propertyDefinitions)) {
+ return MultiValidationStatus.OK_STATUS;
+ }
+
+ final MultiValidationStatus status = new MultiValidationStatus();
+ final List<String> propNames = new ArrayList<String>(propertyDefinitions.size());
+
+ for (final PropertyDefinition propertyDefn : propertyDefinitions) {
+ validatePropertyDefinition(propertyDefn, status);
+
+ { // ERROR - Duplicate property definition names
+ final String propName = propertyDefn.getName();
+
+ if (!Utils.isEmpty(propName)) {
+ if (propNames.contains(propName)) {
+ status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.duplicatePropertyDefinitionName,
+ nodeTypeName, propName)));
+ } else {
+ propNames.add(propName);
+ }
+ }
+ }
+ }
+
+ return status;
+ }
+
+ /**
+ * @param nodeTypeName the node type name whose property definitions are being checked (cannot be <code>null</code> or empty)
+ * @param propertyDefinitions the collection of a node type definition's property definitions to validate (can be
+ * <code>null</code> or empty)
+ * @param status the status to add the new status to (never <code>null</code>)
+ */
+ public static void validatePropertyDefinitions( final String nodeTypeName,
+ final List<PropertyDefinition> propertyDefinitions,
+ final MultiValidationStatus status ) {
+ final MultiValidationStatus newStatus = validatePropertyDefinitions(nodeTypeName, propertyDefinitions);
+
+ if (!newStatus.isOk()) {
+ status.add(newStatus);
+ }
+ }
+
+ /**
+ * @param qname the qualified name being validated (cannot be <code>null</code>)
+ * @param propertyName the name to use to identify the qualified name (cannot be <code>null</code> empty)
+ * @return the status (never <code>null</code>)
+ */
+ public static MultiValidationStatus validateQualifiedName( final QualifiedName qname,
+ String propertyName ) {
+ Utils.verifyIsNotNull(qname, "qname"); //$NON-NLS-1$
+
+ final MultiValidationStatus status = new MultiValidationStatus();
+
+ { // qualifier part
+ final String qualifier = qname.getQualifier();
+
+ if (!Utils.isEmpty(qualifier)) {
+ final ValidationStatus qualifierStatus = validateLocalName(qualifier, propertyName);
+
+ if (!qualifierStatus.isOk()) {
+ status.add(qualifierStatus);
+ }
+ }
+ }
+
+ { // unqualified name part
+ final String unqualifiedName = qname.getUnqualifiedName();
+
+ if (Utils.isEmpty(unqualifiedName)) {
+ status.add(ValidationStatus.createErrorMessage(Messages.emptyUnqualifiedName));
+ } else {
+ final ValidationStatus nameStatus = validateLocalName(unqualifiedName, propertyName);
+
+ if (!nameStatus.isOk()) {
+ status.add(nameStatus);
+ }
+ }
+ }
+
+ return status;
+ }
+
+ /**
+ * @param qname the qualified name being validated (cannot be <code>null</code>)
+ * @param propertyName the name to use to identify the qualified name (cannot be <code>null</code> empty)
+ * @param status the status to add the new status to (never <code>null</code>)
+ */
+ public static void validateQualifiedName( final QualifiedName qname,
+ String propertyName,
+ final MultiValidationStatus status ) {
+ final MultiValidationStatus newStatus = validateQualifiedName(qname, propertyName);
+
+ if (!newStatus.isOk()) {
+ status.add(newStatus);
+ }
+ }
+
+ /**
* @param operator the query operator being validated (can be <code>null</code> or empty)
* @return the status (never <code>null</code>)
*/
@@ -826,6 +945,75 @@
}
/**
+ * @param nodeTypeDefinitionName the node type name whose supertypes are being checked (cannot be <code>null</code> or empty)
+ * @param superTypesState the supertypes property state (cannot be <code>null</code>)
+ * @param superTypeNames the collection of a node type definition's supertypes to validate (can be <code>null</code> or empty)
+ * @return the status (never <code>null</code>)
+ */
+ public static MultiValidationStatus validateSuperTypes( final String nodeTypeDefinitionName,
+ final Value superTypesState,
+ final String[] superTypeNames ) {
+ Utils.verifyIsNotEmpty(nodeTypeDefinitionName, "nodeTypeDefinitionName"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(superTypesState, "superTypesState"); //$NON-NLS-1$
+
+ /**
+ * <pre>
+ * ERROR - Invalid super type name
+ * ERROR - Duplicate super type name
+ * ERROR - Cannot have explicit super types when super types is marked as a variant
+ * </pre>
+ */
+
+ // OK to have none
+ if (Utils.isEmpty(superTypeNames)) {
+ return MultiValidationStatus.OK_STATUS;
+ }
+
+ final MultiValidationStatus status = new MultiValidationStatus();
+ final List<String> names = new ArrayList<String>(superTypeNames.length);
+
+ for (final String superTypeName : superTypeNames) {
+ // ERROR - Invalid super type name
+ validateLocalName(superTypeName, Messages.superTypeName, status);
+
+ if (!Utils.isEmpty(superTypeName)) {
+ // ERROR - Duplicate super type name
+ if (names.contains(superTypeName)) {
+ status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.duplicateSuperType, nodeTypeDefinitionName,
+ superTypeName)));
+ } else {
+ names.add(superTypeName);
+ }
+ }
+ }
+
+ // ERROR - Cannot have explicit super types when super types is marked as a variant
+ if (superTypesState != Value.IS) {
+ status.add(ValidationStatus.createErrorMessage(NLS.bind(Messages.superTypesExistButMarkedAsVariant,
+ nodeTypeDefinitionName)));
+ }
+
+ return status;
+ }
+
+ /**
+ * @param nodeTypeDefinitionName the node type name whose supertypes are being checked (cannot be <code>null</code> or empty)
+ * @param superTypesState the supertypes property state (cannot be <code>null</code>)
+ * @param superTypeNames the collection of a node type definition's supertypes to validate (can be <code>null</code> or empty)
+ * @param status the status to add the new status to (never <code>null</code>)
+ */
+ public static void validateSuperTypes( final String nodeTypeDefinitionName,
+ final Value superTypesState,
+ final String[] superTypeNames,
+ final MultiValidationStatus status ) {
+ final MultiValidationStatus newStatus = validateSuperTypes(nodeTypeDefinitionName, superTypesState, superTypeNames);
+
+ if (!newStatus.isOk()) {
+ status.add(newStatus);
+ }
+ }
+
+ /**
* @param uri the URI being checked (can be <code>null</code> or empty)
* @param propertyName the name to use to identify the URI (cannot be <code>null</code> empty)
* @return the status (never <code>null</code>)
@@ -854,8 +1042,8 @@
public static ValidationStatus validateValueConstraint( final String constraint ) {
Utils.verifyIsNotEmpty(constraint, "constraint"); //$NON-NLS-1$
- // TODO implement
- return null;
+ // TODO implement validateValueConstraint
+ return ValidationStatus.OK_STATUS;
}
/**
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CompactNodeTypeDefinition.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CompactNodeTypeDefinition.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/CompactNodeTypeDefinition.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -23,22 +23,6 @@
public class CompactNodeTypeDefinition implements CndElement {
/**
- * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
- */
- public enum PropertyName {
-
- /**
- * The namespace mappings property.
- */
- NAMESPACE_MAPPINGS,
-
- /**
- * The node type definitions property.
- */
- NODE_TYPE_DEFINITIONS
- }
-
- /**
* The registered property change listeners (never <code>null</code>).
*/
private final CopyOnWriteArrayList<PropertyChangeListener> listeners;
@@ -64,8 +48,8 @@
* @param newListener the listener being registered (cannot be <code>null</code>)
* @return <code>true</code> if registered
*/
- public boolean addListener( PropertyChangeListener newListener ) {
- Utils.isNotNull(newListener, "newListener"); //$NON-NLS-1$
+ public boolean addListener( final PropertyChangeListener newListener ) {
+ Utils.verifyIsNotNull(newListener, "newListener"); //$NON-NLS-1$
return this.listeners.addIfAbsent(newListener);
}
@@ -76,8 +60,8 @@
* @param namespaceMappingToAdd the namespace mapping being added (cannot be <code>null</code>)
* @return <code>true</code> if added
*/
- public boolean addNamespaceMapping( NamespaceMapping namespaceMappingToAdd ) {
- Utils.isNotNull(namespaceMappingToAdd, "namespaceMappingToAdd"); //$NON-NLS-1$
+ public boolean addNamespaceMapping( final NamespaceMapping namespaceMappingToAdd ) {
+ Utils.verifyIsNotNull(namespaceMappingToAdd, "namespaceMappingToAdd"); //$NON-NLS-1$
if (this.namespaceMappings == null) {
this.namespaceMappings = new ArrayList<NamespaceMapping>();
@@ -98,8 +82,8 @@
* @param nodeTypeDefinitionToAdd the node type definition being added (cannot be <code>null</code>)
* @return <code>true</code> if added
*/
- public boolean addNodeTypeDefinition( NodeTypeDefinition nodeTypeDefinitionToAdd ) {
- Utils.isNotNull(nodeTypeDefinitionToAdd, "nodeTypeDefinitionToAdd"); //$NON-NLS-1$
+ public boolean addNodeTypeDefinition( final NodeTypeDefinition nodeTypeDefinitionToAdd ) {
+ Utils.verifyIsNotNull(nodeTypeDefinitionToAdd, "nodeTypeDefinitionToAdd"); //$NON-NLS-1$
if (this.nodeTypeDefinitions == null) {
this.nodeTypeDefinitions = new ArrayList<NodeTypeDefinition>();
@@ -127,7 +111,7 @@
boolean wasCleared = false;
if (!this.namespaceMappings.isEmpty()) {
- Object oldValue = new ArrayList<NamespaceMapping>(this.namespaceMappings);
+ final Object oldValue = new ArrayList<NamespaceMapping>(this.namespaceMappings);
wasCleared = true;
this.namespaceMappings.clear();
notifyChangeListeners(PropertyName.NAMESPACE_MAPPINGS, oldValue, null);
@@ -151,7 +135,7 @@
boolean wasCleared = false;
if (!this.nodeTypeDefinitions.isEmpty()) {
- Object oldValue = new ArrayList<NodeTypeDefinition>(nodeTypeDefinitions);
+ final Object oldValue = new ArrayList<NodeTypeDefinition>(this.nodeTypeDefinitions);
wasCleared = true;
this.nodeTypeDefinitions.clear();
notifyChangeListeners(PropertyName.NODE_TYPE_DEFINITIONS, oldValue, null);
@@ -209,12 +193,12 @@
final Object newValue ) {
assert (property != null) : "property is null"; //$NON-NLS-1$
- PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
+ final PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
for (final Object listener : this.listeners.toArray()) {
try {
((PropertyChangeListener)listener).propertyChange(event);
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO log this
this.listeners.remove(listener);
}
@@ -225,8 +209,8 @@
* @param listener the listener being unregistered (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeListener( PropertyChangeListener listener ) {
- Utils.isNotNull(listener, "listener"); //$NON-NLS-1$
+ public boolean removeListener( final PropertyChangeListener listener ) {
+ Utils.verifyIsNotNull(listener, "listener"); //$NON-NLS-1$
return this.listeners.remove(listener);
}
@@ -237,8 +221,8 @@
* @param namespaceMappingToRemove the namespace mapping being removed (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeNamespaceMapping( NamespaceMapping namespaceMappingToRemove ) {
- Utils.isNotNull(namespaceMappingToRemove, "namespaceMappingToRemove"); //$NON-NLS-1$
+ public boolean removeNamespaceMapping( final NamespaceMapping namespaceMappingToRemove ) {
+ Utils.verifyIsNotNull(namespaceMappingToRemove, "namespaceMappingToRemove"); //$NON-NLS-1$
if ((this.namespaceMappings != null) && this.namespaceMappings.remove(namespaceMappingToRemove)) {
notifyChangeListeners(PropertyName.NAMESPACE_MAPPINGS, namespaceMappingToRemove, null);
@@ -260,8 +244,8 @@
* @param nodeTypeDefinitionToRemove the node type definition being removed (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeNodeTypeDefinition( NodeTypeDefinition nodeTypeDefinitionToRemove ) {
- Utils.isNotNull(nodeTypeDefinitionToRemove, "nodeTypeDefinitionToRemove"); //$NON-NLS-1$
+ public boolean removeNodeTypeDefinition( final NodeTypeDefinition nodeTypeDefinitionToRemove ) {
+ Utils.verifyIsNotNull(nodeTypeDefinitionToRemove, "nodeTypeDefinitionToRemove"); //$NON-NLS-1$
if ((this.nodeTypeDefinitions != null) && this.nodeTypeDefinitions.remove(nodeTypeDefinitionToRemove)) {
notifyChangeListeners(PropertyName.NODE_TYPE_DEFINITIONS, nodeTypeDefinitionToRemove, null);
@@ -282,16 +266,18 @@
* @see org.jboss.tools.modeshape.jcr.cnd.CndElement#toCndNotation(org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType)
*/
@Override
- public String toCndNotation( NotationType notationType ) {
- StringBuilder builder = new StringBuilder();
+ public String toCndNotation( final NotationType notationType ) {
+ final StringBuilder builder = new StringBuilder();
boolean addDelim = false;
{ // namespace mappings
if (!Utils.isEmpty(this.namespaceMappings)) {
final String DELIM = getNamespaceMappingDelimiter();
- for (NamespaceMapping namespaceMapping : this.namespaceMappings) {
- addDelim = Utils.build(builder, addDelim, DELIM, namespaceMapping.toCndNotation(notationType));
+ for (final NamespaceMapping namespaceMapping : this.namespaceMappings) {
+ if (Utils.build(builder, addDelim, DELIM, namespaceMapping.toCndNotation(notationType))) {
+ addDelim = true;
+ }
}
builder.append(getEndNamespaceMappingSectionDelimiter());
@@ -302,8 +288,10 @@
if (!Utils.isEmpty(this.nodeTypeDefinitions)) {
final String DELIM = getNodeTypeDefinitionDelimiter();
- for (NodeTypeDefinition nodeTypeDefinition : this.nodeTypeDefinitions) {
- addDelim = Utils.build(builder, addDelim, DELIM, nodeTypeDefinition.toCndNotation(notationType));
+ for (final NodeTypeDefinition nodeTypeDefinition : this.nodeTypeDefinitions) {
+ if (Utils.build(builder, addDelim, DELIM, nodeTypeDefinition.toCndNotation(notationType))) {
+ addDelim = true;
+ }
}
builder.append(getEndNodeTypeDefinitionSectionDelimiter());
@@ -313,4 +301,20 @@
return builder.toString();
}
+ /**
+ * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
+ */
+ public enum PropertyName {
+
+ /**
+ * The namespace mappings property.
+ */
+ NAMESPACE_MAPPINGS,
+
+ /**
+ * The node type definitions property.
+ */
+ NODE_TYPE_DEFINITIONS
+ }
+
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/LocalName.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/LocalName.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/LocalName.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -12,7 +12,7 @@
/**
*
*/
-public class LocalName implements CndElement {
+public class LocalName implements CndElement, Comparable<LocalName> {
private Mode mode = Mode.UNQOUTED;
@@ -35,6 +35,29 @@
/**
* {@inheritDoc}
*
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo( final LocalName that ) {
+ if (equals(that) || Utils.equivalent(get(), that.get())) {
+ return 0;
+ }
+
+ // both can't be empty
+ if (Utils.isEmpty(this.value)) {
+ return -1;
+ }
+
+ if (Utils.isEmpty(that.value)) {
+ return 1;
+ }
+
+ return this.value.compareTo(that.value);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
@@ -108,10 +131,10 @@
/**
* @param newMode the new mode (cannot be <code>null</code>)
- * @return <code>true</code> if the model was changed
+ * @return <code>true</code> if the mode was changed
*/
public boolean setMode( final Mode newMode ) {
- Utils.isNotNull(newMode, "newMode"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newMode, "newMode"); //$NON-NLS-1$
if (this.mode != newMode) {
this.mode = newMode;
@@ -131,7 +154,7 @@
final StringBuilder builder = new StringBuilder();
Mode notationMode = this.mode;
- if (!Utils.isEmpty(this.value) && this.value.contains(" ") && (this.mode == Mode.UNQOUTED)) { //$NON-NLS-1$
+ if (!Utils.isEmpty(this.value) && this.value.contains(Utils.SPACE_STRING) && (this.mode == Mode.UNQOUTED)) {
notationMode = Mode.SINGLE_QUOTED;
}
@@ -143,14 +166,28 @@
}
/**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ if (Utils.isEmpty(this.value)) {
+ return Utils.EMPTY_STRING;
+ }
+
+ return this.value;
+ }
+
+ /**
* The quotation preference when using the name in CND notation.
*/
public enum Mode {
/**
- * The name is not surrounded by quotes in the CND notation.
+ * The name is surrounded by double quotes in the CND notation.
*/
- UNQOUTED(Utils.EMPTY_STRING),
+ DOUBLE_QUOTED("\""), //$NON-NLS-1$
/**
* The name is surrounded by single quotes in the CND notation.
@@ -158,9 +195,9 @@
SINGLE_QUOTED("'"), //$NON-NLS-1$
/**
- * The name is surrounded by double quotes in the CND notation.
+ * The name is not surrounded by quotes in the CND notation.
*/
- DOUBLE_QUOTED("\""); //$NON-NLS-1$
+ UNQOUTED(Utils.EMPTY_STRING);
private final String delim;
@@ -178,5 +215,4 @@
return this.delim;
}
}
-
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NamespaceMapping.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NamespaceMapping.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NamespaceMapping.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -16,34 +16,19 @@
/**
* The <code>NamespaceMapping</code> class represents a namespace. Each namespace mapping includes a prefix and a URI.
*/
-public class NamespaceMapping implements CndElement {
+public class NamespaceMapping implements CndElement, Comparable {
/**
- * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
+ * The delimeter used to separate the prefix from the URI.
*/
- public enum PropertyName {
- /**
- * The namespace prefix.
- */
- PREFIX,
+ public static final String NOTATION_DELIMITER = "="; //$NON-NLS-1$
- /**
- * The namespace URI.
- */
- URI
- }
-
/**
* The prefix used in CND notation before the namespace mapping.
*/
public static final String NOTATION_PREFIX = "<"; //$NON-NLS-1$
/**
- * The delimeter used to separate the prefix from the URI.
- */
- public static final String NOTATION_DELIMITER = "="; //$NON-NLS-1$
-
- /**
* The suffix used in CND notation after the namespace mapping.
*/
public static final String NOTATION_SUFFIX = ">"; //$NON-NLS-1$
@@ -78,8 +63,8 @@
* @param initialPrefix the initial prefix (can be <code>null</code> or empty)
* @param initialUri the initial URI (can be <code>null</code> or empty)
*/
- public NamespaceMapping( String initialPrefix,
- String initialUri ) {
+ public NamespaceMapping( final String initialPrefix,
+ final String initialUri ) {
this();
this.prefix.set(initialPrefix);
this.uri.set(initialUri);
@@ -89,20 +74,49 @@
* @param newListener the listener being registered (cannot be <code>null</code>)
* @return <code>true</code> if registered
*/
- public boolean addListener( PropertyChangeListener newListener ) {
- Utils.isNotNull(newListener, "newListener"); //$NON-NLS-1$
+ public boolean addListener( final PropertyChangeListener newListener ) {
+ Utils.verifyIsNotNull(newListener, "newListener"); //$NON-NLS-1$
return this.listeners.addIfAbsent(newListener);
}
/**
* {@inheritDoc}
*
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo( final Object object ) {
+ final NamespaceMapping that = (NamespaceMapping)object;
+ final String thisPrefix = getPrefix();
+ final String thatPrefix = that.getPrefix();
+
+ if (Utils.isEmpty(thisPrefix)) {
+ if (Utils.isEmpty(thatPrefix)) {
+ return 0;
+ }
+
+ // thatName is not empty
+ return 1;
+ }
+
+ // thisName is not empty
+ if (thatPrefix == null) {
+ return 1;
+ }
+
+ // thisName and thatName are not empty
+ return thisPrefix.compareTo(thatPrefix);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
- public boolean equals( Object obj ) {
+ public boolean equals( final Object obj ) {
if ((obj != null) && getClass().equals(obj.getClass())) {
- NamespaceMapping that = (NamespaceMapping)obj;
+ final NamespaceMapping that = (NamespaceMapping)obj;
return (this.prefix.equals(that.prefix) && this.uri.equals(that.uri));
}
@@ -143,12 +157,12 @@
final Object newValue ) {
assert (property != null) : "property is null"; //$NON-NLS-1$
- PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
+ final PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
for (final Object listener : this.listeners.toArray()) {
try {
((PropertyChangeListener)listener).propertyChange(event);
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO log this
this.listeners.remove(listener);
}
@@ -159,8 +173,8 @@
* @param listener the listener being unregistered (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeListener( PropertyChangeListener listener ) {
- Utils.isNotNull(listener, "listener"); //$NON-NLS-1$
+ public boolean removeListener( final PropertyChangeListener listener ) {
+ Utils.verifyIsNotNull(listener, "listener"); //$NON-NLS-1$
return this.listeners.remove(listener);
}
@@ -168,9 +182,9 @@
* @param newPrefix the new prefix value (can be <code>null</code> or empty)
* @return true if the prefix was changed
*/
- public boolean setPrefix( String newPrefix ) {
- Object oldValue = this.prefix.get();
- boolean changed = this.prefix.set(newPrefix);
+ public boolean setPrefix( final String newPrefix ) {
+ final Object oldValue = this.prefix.get();
+ final boolean changed = this.prefix.set(newPrefix);
if (changed) {
notifyChangeListeners(PropertyName.PREFIX, oldValue, newPrefix);
@@ -183,9 +197,9 @@
* @param newUri then new URI value (can be <code>null</code> or empty)
* @return <code>true</code> if the URI was changed
*/
- public boolean setUri( String newUri ) {
- Object oldValue = this.uri.get();
- boolean changed = this.uri.set(newUri);
+ public boolean setUri( final String newUri ) {
+ final Object oldValue = this.uri.get();
+ final boolean changed = this.uri.set(newUri);
if (changed) {
notifyChangeListeners(PropertyName.URI, oldValue, newUri);
@@ -200,8 +214,8 @@
* @see org.jboss.tools.modeshape.jcr.cnd.CndElement#toCndNotation(org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType)
*/
@Override
- public String toCndNotation( NotationType notationType ) {
- StringBuilder builder = new StringBuilder();
+ public String toCndNotation( final NotationType notationType ) {
+ final StringBuilder builder = new StringBuilder();
builder.append(NOTATION_PREFIX);
builder.append(this.prefix.toCndNotation(notationType));
builder.append(NOTATION_DELIMITER);
@@ -211,4 +225,19 @@
return builder.toString();
}
+ /**
+ * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
+ */
+ public enum PropertyName {
+ /**
+ * The namespace prefix.
+ */
+ PREFIX,
+
+ /**
+ * The namespace URI.
+ */
+ URI
+ }
+
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinition.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinition.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinition.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -31,7 +31,7 @@
/**
* Represents a CND node type definition.
*/
-public class NodeTypeDefinition implements CndElement, NodeTypeTemplate {
+public class NodeTypeDefinition implements CndElement, Comparable, NodeTypeTemplate {
/**
* Then node type name prefix used in the CND notation.
@@ -61,7 +61,7 @@
/**
* The node type name (never <code>null</code> but can have a <code>null</code> or empty value).
*/
- private final LocalName name;
+ private final QualifiedName name;
/**
* The collection of property definitions (can be <code>null</code>).
@@ -78,7 +78,7 @@
*/
public NodeTypeDefinition() {
this.attributes = new NodeTypeAttributes();
- this.name = new LocalName();
+ this.name = new QualifiedName();
this.superTypes = new SuperTypes();
this.listeners = new CopyOnWriteArrayList<PropertyChangeListener>();
}
@@ -90,7 +90,7 @@
* @return <code>true</code> if successfully added
*/
public boolean addChildNodeDefinition( final ChildNodeDefinition childNodeDefinitionBeingAdded ) {
- Utils.isNotNull(childNodeDefinitionBeingAdded, "childNodeDefinitionBeingAdded"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(childNodeDefinitionBeingAdded, "childNodeDefinitionBeingAdded"); //$NON-NLS-1$
if (this.childNodesDefinitions == null) {
this.childNodesDefinitions = new ArrayList<ChildNodeDefinition>();
@@ -109,7 +109,7 @@
* @return <code>true</code> if successfully added
*/
public boolean addListener( final PropertyChangeListener newListener ) {
- Utils.isNotNull(newListener, "newListener"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newListener, "newListener"); //$NON-NLS-1$
return this.listeners.addIfAbsent(newListener);
}
@@ -120,7 +120,7 @@
* @return <code>true</code> if successfully added
*/
public boolean addPropertyDefinition( final PropertyDefinition properyDefinitionBeingAdded ) {
- Utils.isNotNull(properyDefinitionBeingAdded, "properyDefinitionBeingAdded"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(properyDefinitionBeingAdded, "properyDefinitionBeingAdded"); //$NON-NLS-1$
if (this.propertyDefinitions == null) {
this.propertyDefinitions = new ArrayList<PropertyDefinition>();
@@ -161,8 +161,8 @@
*/
public boolean changeState( final PropertyName propertyName,
final Value newState ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
- Utils.isNotNull(newState, "newState"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newState, "newState"); //$NON-NLS-1$
Object oldValue = null;
final Object newValue = newState;
@@ -254,6 +254,35 @@
return false;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo( final Object object ) {
+ final NodeTypeDefinition that = (NodeTypeDefinition)object;
+ final String thisName = getName();
+ final String thatName = that.getName();
+
+ if (Utils.isEmpty(thisName)) {
+ if (Utils.isEmpty(thatName)) {
+ return 0;
+ }
+
+ // thatName is not empty
+ return 1;
+ }
+
+ // thisName is not empty
+ if (thatName == null) {
+ return 1;
+ }
+
+ // thisName and thatName are not empty
+ return thisName.compareTo(thatName);
+ }
+
private String getChildNodeDefinitionDelimiter() {
return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.CHILD_NODE_DEFINITION_DELIMITER);
}
@@ -302,7 +331,7 @@
}
private String getEndAttributesDelimiter() {
- return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.NODE_TYPE_DEFINITION_ATTRIBUTES_DELIMITER);
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.NODE_TYPE_DEFINITION_ATTRIBUTES_END_DELIMITER);
}
private String getEndChildNodeDefinitionsDelimiter() {
@@ -373,6 +402,10 @@
return this.propertyDefinitions;
}
+ private String getPropertyDefinitionStartDelimiter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.PROPERTY_DEFINITION_START_DELIMITER);
+ }
+
/**
* {@inheritDoc}
*
@@ -383,6 +416,10 @@
return new ArrayList<PropertyDefinitionTemplate>(getPropertyDefinitions());
}
+ private String getStartChildNodeDefinitionDelimiter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.CHILD_NODE_DEFINITION_START_DELIMITER);
+ }
+
/**
* Can be used to find the attribute state of the abstract, mixin, orderable, primary item, queryable, and super types
* properties.
@@ -392,7 +429,7 @@
* @throws IllegalArgumentException if a property that does not have an attribute state is specified
*/
public Value getState( final PropertyName propertyName ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
if (PropertyName.ABSTRACT == propertyName) {
return this.attributes.getAbstract().get();
@@ -466,7 +503,7 @@
* @return <code>true</code> if property is a variant
*/
public boolean isVariant( final PropertyName propertyName ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
return (getState(propertyName) == Value.VARIANT);
}
@@ -497,7 +534,7 @@
* @return <code>true</code> if successfully removed
*/
public boolean removeChildNodeDefinition( final ChildNodeDefinition childNodeDefinitionBeingRemoved ) {
- Utils.isNotNull(childNodeDefinitionBeingRemoved, "childNodeDefinitionBeingRemoved"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(childNodeDefinitionBeingRemoved, "childNodeDefinitionBeingRemoved"); //$NON-NLS-1$
if (this.childNodesDefinitions == null) {
return false;
@@ -521,7 +558,7 @@
* @return <code>true</code> if successfully removed
*/
public boolean removeListener( final PropertyChangeListener listener ) {
- Utils.isNotNull(listener, "listener"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(listener, "listener"); //$NON-NLS-1$
return this.listeners.remove(listener);
}
@@ -532,7 +569,7 @@
* @return <code>true</code> if successfully removed
*/
public boolean removePropertyDefinition( final PropertyDefinition propertyDefinitionBeingRemoved ) {
- Utils.isNotNull(propertyDefinitionBeingRemoved, "propertyDefinitionBeingRemoved"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(propertyDefinitionBeingRemoved, "propertyDefinitionBeingRemoved"); //$NON-NLS-1$
if (this.propertyDefinitions == null) {
return false;
@@ -668,7 +705,7 @@
*/
@Override
public String toCndNotation( final NotationType notationType ) {
- final StringBuilder builder = new StringBuilder("- "); //$NON-NLS-1$
+ final StringBuilder builder = new StringBuilder();
{ // name
builder.append(NAME_NOTATION_PREFIX)
@@ -689,16 +726,18 @@
final String notation = this.attributes.toCndNotation(notationType);
if (!Utils.isEmpty(notation)) {
- builder.append(notation).append(getEndAttributesDelimiter());
+ builder.append(notation);
}
+
+ builder.append(getEndAttributesDelimiter());
}
{ // property definitions
if (!Utils.isEmpty(this.propertyDefinitions)) {
- final String PD_DELIM = getPropertyDefinitionDelimiter();
-
for (final PropertyDefinition propDefn : this.propertyDefinitions) {
- builder.append(propDefn.toCndNotation(notationType)).append(PD_DELIM);
+ builder.append(getPropertyDefinitionStartDelimiter());
+ builder.append(propDefn.toCndNotation(notationType));
+ builder.append(getPropertyDefinitionDelimiter());
}
builder.append(getEndPropertyDefinitionsDelimiter());
@@ -707,10 +746,10 @@
{ // child node definitions
if (!Utils.isEmpty(this.childNodesDefinitions)) {
- final String CND_DELIM = getChildNodeDefinitionDelimiter();
-
for (final ChildNodeDefinition childNodeDefn : this.childNodesDefinitions) {
- builder.append(childNodeDefn.toCndNotation(notationType)).append(CND_DELIM);
+ builder.append(getStartChildNodeDefinitionDelimiter());
+ builder.append(childNodeDefn.toCndNotation(notationType));
+ builder.append(getChildNodeDefinitionDelimiter());
}
builder.append(getEndChildNodeDefinitionsDelimiter());
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinition.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinition.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinition.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -33,93 +33,27 @@
/**
* The <code>PropertyDefinition</code> class represents node type property definition.
*/
-public class PropertyDefinition implements CndElement, PropertyDefinitionTemplate {
+public class PropertyDefinition implements CndElement, Comparable, PropertyDefinitionTemplate {
/**
- * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
+ * The prefix used in CND notation before the property definition.
*/
- public enum PropertyName {
+ public static final String NOTATION_PREFIX = "-"; //$NON-NLS-1$
- /**
- * The autocreated attribute.
- */
- AUTOCREATED,
-
- /**
- * A collection of default values.
- */
- DEFAULT_VALUES,
-
- /**
- * The mandatory attribute.
- */
- MANDATORY,
-
- /**
- * The multiple attribute.
- */
- MULTIPLE,
-
- /**
- * The property name.
- */
- NAME,
-
- /**
- * The does not support full text search attribute.
- */
- NO_FULL_TEXT,
-
- /**
- * The does not support query order attribute.
- */
- NO_QUERY_ORDER,
-
- /**
- * The on parent version value.
- */
- ON_PARENT_VERSION,
-
- /**
- * The protected attribute.
- */
- PROTECTED,
-
- /**
- * The collection of supported query operators.
- */
- QUERY_OPS,
-
- /**
- * The property type.
- */
- TYPE,
-
- /**
- * The collection of property constraints.
- */
- VALUE_CONSTRAINTS
- }
-
/**
* Name for a residual property definition.
*/
public static final String RESIDUAL_PROPERTY_NAME = "*"; //$NON-NLS-1$
/**
- * The prefix used in CND notation before the property definition.
- */
- public static final String NOTATION_PREFIX = "-"; //$NON-NLS-1$
-
- /**
* The property attributes (never <code>null</code>).
*/
- private PropertyAttributes attributes;
+ private final PropertyAttributes attributes;
/**
* The property default values (never <code>null</code>).
*/
- private DefaultValues defaultValues;
+ private final DefaultValues defaultValues;
/**
* The registered property change listeners (never <code>null</code>).
@@ -129,7 +63,7 @@
/**
* The property identifier (can be <code>null</code> or empty).
*/
- private final LocalName name;
+ private final QualifiedName name;
/**
* The property type (never <code>null</code>).
@@ -139,14 +73,14 @@
/**
* The property value constraints (never <code>null</code>).
*/
- private ValueConstraints valueConstraints;
+ private final ValueConstraints valueConstraints;
/**
* Constructs an instance with a default type of {@link PropertyType#STRING}.
*/
public PropertyDefinition() {
this.type = PropertyType.DEFAULT_VALUE;
- this.name = new LocalName();
+ this.name = new QualifiedName();
this.attributes = new PropertyAttributes();
this.defaultValues = new DefaultValues();
this.valueConstraints = new ValueConstraints();
@@ -160,7 +94,7 @@
* @param defaultValueBeingAdded the default value being added (cannot be <code>null</code>)
* @return <code>true</code> if added
*/
- public boolean addDefaultValue( String defaultValueBeingAdded ) {
+ public boolean addDefaultValue( final String defaultValueBeingAdded ) {
if (this.defaultValues.add(defaultValueBeingAdded)) {
notifyChangeListeners(PropertyName.DEFAULT_VALUES, null, defaultValueBeingAdded);
return true; // added
@@ -173,8 +107,8 @@
* @param newListener the listener being registered (cannot be <code>null</code>)
* @return <code>true</code> if registered
*/
- public boolean addListener( PropertyChangeListener newListener ) {
- Utils.isNotNull(newListener, "newListener"); //$NON-NLS-1$
+ public boolean addListener( final PropertyChangeListener newListener ) {
+ Utils.verifyIsNotNull(newListener, "newListener"); //$NON-NLS-1$
return this.listeners.addIfAbsent(newListener);
}
@@ -182,7 +116,7 @@
* @param operator the query operator being added (cannot be <code>null</code>)
* @return <code>true</code> if added
*/
- public boolean addQueryOperator( QueryOperator operator ) {
+ public boolean addQueryOperator( final QueryOperator operator ) {
if (this.attributes.getQueryOps().add(operator)) {
notifyChangeListeners(PropertyName.QUERY_OPS, null, operator);
return true; // added
@@ -198,7 +132,7 @@
* @param valueConstraintBeingAdded the value constraint being added (cannot be <code>null</code>)
* @return <code>true</code> if added
*/
- public boolean addValueConstraint( String valueConstraintBeingAdded ) {
+ public boolean addValueConstraint( final String valueConstraintBeingAdded ) {
if (this.valueConstraints.add(valueConstraintBeingAdded)) {
notifyChangeListeners(PropertyName.VALUE_CONSTRAINTS, null, valueConstraintBeingAdded);
return true; // added
@@ -216,10 +150,10 @@
* @param newState the new attribute state (cannot be <code>null</code>)
* @return <code>true</code> if the attribute state was changed
*/
- public boolean changeState( PropertyName propertyName,
- AttributeState.Value newState ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
- Utils.isNotNull(newState, "newState"); //$NON-NLS-1$
+ public boolean changeState( final PropertyName propertyName,
+ final AttributeState.Value newState ) {
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newState, "newState"); //$NON-NLS-1$
Object oldValue = null;
Object newValue = newState;
@@ -279,7 +213,7 @@
* @return <code>true</code> if at least one default value was removed
*/
public boolean clearDefaultValues() {
- List<String> oldValue = new ArrayList<String>(this.defaultValues.getSupportedItems());
+ final List<String> oldValue = new ArrayList<String>(this.defaultValues.getSupportedItems());
if (this.defaultValues.clear()) {
notifyChangeListeners(PropertyName.DEFAULT_VALUES, oldValue, null);
@@ -296,7 +230,7 @@
* @return <code>true</code> if at least one value constraint was removed
*/
public boolean clearValueConstraints() {
- List<String> oldValue = new ArrayList<String>(valueConstraints.getSupportedItems());
+ final List<String> oldValue = new ArrayList<String>(this.valueConstraints.getSupportedItems());
if (this.valueConstraints.clear()) {
notifyChangeListeners(PropertyName.VALUE_CONSTRAINTS, oldValue, null);
@@ -309,6 +243,49 @@
/**
* {@inheritDoc}
*
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo( final Object object ) {
+ final PropertyDefinition that = (PropertyDefinition)object;
+ final String thisName = getName();
+ final String thatName = that.getName();
+
+ if (Utils.isEmpty(thisName)) {
+ if (Utils.isEmpty(thatName)) {
+ return 0;
+ }
+
+ // thatName is not empty
+ return 1;
+ }
+
+ // thisName is not empty
+ if (thatName == null) {
+ return 1;
+ }
+
+ // thisName and thatName are not empty
+ return thisName.compareTo(thatName);
+ }
+
+ /**
+ * @param notationType the notation type being requested (cannot be <code>null</code>)
+ * @return the CND notation (never <code>null</code>)
+ */
+ public String getAttributesCndNotation( final NotationType notationType ) {
+ final String cndNotation = this.attributes.toCndNotation(notationType);
+
+ if (cndNotation == null) {
+ return Utils.EMPTY_STRING;
+ }
+
+ return cndNotation;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
* @see javax.jcr.nodetype.PropertyDefinition#getAvailableQueryOperators()
*/
@Override
@@ -320,21 +297,14 @@
* {@inheritDoc}
*
* @see javax.jcr.nodetype.ItemDefinition#getDeclaringNodeType()
+ * @throws UnsupportedOperationException if method is called
*/
@Override
public NodeType getDeclaringNodeType() {
- // TODO implement
- return null;
+ throw new UnsupportedOperationException();
}
/**
- * @return the default values (never <code>null</code>)
- */
- public List<String> getDefaultValuesAsStrings() {
- return this.defaultValues.getSupportedItems();
- }
-
- /**
* {@inheritDoc}
*
* @see javax.jcr.nodetype.PropertyDefinition#getDefaultValues()
@@ -344,6 +314,13 @@
return this.defaultValues.asJcrValues();
}
+ /**
+ * @return the default values (never <code>null</code>)
+ */
+ public List<String> getDefaultValuesAsStrings() {
+ return this.defaultValues.getSupportedItems();
+ }
+
private String getDelimiter() {
return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.PROPERTY_DEFINITION_ATTRIBUTES_DELIMITER);
}
@@ -373,6 +350,10 @@
return this.attributes.getOnParentVersion().asJcrValue();
}
+ private String getPrefixEndDelimiter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.PROPERTY_DEFINITION_END_PREFIX_DELIMITER);
+ }
+
/**
* {@inheritDoc}
*
@@ -391,8 +372,8 @@
* @return the attribute state (never <code>null</code>)
* @throws IllegalArgumentException if a property that does not have an attribute state is specified
*/
- public Value getState( PropertyName propertyName ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ public Value getState( final PropertyName propertyName ) {
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
if (PropertyName.AUTOCREATED == propertyName) {
return this.attributes.getAutocreated().get();
@@ -459,6 +440,14 @@
}
/**
+ * @param notationType
+ * @return the CND notation for the value constraints (never <code>null</code> but can be empty)
+ */
+ public String getValueConstraintsCndNotation( final NotationType notationType ) {
+ return this.valueConstraints.toCndNotation(notationType);
+ }
+
+ /**
* {@inheritDoc}
*
* @see javax.jcr.nodetype.ItemDefinition#isAutoCreated()
@@ -522,8 +511,8 @@
* @param propertyName the property being checked (cannot be <code>null</code>)
* @return <code>true</code> if property is a variant
*/
- public boolean isVariant( PropertyName propertyName ) {
- Utils.isNotNull(propertyName, "propertyName"); //$NON-NLS-1$
+ public boolean isVariant( final PropertyName propertyName ) {
+ Utils.verifyIsNotNull(propertyName, "propertyName"); //$NON-NLS-1$
if (PropertyName.ON_PARENT_VERSION == propertyName) {
return (this.attributes.getOnParentVersion() == OnParentVersion.VARIANT);
@@ -544,12 +533,12 @@
private void notifyChangeListeners( final PropertyName property,
final Object oldValue,
final Object newValue ) {
- PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
+ final PropertyChangeEvent event = new PropertyChangeEvent(this, property.toString(), oldValue, newValue);
for (final Object listener : this.listeners.toArray()) {
try {
((PropertyChangeListener)listener).propertyChange(event);
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO log this
this.listeners.remove(listener);
}
@@ -563,7 +552,7 @@
* @param defaultValueBeingRemoved the default value being removed (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeDefaultValue( String defaultValueBeingRemoved ) {
+ public boolean removeDefaultValue( final String defaultValueBeingRemoved ) {
if (this.defaultValues.remove(defaultValueBeingRemoved)) {
notifyChangeListeners(PropertyName.DEFAULT_VALUES, defaultValueBeingRemoved, null);
return true; // removed
@@ -576,8 +565,8 @@
* @param listener the listener being unregistered (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeListener( PropertyChangeListener listener ) {
- Utils.isNotNull(listener, "listener"); //$NON-NLS-1$
+ public boolean removeListener( final PropertyChangeListener listener ) {
+ Utils.verifyIsNotNull(listener, "listener"); //$NON-NLS-1$
return this.listeners.remove(listener);
}
@@ -585,7 +574,7 @@
* @param operator the query operator being removed (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeQueryOperator( QueryOperator operator ) {
+ public boolean removeQueryOperator( final QueryOperator operator ) {
if (this.attributes.getQueryOps().remove(operator)) {
notifyChangeListeners(PropertyName.QUERY_OPS, operator, null);
return true; // removed
@@ -601,7 +590,7 @@
* @param valueConstraintBeingRemoved the value constraint being removed (cannot be <code>null</code>)
* @return <code>true</code> if removed
*/
- public boolean removeValueConstraint( String valueConstraintBeingRemoved ) {
+ public boolean removeValueConstraint( final String valueConstraintBeingRemoved ) {
if (this.valueConstraints.remove(valueConstraintBeingRemoved)) {
notifyChangeListeners(PropertyName.VALUE_CONSTRAINTS, valueConstraintBeingRemoved, null);
return true; // removed
@@ -616,8 +605,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setAutoCreated(boolean)
*/
@Override
- public void setAutoCreated( boolean newAutocreated ) {
- AttributeState.Value newState = (newAutocreated ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
+ public void setAutoCreated( final boolean newAutocreated ) {
+ final AttributeState.Value newState = (newAutocreated ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
changeState(PropertyName.AUTOCREATED, newState);
}
@@ -627,18 +616,18 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setAvailableQueryOperators(java.lang.String[])
*/
@Override
- public void setAvailableQueryOperators( String[] newOperators ) {
- QueryOperators queryOps = this.attributes.getQueryOps();
- List<QueryOperator> oldOperators = queryOps.getSupportedItems();
+ public void setAvailableQueryOperators( final String[] newOperators ) {
+ final QueryOperators queryOps = this.attributes.getQueryOps();
+ final List<QueryOperator> oldOperators = queryOps.getSupportedItems();
boolean changed = queryOps.clear();
if (!Utils.isEmpty(newOperators)) {
- for (String operator : newOperators) {
+ for (final String operator : newOperators) {
try {
if (queryOps.add(operator.trim())) {
changed = true;
}
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO log the invalid query operator
}
}
@@ -655,17 +644,17 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setDefaultValues(javax.jcr.Value[])
*/
@Override
- public void setDefaultValues( javax.jcr.Value[] newDefaultValues ) {
- List<String> items = this.defaultValues.getSupportedItems();
+ public void setDefaultValues( final javax.jcr.Value[] newDefaultValues ) {
+ final List<String> items = this.defaultValues.getSupportedItems();
boolean changed = this.defaultValues.clear();
if (!Utils.isEmpty(newDefaultValues)) {
- for (javax.jcr.Value defaultValue : newDefaultValues) {
+ for (final javax.jcr.Value defaultValue : newDefaultValues) {
try {
if (this.defaultValues.add(defaultValue.getString())) {
changed = true;
}
- } catch (Exception e) {
+ } catch (final Exception e) {
// TODO log this
}
}
@@ -682,8 +671,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setFullTextSearchable(boolean)
*/
@Override
- public void setFullTextSearchable( boolean newFullTextSearchable ) {
- AttributeState.Value newState = (newFullTextSearchable ? AttributeState.Value.IS_NOT : AttributeState.Value.IS);
+ public void setFullTextSearchable( final boolean newFullTextSearchable ) {
+ final AttributeState.Value newState = (newFullTextSearchable ? AttributeState.Value.IS_NOT : AttributeState.Value.IS);
changeState(PropertyName.NO_FULL_TEXT, newState);
}
@@ -693,8 +682,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setMandatory(boolean)
*/
@Override
- public void setMandatory( boolean newMandatory ) {
- AttributeState.Value newState = (newMandatory ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
+ public void setMandatory( final boolean newMandatory ) {
+ final AttributeState.Value newState = (newMandatory ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
changeState(PropertyName.MANDATORY, newState);
}
@@ -704,8 +693,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setMultiple(boolean)
*/
@Override
- public void setMultiple( boolean newMultiple ) {
- AttributeState.Value newState = (newMultiple ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
+ public void setMultiple( final boolean newMultiple ) {
+ final AttributeState.Value newState = (newMultiple ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
changeState(PropertyName.MULTIPLE, newState);
}
@@ -713,8 +702,8 @@
* @param newName the new node name (can be <code>null</code> or empty)
*/
@Override
- public void setName( String newName ) {
- Object oldValue = this.name.get();
+ public void setName( final String newName ) {
+ final Object oldValue = getName();
if (this.name.set(newName)) {
notifyChangeListeners(PropertyName.NAME, oldValue, newName);
@@ -727,8 +716,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setOnParentVersion(int)
*/
@Override
- public void setOnParentVersion( int newOpv ) {
- OnParentVersion oldValue = this.attributes.getOnParentVersion();
+ public void setOnParentVersion( final int newOpv ) {
+ final OnParentVersion oldValue = this.attributes.getOnParentVersion();
if (this.attributes.setOnParentVersion(OnParentVersion.findUsingJcrValue(newOpv))) {
notifyChangeListeners(PropertyName.ON_PARENT_VERSION, oldValue, newOpv);
@@ -741,8 +730,8 @@
* @param newOpv the new OPV value (cannot be <code>null</code>)
* @return <code>true</code> if successfully changed
*/
- public boolean setOnParentVersion( String newOpv ) {
- OnParentVersion oldValue = this.attributes.getOnParentVersion();
+ public boolean setOnParentVersion( final String newOpv ) {
+ final OnParentVersion oldValue = this.attributes.getOnParentVersion();
if (this.attributes.setOnParentVersion(OnParentVersion.find(newOpv))) {
notifyChangeListeners(PropertyName.ON_PARENT_VERSION, oldValue, newOpv);
@@ -758,8 +747,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setProtected(boolean)
*/
@Override
- public void setProtected( boolean newProtected ) {
- AttributeState.Value newState = (newProtected ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
+ public void setProtected( final boolean newProtected ) {
+ final AttributeState.Value newState = (newProtected ? AttributeState.Value.IS : AttributeState.Value.IS_NOT);
changeState(PropertyName.PROTECTED, newState);
}
@@ -769,8 +758,8 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setQueryOrderable(boolean)
*/
@Override
- public void setQueryOrderable( boolean newQueryOrderable ) {
- AttributeState.Value newState = (newQueryOrderable ? AttributeState.Value.IS_NOT : AttributeState.Value.IS);
+ public void setQueryOrderable( final boolean newQueryOrderable ) {
+ final AttributeState.Value newState = (newQueryOrderable ? AttributeState.Value.IS_NOT : AttributeState.Value.IS);
changeState(PropertyName.NO_QUERY_ORDER, newState);
}
@@ -780,7 +769,7 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setRequiredType(int)
*/
@Override
- public void setRequiredType( int newPropertyType ) {
+ public void setRequiredType( final int newPropertyType ) {
setType(PropertyType.findUsingJcrValue(newPropertyType));
}
@@ -790,9 +779,9 @@
* @param newType the proposed new type (cannot be <code>null</code>)
* @return <code>true</code> if the type was changed
*/
- public boolean setType( PropertyType newType ) {
+ public boolean setType( final PropertyType newType ) {
if (this.type != newType) {
- PropertyType oldValue = this.type;
+ final PropertyType oldValue = this.type;
this.type = newType;
notifyChangeListeners(PropertyName.TYPE, oldValue, this.type);
return true; // type changed
@@ -807,12 +796,12 @@
* @see javax.jcr.nodetype.PropertyDefinitionTemplate#setValueConstraints(java.lang.String[])
*/
@Override
- public void setValueConstraints( String[] newConstraints ) {
- List<String> items = this.valueConstraints.getSupportedItems();
+ public void setValueConstraints( final String[] newConstraints ) {
+ final List<String> items = this.valueConstraints.getSupportedItems();
boolean changed = this.valueConstraints.clear();
if (!Utils.isEmpty(newConstraints)) {
- for (String constraint : newConstraints) {
+ for (final String constraint : newConstraints) {
if (this.valueConstraints.add(constraint)) {
changed = true;
}
@@ -830,43 +819,85 @@
* @see org.jboss.tools.modeshape.jcr.cnd.CndElement#toCndNotation(org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType)
*/
@Override
- public String toCndNotation( NotationType notationType ) {
- StringBuilder builder = new StringBuilder(NOTATION_PREFIX);
+ public String toCndNotation( final NotationType notationType ) {
+ final StringBuilder builder = new StringBuilder(NOTATION_PREFIX);
+ builder.append(getPrefixEndDelimiter());
+
final String DELIM = getDelimiter();
- { // name
- builder.append(this.name.toCndNotation(notationType));
- }
+ builder.append(this.name.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.type.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.defaultValues.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.attributes.toCndNotation(notationType));
+ Utils.build(builder, true, DELIM, this.valueConstraints.toCndNotation(notationType));
- { // type
- builder.append(DELIM).append(getType().toCndNotation(notationType));
- }
+ return builder.toString();
+ }
- { // default values
- String notation = this.defaultValues.toCndNotation(notationType);
+ /**
+ * The property names whose <code>toString()</code> is used in {@link PropertyChangeEvent}s.
+ */
+ public enum PropertyName {
- if (!Utils.isEmpty(notation)) {
- builder.append(DELIM).append(notation);
- }
- }
+ /**
+ * The autocreated attribute.
+ */
+ AUTOCREATED,
- { // attributes
- String notation = this.attributes.toCndNotation(notationType);
+ /**
+ * A collection of default values.
+ */
+ DEFAULT_VALUES,
- if (!Utils.isEmpty(notation)) {
- builder.append(DELIM).append(notation);
- }
- }
+ /**
+ * The mandatory attribute.
+ */
+ MANDATORY,
- { // value constraints
- String notation = this.valueConstraints.toCndNotation(notationType);
+ /**
+ * The multiple attribute.
+ */
+ MULTIPLE,
- if (!Utils.isEmpty(notation)) {
- builder.append(DELIM).append(notation);
- }
- }
+ /**
+ * The property name.
+ */
+ NAME,
- return builder.toString();
+ /**
+ * The does not support full text search attribute.
+ */
+ NO_FULL_TEXT,
+
+ /**
+ * The does not support query order attribute.
+ */
+ NO_QUERY_ORDER,
+
+ /**
+ * The on parent version value.
+ */
+ ON_PARENT_VERSION,
+
+ /**
+ * The protected attribute.
+ */
+ PROTECTED,
+
+ /**
+ * The collection of supported query operators.
+ */
+ QUERY_OPS,
+
+ /**
+ * The property type.
+ */
+ TYPE,
+
+ /**
+ * The collection of property constraints.
+ */
+ VALUE_CONSTRAINTS
}
}
Added: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedName.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedName.java (rev 0)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedName.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -0,0 +1,284 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ *
+ * See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
+ *
+ * See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
+ */
+package org.jboss.tools.modeshape.jcr.cnd;
+
+import org.jboss.tools.modeshape.jcr.Utils;
+import org.jboss.tools.modeshape.jcr.cnd.LocalName.Mode;
+
+/**
+ * A name that may or may not have a qualifier.
+ */
+public class QualifiedName implements CndElement, Comparable<QualifiedName> {
+
+ /**
+ * The character that separates the qualifier and the local name. Value is {@value} ;
+ */
+ public static final char DELIM = ':';
+
+ /**
+ * A string representation of the {@link #DELIM delimiter character}.
+ */
+ public static final String DELIM_STRING = Character.toString(DELIM);
+
+ /**
+ * @param qualifiedName the qualified name being parsed (can be <code>null</code> or empty)
+ * @return the qualified name (never <code>null</code>)
+ */
+ public static QualifiedName parse( final String qualifiedName ) {
+ String qualifier = null;
+ String name = null;
+
+ if (!Utils.isEmpty(qualifiedName)) {
+ final int index = qualifiedName.indexOf(DELIM_STRING);
+
+ if ((index == -1) || (qualifiedName.length() == 1)) {
+ name = qualifiedName;
+ } else {
+ qualifier = qualifiedName.substring(0, index);
+
+ if ((index + 1) <= qualifiedName.length()) {
+ name = qualifiedName.substring(index + 1);
+ }
+ }
+ }
+
+ return new QualifiedName(qualifier, name);
+ }
+
+ /**
+ * The quotation mode for the CND notation.
+ */
+ private Mode mode = Mode.UNQOUTED;
+
+ /**
+ * The part of the name that comes after the delimiter (never <code>null</code>).
+ */
+ private final LocalName name;
+
+ /**
+ * The part of the name that comes before the delimiter (never <code>null</code>).
+ */
+ private final LocalName qualifier;
+
+ /**
+ * Constructs a qualified name with an empty qualifier and an empty unqualified name.
+ */
+ public QualifiedName() {
+ this.qualifier = new LocalName();
+ this.name = new LocalName();
+ }
+
+ /**
+ * @param initialQualifier the local name that is the qualifier (can be <code>null</code> or empty)
+ * @param initialUnqualifiedName the local name without a qualifier (can be <code>null</code> or empty)
+ */
+ public QualifiedName( final String initialQualifier,
+ final String initialUnqualifiedName ) {
+ this();
+ this.qualifier.set(initialQualifier);
+ this.name.set(initialUnqualifiedName);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ @Override
+ public int compareTo( final QualifiedName that ) {
+ if (equals(that)) {
+ return 0;
+ }
+
+ final int qualifierResult = this.qualifier.compareTo(that.qualifier);
+ final int nameResult = this.name.compareTo(that.name);
+
+ if (qualifierResult < 0) {
+ // less than qualifier and less than name
+ if (nameResult < 0) {
+ return -1000;
+ }
+
+ // less than qualifier and equal to name
+ if (nameResult == 0) {
+ return -100;
+ }
+
+ // less than qualifier and greater than name
+ return -10;
+ }
+
+ if (qualifierResult == 0) {
+ // equal to qualifier and less than name
+ if (nameResult < 0) {
+ return -1;
+ }
+
+ // equal to qualifier and equal to name
+ if (nameResult == 0) {
+ return 0;
+ }
+
+ // equal to qualifier and greater than name
+ return 1;
+ }
+
+ // greater than qualifier and less than name
+ if (nameResult < 0) {
+ return 10;
+ }
+
+ // greater than qualifier and equal to name
+ if (nameResult == 0) {
+ return 100;
+ }
+
+ // greater than qualifier and greater than name
+ return 1000;
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#equals(java.lang.Object)
+ */
+ @Override
+ public boolean equals( final Object obj ) {
+ if (this == obj) {
+ return true;
+ }
+
+ if ((obj == null) || !getClass().equals(obj.getClass())) {
+ return false;
+ }
+
+ final QualifiedName that = (QualifiedName)obj;
+ return (this.qualifier.equals(that.qualifier) && this.name.equals(that.name));
+ }
+
+ /**
+ * If there is no qualifier, just the unqualified name is returned (no preceding delimiter). If there is only a qualifier, the
+ * qualifier and the delimiter is returned. If there is neither a qualifier or an unqualified name, an empty string is returned.
+ *
+ * @return the unqualified name (never <code>null</code> but can be empty)
+ */
+ public String get() {
+ final StringBuilder builder = new StringBuilder();
+ final String qualifierString = ((getQualifier() == null) ? Utils.EMPTY_STRING : getQualifier());
+ final String nameString = ((getUnqualifiedName() == null) ? Utils.EMPTY_STRING : getUnqualifiedName());
+
+ if (!Utils.isEmpty(qualifierString)) {
+ builder.append(qualifierString);
+ builder.append(DELIM);
+ }
+
+ if (!Utils.isEmpty(nameString)) {
+ builder.append(nameString);
+ }
+
+ return builder.toString();
+ }
+
+ /**
+ * @return the qualifier part (can be <code>null</code> or empty)
+ */
+ public String getQualifier() {
+ return this.qualifier.get();
+ }
+
+ /**
+ * @return the unqualified name part (can be <code>null</code> or empty)
+ */
+ public String getUnqualifiedName() {
+ return this.name.get();
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#hashCode()
+ */
+ @Override
+ public int hashCode() {
+ return Utils.hashCode(this.qualifier, this.name);
+ }
+
+ /**
+ * @param newQualifiedName the proposed new qualified name (can be <code>null</code> or empty)
+ * @return <code>true</code> if either the qualifier or unqualified name was changed
+ */
+ public boolean set( final String newQualifiedName ) {
+ final QualifiedName temp = QualifiedName.parse(newQualifiedName);
+ final boolean qualifierChanged = setQualifier(temp.getQualifier());
+ final boolean nameChanged = setUnqualifiedName(temp.getUnqualifiedName());
+ return (qualifierChanged || nameChanged);
+ }
+
+ /**
+ * @param newMode the new mode (cannot be <code>null</code>)
+ * @return <code>true</code> if the mode was changed
+ */
+ public boolean setMode( final Mode newMode ) {
+ Utils.verifyIsNotNull(newMode, "newMode"); //$NON-NLS-1$
+
+ if (this.mode != newMode) {
+ this.mode = newMode;
+ return true;
+ }
+
+ return false;
+ }
+
+ /**
+ * @param newQualifier the proposed new qualifier (can be <code>null</code> or empty)
+ * @return <code>true</code> if the qualifier part was changed
+ */
+ public boolean setQualifier( final String newQualifier ) {
+ return this.qualifier.set(newQualifier);
+ }
+
+ /**
+ * @param newUnqualifiedName the proposed new unqualified name (can be <code>null</code> or empty)
+ * @return <code>true</code> if the unqualified name part was changed
+ */
+ public boolean setUnqualifiedName( final String newUnqualifiedName ) {
+ return this.name.set(newUnqualifiedName);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.jboss.tools.modeshape.jcr.cnd.CndElement#toCndNotation(org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType)
+ */
+ @Override
+ public String toCndNotation( final NotationType notationType ) {
+ final String unqualifiedName = get();
+
+ if (Utils.isEmpty(unqualifiedName)) {
+ return Utils.EMPTY_STRING;
+ }
+
+ Mode notationMode = this.mode;
+
+ if ((this.mode == Mode.UNQOUTED) && unqualifiedName.contains(Utils.SPACE_STRING)) {
+ notationMode = Mode.SINGLE_QUOTED;
+ }
+
+ return (notationMode + unqualifiedName + notationMode);
+ }
+
+ /**
+ * {@inheritDoc}
+ *
+ * @see java.lang.Object#toString()
+ */
+ @Override
+ public String toString() {
+ return get();
+ }
+}
Property changes on: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedName.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/AttributeState.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/AttributeState.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/AttributeState.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -16,27 +16,6 @@
public abstract class AttributeState implements CndElement {
/**
- * The attribute state possible values.
- */
- public enum Value {
-
- /**
- * Indicates the attribute is supported.
- */
- IS,
-
- /**
- * Indicates the attribute is not supported.
- */
- IS_NOT,
-
- /**
- * Indicates the attribute is a variant.
- */
- VARIANT
- }
-
- /**
* The character used in CND notation to indicate the attribute is a variant.
*/
public static final char VARIANT_CHAR = '?';
@@ -139,7 +118,7 @@
* @return <code>true</code> if state was changed
*/
public boolean set( final Value newState ) {
- Utils.isNotNull(newState, "newState"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newState, "newState"); //$NON-NLS-1$
if (this.state != newState) {
this.state = newState;
@@ -188,4 +167,25 @@
return cndNotation + AttributeState.VARIANT_CHAR;
}
+
+ /**
+ * The attribute state possible values.
+ */
+ public enum Value {
+
+ /**
+ * Indicates the attribute is supported.
+ */
+ IS,
+
+ /**
+ * Indicates the attribute is not supported.
+ */
+ IS_NOT,
+
+ /**
+ * Indicates the attribute is a variant.
+ */
+ VARIANT
+ }
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultType.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultType.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultType.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -8,6 +8,8 @@
package org.jboss.tools.modeshape.jcr.cnd.attributes;
import org.jboss.tools.modeshape.jcr.Utils;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences.Preference;
import org.jboss.tools.modeshape.jcr.cnd.LocalName;
/**
@@ -76,15 +78,29 @@
*/
@Override
protected String getLongCndNotation() {
+ if (isVariant()) {
+ return getPrefix();
+ }
+
String defaultType = getDefaultType();
if (Utils.isEmpty(defaultType)) {
- return NOTATION;
+ return Utils.EMPTY_STRING;
}
- return NOTATION + defaultType;
+ return getPrefix() + defaultType;
}
+ private String getPrefix() {
+ String delim = CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_TYPE_END_PREFIX_DELIMITER);
+
+ if (Utils.isEmpty(delim)) {
+ return NOTATION;
+ }
+
+ return (NOTATION + delim);
+ }
+
/**
* {@inheritDoc} <strong>Can only be used to change to a variant state. Use {@link DefaultType#setDefaultType(String)} to set to
* other states</strong>
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultValues.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultValues.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/DefaultValues.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -10,6 +10,8 @@
import java.util.Collection;
import org.jboss.tools.modeshape.jcr.Utils;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences.Preference;
/**
*
@@ -51,4 +53,13 @@
return NOTATION_PREFIX;
}
+ /**
+ * {@inheritDoc}
+ *
+ * @see org.jboss.tools.modeshape.jcr.cnd.attributes.ListAttributeState#getQuoteCharacter()
+ */
+ @Override
+ protected String getQuoteCharacter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_QUOTE_CHARACTER);
+ }
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ListAttributeState.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ListAttributeState.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ListAttributeState.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -32,7 +32,7 @@
* @return <code>true</code> if successfully added
*/
public boolean add( final E item ) {
- Utils.isNotNull(item, "item"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(item, "item"); //$NON-NLS-1$
if (this.supported == null) {
this.supported = new ArrayList<E>();
@@ -138,6 +138,13 @@
}
/**
+ * @return the quote character (empty, single, or double) surrounding each item of the list (cannot be <code>null</code>)
+ */
+ protected String getItemQuoteCharacter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
+ }
+
+ /**
* @return the delimiter used after the list prefix (never <code>null</code> but can be empty)
*/
protected String getListPrefixEndDelimiter() {
@@ -155,6 +162,13 @@
}
/**
+ * @return the quote character (empty, single, double) surrounding the elements of the list (cannot be <code>null</code>)
+ */
+ protected String getQuoteCharacter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR);
+ }
+
+ /**
* @return the collection of supported items (never <code>null</code>)
*/
public List<E> getSupportedItems() {
@@ -190,7 +204,7 @@
* @return <code>true</code> if successfully removed
*/
public boolean remove( final E item ) {
- Utils.isNotNull(item, "item"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(item, "item"); //$NON-NLS-1$
if (this.supported == null) {
return false;
@@ -236,29 +250,29 @@
return Utils.EMPTY_STRING;
}
- if (items.size() == 1) {
- final E firstItem = items.iterator().next();
-
- if (firstItem instanceof CndElement) {
- return ((CndElement)firstItem).toCndNotation(notationType);
- }
-
- return firstItem.toString();
- }
-
+ final String itemQuote = getItemQuoteCharacter();
+ final boolean useQuote = !Utils.isEmpty(itemQuote);
final StringBuilder builder = new StringBuilder();
for (final Iterator<E> itr = items.iterator(); itr.hasNext();) {
final E item = itr.next();
+ if (useQuote) {
+ builder.append(itemQuote);
+ }
+
if (item instanceof CndElement) {
builder.append(((CndElement)item).toCndNotation(notationType));
} else {
builder.append(item.toString());
}
+ if (useQuote) {
+ builder.append(itemQuote);
+ }
+
if (itr.hasNext()) {
- builder.append(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER);
+ builder.append(CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER));
}
}
@@ -270,7 +284,7 @@
* @return <code>true</code> if item is contained in list
*/
public boolean supports( final E item ) {
- Utils.isNotNull(item, "item"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(item, "item"); //$NON-NLS-1$
return this.supported.contains(item);
}
@@ -298,9 +312,9 @@
builder.append(AttributeState.VARIANT_CHAR);
} else {
// add the delimited list
- builder.append(CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR));
+ builder.append(getQuoteCharacter());
builder.append(supportedItemsCndNotation(notationType));
- builder.append(CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR));
+ builder.append(getQuoteCharacter());
}
if (!Utils.isEmpty(getCndNotationSuffix(notationType))) {
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeAttributes.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeAttributes.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeAttributes.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -130,7 +130,7 @@
* @return <code>true</code> if changed
*/
public boolean setOnParentVersion( final OnParentVersion newOpv ) {
- Utils.isNotNull(newOpv, "newOpv"); //$NON-NLS-1$
+ Utils.verifyIsNotNull(newOpv, "newOpv"); //$NON-NLS-1$
if (this.opv != newOpv) {
this.opv = newOpv;
@@ -163,75 +163,27 @@
*/
@Override
public String toCndNotation( final NotationType notationType ) {
- final String delim = getFormatDelimiter();
+ final String DELIM = getFormatDelimiter();
final StringBuilder builder = new StringBuilder();
- boolean addDelim = false;
- { // autocreated
- if (addDelim) {
- builder.append(delim);
- }
+ boolean addDelim = Utils.build(builder, false, DELIM, this.autocreated.toCndNotation(notationType));
- final String notation = this.autocreated.toCndNotation(notationType);
-
- if (!Utils.isEmpty(notation)) {
- builder.append(notation);
- addDelim = true;
- }
+ if (Utils.build(builder, addDelim, DELIM, this.mandatory.toCndNotation(notationType))) {
+ addDelim = true;
}
- { // mandatory
- if (addDelim) {
- builder.append(delim);
- }
-
- final String notation = this.mandatory.toCndNotation(notationType);
-
- if (!Utils.isEmpty(notation)) {
- builder.append(notation);
- addDelim = true;
- }
+ if (Utils.build(builder, addDelim, DELIM, this.notDeletable.toCndNotation(notationType))) {
+ addDelim = true;
}
- { // protected
- if (addDelim) {
- builder.append(delim);
- }
-
- final String notation = this.notDeletable.toCndNotation(notationType);
-
- if (!Utils.isEmpty(notation)) {
- builder.append(notation);
- addDelim = true;
- }
+ if (Utils.build(builder, addDelim, DELIM, this.opv.toCndNotation(notationType))) {
+ addDelim = true;
}
- { // on parent value
- if (addDelim) {
- builder.append(delim);
- }
-
- final String notation = this.opv.toCndNotation(notationType);
-
- if (!Utils.isEmpty(notation)) {
- builder.append(notation);
- addDelim = true;
- }
+ if (Utils.build(builder, addDelim, DELIM, this.sns.toCndNotation(notationType))) {
+ addDelim = true;
}
- { // same name siblings
- if (addDelim) {
- builder.append(delim);
- }
-
- final String notation = this.sns.toCndNotation(notationType);
-
- if (!Utils.isEmpty(notation)) {
- builder.append(notation);
- addDelim = true;
- }
- }
-
return builder.toString().trim();
}
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeTypeAttributes.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeTypeAttributes.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/NodeTypeAttributes.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -102,7 +102,7 @@
}
private String getFormatDelimiter() {
- return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.NODE_TYPE_DEFINITION_ATTRIBUTES_DELIMITER);
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.NODE_TYPE_DEFINITION_ATTRIBUTES_END_DELIMITER);
}
/**
@@ -204,11 +204,23 @@
final StringBuilder builder = new StringBuilder();
boolean addDelim = Utils.build(builder, false, DELIM, this.orderable.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.mixin.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.notConcrete.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.queryable.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.primaryItem.toCndNotation(notationType));
+ if (Utils.build(builder, addDelim, DELIM, this.mixin.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.notConcrete.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.queryable.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.primaryItem.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
return builder.toString().trim();
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyAttributes.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyAttributes.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyAttributes.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -266,14 +266,35 @@
StringBuilder builder = new StringBuilder();
boolean addDelim = Utils.build(builder, false, DELIM, this.autocreated.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.mandatory.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.notDeletable.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.multiple.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.opv.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.noFullText.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.noQueryOrder.toCndNotation(notationType));
- addDelim = Utils.build(builder, addDelim, DELIM, this.queryOps.toCndNotation(notationType));
+ if (Utils.build(builder, addDelim, DELIM, this.mandatory.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.notDeletable.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.multiple.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.opv.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.noFullText.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.noQueryOrder.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
+ if (Utils.build(builder, addDelim, DELIM, this.queryOps.toCndNotation(notationType))) {
+ addDelim = true;
+ }
+
return builder.toString().trim();
}
}
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyType.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyType.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/PropertyType.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -203,14 +203,4 @@
return builder.append(NOTATION_SUFFIX).toString();
}
-
- /**
- * {@inheritDoc}
- *
- * @see java.lang.Enum#toString()
- */
- @Override
- public String toString() {
- return javax.jcr.PropertyType.nameFromValue(asJcrValue());
- }
}
\ No newline at end of file
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypes.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypes.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypes.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -10,11 +10,12 @@
import java.util.List;
import org.jboss.tools.modeshape.jcr.Utils;
+import org.jboss.tools.modeshape.jcr.cnd.QualifiedName;
/**
* The required types of a child node definition.
*/
-public final class RequiredTypes extends ListAttributeState<String> {
+public final class RequiredTypes extends ListAttributeState<QualifiedName> {
/**
* The CND list prefix.
@@ -60,7 +61,7 @@
* @return the collection of required types (never <code>null</code>)
*/
public String[] toArray() {
- final List<String> typeNames = getSupportedItems();
+ final List<QualifiedName> typeNames = getSupportedItems();
if (Utils.isEmpty(typeNames)) {
return Utils.EMPTY_STRING_ARRAY;
@@ -69,8 +70,8 @@
final String[] result = new String[typeNames.size()];
int i = 0;
- for (final String typeName : typeNames) {
- result[i++] = typeName;
+ for (final QualifiedName typeName : typeNames) {
+ result[i++] = typeName.get();
}
return result;
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ValueConstraints.java
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ValueConstraints.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/cnd/attributes/ValueConstraints.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -10,6 +10,8 @@
import java.util.List;
import org.jboss.tools.modeshape.jcr.Utils;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences.Preference;
/**
* The value constraints of a property definition.
@@ -32,6 +34,16 @@
}
/**
+ * {@inheritDoc}
+ *
+ * @see org.jboss.tools.modeshape.jcr.cnd.attributes.ListAttributeState#getItemQuoteCharacter()
+ */
+ @Override
+ protected String getItemQuoteCharacter() {
+ return CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER);
+ }
+
+ /**
* @return the collection of value constraints (never <code>null</code>)
*/
public String[] toArray() {
Modified: trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties
===================================================================
--- trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/plugins/org.jboss.tools.modeshape.jcr/src/org/jboss/tools/modeshape/jcr/messages.properties 2012-03-14 21:11:58 UTC (rev 39516)
@@ -49,6 +49,8 @@
emptyRequiredTypes = The child node definition "{0}" must have at least one required type.
# 0 = node type definition name
emptySuperTypes = The node type definition "{0}" must have at least one super type.
+# 0 = name or type of qualified name
+emptyUnqualifiedName = The "{0}" qualified name has an empty unqualified name.
# 0 = property or attribute name of a node type definition, property definition, or child node definition
emptyValue = A "{0}" value cannot be empty
# 0 = property definition name
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinitionTest.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinitionTest.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/ChildNodeDefinitionTest.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -12,9 +12,6 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertTrue;
-import java.util.Collection;
-import java.util.Collections;
-
import org.jboss.tools.modeshape.jcr.Listener;
import org.jboss.tools.modeshape.jcr.Utils;
import org.jboss.tools.modeshape.jcr.cnd.ChildNodeDefinition.PropertyName;
@@ -187,7 +184,7 @@
public void shouldReceiveEventAfterClearingSuperTypes() {
final String REQUIRED_TYPE = "requiredType"; //$NON-NLS-1$
assertTrue(this.childNodeDefinition.addRequiredType(REQUIRED_TYPE));
- Collection<String> oldValue = Collections.singletonList(REQUIRED_TYPE);
+ String[] oldValue = new String[] {REQUIRED_TYPE};
Listener l = new Listener();
assertTrue(this.childNodeDefinition.addListener(l));
@@ -196,7 +193,7 @@
assertEquals(1, l.getCount());
assertEquals(PropertyName.REQUIRED_TYPES.toString(), l.getPropertyName());
assertNull(l.getNewValue());
- assertEquals(oldValue, l.getOldValue());
+ assertEquals(oldValue[0], ((String[])l.getOldValue())[0]);
}
@Test
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/Constants.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/Constants.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/Constants.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -8,6 +8,7 @@
package org.jboss.tools.modeshape.jcr.cnd;
import org.jboss.tools.modeshape.jcr.cnd.CndElement.NotationType;
+import org.jboss.tools.modeshape.jcr.cnd.CndNotationPreferences.Preference;
import org.jboss.tools.modeshape.jcr.cnd.attributes.Abstract;
import org.jboss.tools.modeshape.jcr.cnd.attributes.AttributeState;
import org.jboss.tools.modeshape.jcr.cnd.attributes.Autocreated;
@@ -21,6 +22,7 @@
import org.jboss.tools.modeshape.jcr.cnd.attributes.Orderable;
import org.jboss.tools.modeshape.jcr.cnd.attributes.PrimaryItem;
import org.jboss.tools.modeshape.jcr.cnd.attributes.Protected;
+import org.jboss.tools.modeshape.jcr.cnd.attributes.QueryOperators;
import org.jboss.tools.modeshape.jcr.cnd.attributes.QueryOperators.QueryOperator;
import org.jboss.tools.modeshape.jcr.cnd.attributes.RequiredTypes;
import org.jboss.tools.modeshape.jcr.cnd.attributes.SameNameSiblings;
@@ -32,6 +34,18 @@
*/
public interface Constants {
+ String QUALIFIER1 = "QUALIFIER1"; //$NON-NLS-1$
+ String QUALIFIER2 = "QUALIFIER2"; //$NON-NLS-1$
+ String QUALIFIER3 = "QUALIFIER3"; //$NON-NLS-1$
+
+ String UNQUALIFIED_NAME1 = "UNQUALIFIED_NAME1"; //$NON-NLS-1$
+ String UNQUALIFIED_NAME2 = "UNQUALIFIED_NAME2"; //$NON-NLS-1$
+ String UNQUALIFIED_NAME3 = "UNQUALIFIED_NAME3"; //$NON-NLS-1$
+
+ QualifiedName QUALIFIED_NAME1 = new QualifiedName(QUALIFIER1, UNQUALIFIED_NAME1);
+ QualifiedName QUALIFIED_NAME2 = new QualifiedName(QUALIFIER2, UNQUALIFIED_NAME2);
+ QualifiedName QUALIFIED_NAME3 = new QualifiedName(QUALIFIER3, UNQUALIFIED_NAME3);
+
String VARIANT = AttributeState.VARIANT_STRING;
String ABSTRACT_VARIANT_COMPACT_FORM = Abstract.NOTATION[NotationType.COMPACT_INDEX] + VARIANT;
@@ -42,9 +56,11 @@
String AUTOCREATED_VARIANT_COMPRESSED_FORM = Autocreated.NOTATION[NotationType.COMPRESSED_INDEX] + VARIANT;
String AUTOCREATED_VARIANT_LONG_FORM = Autocreated.NOTATION[NotationType.LONG_INDEX] + VARIANT;
- String DEFAULT_TYPE_VARIANT_FORM = DefaultType.NOTATION + VARIANT;
+ String DEFAULT_TYPE_VARIANT_FORM = DefaultType.NOTATION
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_TYPE_END_PREFIX_DELIMITER) + VARIANT;
String DEFAULT_TYPE = "jcr:data"; //$NON-NLS-1$
- String DEFAULT_TYPE_TYPE_FORM = DefaultType.NOTATION + DEFAULT_TYPE;
+ String DEFAULT_TYPE_TYPE_FORM = DefaultType.NOTATION
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_TYPE_END_PREFIX_DELIMITER) + DEFAULT_TYPE;
String MANDATORY_VARIANT_COMPACT_FORM = Mandatory.NOTATION[NotationType.COMPACT_INDEX] + VARIANT;
String MANDATORY_VARIANT_COMPRESSED_FORM = Mandatory.NOTATION[NotationType.COMPRESSED_INDEX] + VARIANT;
@@ -82,37 +98,54 @@
String PROTECTED_VARIANT_COMPRESSED_FORM = Protected.NOTATION[NotationType.COMPRESSED_INDEX] + VARIANT;
String PROTECTED_VARIANT_LONG_FORM = Protected.NOTATION[NotationType.LONG_INDEX] + VARIANT;
- String QUERY_OPS_COMPACT_FORM = "qop"; //$NON-NLS-1$
- String QUERY_OPS_COMPRESSED_FORM = "qop"; //$NON-NLS-1$
- String QUERY_OPS_LONG_FORM = "queryops"; //$NON-NLS-1$
- String QUERY_OPS_VARIANT_COMPACT_FORM = QUERY_OPS_COMPACT_FORM + ' ' + VARIANT;
- String QUERY_OPS_VARIANT_COMPRESSED_FORM = QUERY_OPS_COMPRESSED_FORM + ' ' + VARIANT;
- String QUERY_OPS_VARIANT_LONG_FORM = QUERY_OPS_LONG_FORM + ' ' + VARIANT;
+ String QUERY_OPS_COMPACT_FORM = QueryOperators.NOTATION[NotationType.COMPACT_INDEX]
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER);
+ String QUERY_OPS_COMPRESSED_FORM = QueryOperators.NOTATION[NotationType.COMPRESSED_INDEX]
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER);
+ String QUERY_OPS_LONG_FORM = QueryOperators.NOTATION[NotationType.LONG_INDEX]
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER);
+ String QUERY_OPS_VARIANT_COMPACT_FORM = QUERY_OPS_COMPACT_FORM + VARIANT;
+ String QUERY_OPS_VARIANT_COMPRESSED_FORM = QUERY_OPS_COMPRESSED_FORM + VARIANT;
+ String QUERY_OPS_VARIANT_LONG_FORM = QUERY_OPS_LONG_FORM + VARIANT;
QueryOperator OPERATOR_ONE = QueryOperator.EQUALS;
QueryOperator OPERATOR_TWO = QueryOperator.GREATER_THAN;
QueryOperator OPERATOR_THREE = QueryOperator.LESS_THAN;
- String QUERY_OPS_ONE_OPERATOR_COMPACT_FORM = QUERY_OPS_COMPACT_FORM + " '" + OPERATOR_ONE.toCndNotation(NotationType.COMPACT) //$NON-NLS-1$
- + '\'';
- String QUERY_OPS_ONE_OPERATOR_COMPRESSED_FORM = QUERY_OPS_COMPRESSED_FORM + " '" //$NON-NLS-1$
- + OPERATOR_ONE.toCndNotation(NotationType.COMPRESSED) + '\'';
- String QUERY_OPS_ONE_OPERATOR_LONG_FORM = QUERY_OPS_LONG_FORM + " '" + OPERATOR_ONE.toCndNotation(NotationType.LONG) + '\''; //$NON-NLS-1$
+ String QUERY_OPS_ONE_OPERATOR_COMPACT_FORM = QUERY_OPS_COMPACT_FORM
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + OPERATOR_ONE.toCndNotation(NotationType.COMPACT)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
+ String QUERY_OPS_ONE_OPERATOR_COMPRESSED_FORM = QUERY_OPS_COMPRESSED_FORM
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + OPERATOR_ONE.toCndNotation(NotationType.COMPRESSED)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
+ String QUERY_OPS_ONE_OPERATOR_LONG_FORM = QUERY_OPS_LONG_FORM
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + OPERATOR_ONE.toCndNotation(NotationType.LONG)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
String QUERY_OPS_THREE_OPERATOR_COMPACT_FORM = QUERY_OPS_COMPACT_FORM
- + " '" + OPERATOR_ONE.toCndNotation(NotationType.COMPACT) //$NON-NLS-1$
- + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER + OPERATOR_TWO.toCndNotation(NotationType.COMPACT)
- + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER
- + OPERATOR_THREE.toCndNotation(NotationType.COMPACT) + '\'';
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + OPERATOR_ONE.toCndNotation(NotationType.COMPACT)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + OPERATOR_TWO.toCndNotation(NotationType.COMPACT)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + OPERATOR_THREE.toCndNotation(NotationType.COMPACT)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
String QUERY_OPS_THREE_OPERATOR_COMPRESSED_FORM = QUERY_OPS_COMPRESSED_FORM
- + " '" //$NON-NLS-1$
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ OPERATOR_ONE.toCndNotation(NotationType.COMPRESSED)
- + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ OPERATOR_TWO.toCndNotation(NotationType.COMPRESSED)
- + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER
- + OPERATOR_THREE.toCndNotation(NotationType.COMPRESSED) + '\'';
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + OPERATOR_THREE.toCndNotation(NotationType.COMPRESSED)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
String QUERY_OPS_THREE_OPERATOR_LONG_FORM = QUERY_OPS_LONG_FORM
- + " '" + OPERATOR_ONE.toCndNotation(NotationType.LONG) //$NON-NLS-1$
- + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER + OPERATOR_TWO.toCndNotation(NotationType.LONG)
- + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER + OPERATOR_THREE.toCndNotation(NotationType.LONG)
- + '\'';
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + OPERATOR_ONE.toCndNotation(NotationType.LONG)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + OPERATOR_TWO.toCndNotation(NotationType.LONG)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + OPERATOR_THREE.toCndNotation(NotationType.LONG)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR);
String SAME_NAME_SIBLINGS_VARIANT_COMPACT_FORM = SameNameSiblings.NOTATION[NotationType.COMPACT_INDEX] + VARIANT;
String SAME_NAME_SIBLINGS_VARIANT_COMPRESSED_FORM = SameNameSiblings.NOTATION[NotationType.COMPRESSED_INDEX] + VARIANT;
@@ -121,25 +154,68 @@
String ITEM_ONE = "item1"; //$NON-NLS-1$
String ITEM_TWO = "item2"; //$NON-NLS-1$
String ITEM_THREE = "item3"; //$NON-NLS-1$
- String ONE_ITEM_SINGLE_QUOTED_FORM = '\'' + ITEM_ONE + '\'';
- String THREE_ITEM_SINGLE_QUOTED_FORM = '\'' + ITEM_ONE + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER
- + ITEM_TWO + CndNotationPreferences.Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER + ITEM_THREE + '\'';
+ String ONE_ITEM_SINGLE_QUOTED_FORM = CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR)
+ + ITEM_ONE + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR);
+ String THREE_ITEM_SINGLE_QUOTED_FORM = CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR)
+ + ITEM_ONE + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER) + ITEM_TWO
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER) + ITEM_THREE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR);
- String DEFAULT_VALUES_VARIANT = DefaultValues.NOTATION_PREFIX + ' ' + VARIANT;
- String DEFAULT_VALUES_ONE_ITEM_FORM = DefaultValues.NOTATION_PREFIX + ' ' + ONE_ITEM_SINGLE_QUOTED_FORM;
- String DEFAULT_VALUES_THREE_ITEM_FORM = DefaultValues.NOTATION_PREFIX + ' ' + THREE_ITEM_SINGLE_QUOTED_FORM;
+ String DEFAULT_VALUES_VARIANT = DefaultValues.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_END_PREFIX_DELIMITER) + VARIANT;
+ String DEFAULT_VALUES_ONE_ITEM_FORM = DefaultValues.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_END_PREFIX_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_QUOTE_CHARACTER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR) + ITEM_ONE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_QUOTE_CHARACTER);
+ String DEFAULT_VALUES_THREE_ITEM_FORM = DefaultValues.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_END_PREFIX_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_QUOTE_CHARACTER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR) + ITEM_ONE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR) + ITEM_TWO
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR) + ITEM_THREE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ITEM_QUOTE_CHAR)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.DEFAULT_VALUES_QUOTE_CHARACTER);
String REQUIRED_TYPES_VARIANT = RequiredTypes.NOTATION_PREFIX + VARIANT + RequiredTypes.NOTATION_SUFFIX;
- String REQUIRED_TYPES_ONE_ITEM_FORM = RequiredTypes.NOTATION_PREFIX + ONE_ITEM_SINGLE_QUOTED_FORM
+ String REQUIRED_TYPES_ONE_ITEM_FORM = RequiredTypes.NOTATION_PREFIX + QUALIFIED_NAME1.get() + RequiredTypes.NOTATION_SUFFIX;
+ String REQUIRED_TYPES_THREE_ITEM_FORM = RequiredTypes.NOTATION_PREFIX + QUALIFIED_NAME1.get()
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER) + QUALIFIED_NAME2.get()
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER) + QUALIFIED_NAME3.get()
+ RequiredTypes.NOTATION_SUFFIX;
- String REQUIRED_TYPES_THREE_ITEM_FORM = RequiredTypes.NOTATION_PREFIX + THREE_ITEM_SINGLE_QUOTED_FORM
- + RequiredTypes.NOTATION_SUFFIX;
- String SUPER_TYPES_VARIANT = SuperTypes.NOTATION_PREFIX + ' ' + VARIANT;
- String SUPER_TYPES_ONE_ITEM_FORM = SuperTypes.NOTATION_PREFIX + ' ' + ONE_ITEM_SINGLE_QUOTED_FORM;
- String SUPER_TYPES_THREE_ITEM_FORM = SuperTypes.NOTATION_PREFIX + ' ' + THREE_ITEM_SINGLE_QUOTED_FORM;
+ String SUPER_TYPES_VARIANT = SuperTypes.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER) + VARIANT;
+ String SUPER_TYPES_ONE_ITEM_FORM = SuperTypes.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER)
+ + ONE_ITEM_SINGLE_QUOTED_FORM;
+ String SUPER_TYPES_THREE_ITEM_FORM = SuperTypes.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER)
+ + THREE_ITEM_SINGLE_QUOTED_FORM;
- String VALUE_CONSTRAINTS_VARIANT = ValueConstraints.NOTATION_PREFIX + ' ' + VARIANT;
- String VALUE_CONSTRAINTS_ONE_ITEM_FORM = ValueConstraints.NOTATION_PREFIX + ' ' + ONE_ITEM_SINGLE_QUOTED_FORM;
- String VALUE_CONSTRAINTS_THREE_ITEM_FORM = ValueConstraints.NOTATION_PREFIX + ' ' + THREE_ITEM_SINGLE_QUOTED_FORM;
+ String VALUE_CONSTRAINTS_VARIANT = ValueConstraints.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER) + VARIANT;
+ String VALUE_CONSTRAINTS_ONE_ITEM_FORM = ValueConstraints.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER) + ITEM_ONE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR);
+ String VALUE_CONSTRAINTS_THREE_ITEM_FORM = ValueConstraints.NOTATION_PREFIX
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_PREFIX_END_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER) + ITEM_ONE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER) + ITEM_TWO
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_ELEMENT_DELIMITER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER) + ITEM_THREE
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.VALUE_CONSTRAINTS_ITEM_QUOTE_CHARACTER)
+ + CndNotationPreferences.DEFAULT_PREFERENCES.get(Preference.ATTRIBUTE_LIST_QUOTE_CHAR);
}
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinitionTest.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinitionTest.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/NodeTypeDefinitionTest.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -430,13 +430,14 @@
Listener l = new Listener();
assertTrue(this.nodeTypeDefinition.addListener(l));
+ final String OLD_NAME = this.nodeTypeDefinition.getName();
final String NEW_NAME = "newName"; //$NON-NLS-1$
this.nodeTypeDefinition.setName(NEW_NAME);
assertEquals(1, l.getCount());
assertEquals(PropertyName.NAME.toString(), l.getPropertyName());
assertEquals(NEW_NAME, l.getNewValue());
- assertNull(l.getOldValue());
+ assertEquals(OLD_NAME, l.getOldValue());
}
@Test
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinitionTest.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinitionTest.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/PropertyDefinitionTest.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -479,13 +479,13 @@
Listener l = new Listener();
assertTrue(this.propDefn.addListener(l));
- final String NAME = "name"; //$NON-NLS-1$
- this.propDefn.setName(NAME);
+ final String NEW_NAME = "name"; //$NON-NLS-1$
+ this.propDefn.setName(NEW_NAME);
- assertEquals(NAME, this.propDefn.getName());
+ assertEquals(NEW_NAME, this.propDefn.getName());
assertEquals(1, l.getCount());
assertEquals(PropertyName.NAME.toString(), l.getPropertyName());
- assertEquals(NAME, l.getNewValue());
+ assertEquals(NEW_NAME, l.getNewValue());
assertNull(l.getOldValue());
}
Added: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedNameTest.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedNameTest.java (rev 0)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedNameTest.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ *
+ * See the LEGAL.txt file distributed with this work for information regarding copyright ownership and licensing.
+ *
+ * See the AUTHORS.txt file distributed with this work for a full listing of individual contributors.
+ */
+package org.jboss.tools.modeshape.jcr.cnd;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import org.jboss.tools.modeshape.jcr.Utils;
+import org.junit.Before;
+import org.junit.Test;
+
+public class QualifiedNameTest {
+
+ private QualifiedName qualifiedName;
+
+ @Before
+ public void beforeEach() {
+ this.qualifiedName = new QualifiedName();
+ }
+
+ @Test
+ public void noArgConstructorShouldNotHaveQualifier() {
+ assertTrue(Utils.isEmpty(this.qualifiedName.getQualifier()));
+ }
+
+ @Test
+ public void noArgConstructorShouldNotHaveUnqualifiedName() {
+ assertTrue(Utils.isEmpty(this.qualifiedName.getUnqualifiedName()));
+ }
+
+ @Test
+ public void shouldSetQualifierAtConstructor() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ this.qualifiedName = new QualifiedName(QUALIFIER, null);
+ assertEquals(QUALIFIER, this.qualifiedName.getQualifier());
+ }
+
+ @Test
+ public void shouldSetUnqualifiedNameAtConstructor() {
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ this.qualifiedName = new QualifiedName(null, NAME);
+ assertEquals(NAME, this.qualifiedName.getUnqualifiedName());
+ }
+
+ @Test
+ public void shouldAllowNullValuesAtConstructor() {
+ new QualifiedName(null, null);
+ }
+
+ @Test
+ public void shouldParseQualifiedName() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ final String QUALIFIED_NAME = QUALIFIER + QualifiedName.DELIM + NAME;
+ QualifiedName qualifiedName = QualifiedName.parse(QUALIFIED_NAME);
+ assertEquals(QUALIFIER, qualifiedName.getQualifier());
+ assertEquals(NAME, qualifiedName.getUnqualifiedName());
+ }
+
+ @Test
+ public void twoQualifiedNamesWithSameQualifierAndNameShouldBeEqual() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ QualifiedName qn1 = new QualifiedName(QUALIFIER, NAME);
+ QualifiedName qn2 = new QualifiedName(QUALIFIER, NAME);
+ assertEquals(qn1, qn2);
+ }
+
+ @Test
+ public void twoQualifiedNamesWithSameQualifierAndNameShouldHaveSameHashCode() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ QualifiedName qn1 = new QualifiedName(QUALIFIER, NAME);
+ QualifiedName qn2 = new QualifiedName(QUALIFIER, NAME);
+ assertEquals(qn1.hashCode(), qn2.hashCode());
+ }
+
+ @Test
+ public void twoQualifiedNamesWithSameQualifierAndDifferentNamesShouldNotBeEqual() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ QualifiedName qn1 = new QualifiedName(QUALIFIER, NAME);
+ QualifiedName qn2 = new QualifiedName(QUALIFIER, NAME + "Changed"); //$NON-NLS-1$
+ assertFalse(qn1.equals(qn2));
+ }
+
+ @Test
+ public void twoQualifiedNamesWithDifferentQualifiersAndSameNameShouldNotBeEqual() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ QualifiedName qn1 = new QualifiedName(QUALIFIER, NAME);
+ QualifiedName qn2 = new QualifiedName(QUALIFIER + "Changed", NAME); //$NON-NLS-1$
+ assertFalse(qn1.equals(qn2));
+ }
+
+ @Test
+ public void shouldSetWithQualifiedName() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ final String QUALIFIED_NAME = QUALIFIER + QualifiedName.DELIM + NAME;
+ assertTrue(this.qualifiedName.set(QUALIFIED_NAME));
+ assertEquals(QUALIFIER, this.qualifiedName.getQualifier());
+ assertEquals(NAME, this.qualifiedName.getUnqualifiedName());
+ }
+
+ @Test
+ public void shouldSetQualifier() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ assertTrue(this.qualifiedName.setQualifier(QUALIFIER));
+ assertEquals(QUALIFIER, this.qualifiedName.getQualifier());
+ }
+
+ @Test
+ public void shouldNotSetQualifierToSameValue() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ assertTrue(this.qualifiedName.setQualifier(QUALIFIER));
+ assertFalse(this.qualifiedName.setQualifier(QUALIFIER));
+ }
+
+ @Test
+ public void shouldSetUnqualifiedName() {
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ assertTrue(this.qualifiedName.setUnqualifiedName(NAME));
+ assertEquals(NAME, this.qualifiedName.getUnqualifiedName());
+ }
+
+ @Test
+ public void shouldNotSetUnqualifiedNameToSameValue() {
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ assertTrue(this.qualifiedName.setUnqualifiedName(NAME));
+ assertFalse(this.qualifiedName.setUnqualifiedName(NAME));
+ }
+
+ @Test
+ public void shouldNotHaveQualifierWhenSettingWithJustUnqualifiedName() {
+ final String NAME = "unqualifiedName"; //$NON-NLS-1$
+ assertTrue(this.qualifiedName.set(NAME));
+ assertTrue(Utils.isEmpty(this.qualifiedName.getQualifier()));
+ assertEquals(NAME, this.qualifiedName.getUnqualifiedName());
+ }
+
+ @Test
+ public void shouldNotHaveUnqualifiedNameWhenSettingWithJustQualifier() {
+ final String QUALIFIER = "qualifier"; //$NON-NLS-1$
+ assertTrue(this.qualifiedName.set(QUALIFIER + QualifiedName.DELIM));
+ assertTrue(Utils.isEmpty(this.qualifiedName.getUnqualifiedName()));
+ assertEquals(QUALIFIER, this.qualifiedName.getQualifier());
+ }
+
+}
Property changes on: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/QualifiedNameTest.java
___________________________________________________________________
Added: svn:mime-type
+ text/plain
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypesTest.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypesTest.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/cnd/attributes/RequiredTypesTest.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -15,6 +15,7 @@
import org.jboss.tools.modeshape.jcr.Utils;
import org.jboss.tools.modeshape.jcr.cnd.CndElement;
import org.jboss.tools.modeshape.jcr.cnd.Constants;
+import org.jboss.tools.modeshape.jcr.cnd.QualifiedName;
import org.junit.Before;
import org.junit.Test;
@@ -25,13 +26,13 @@
private RequiredTypes attribute;
- private void add( String item ) {
+ private void add( QualifiedName item ) {
if (!this.attribute.add(item)) {
fail();
}
}
- private void remove( String item ) {
+ private void remove( QualifiedName item ) {
if (!this.attribute.remove(item)) {
fail();
}
@@ -52,11 +53,11 @@
@Test
public void verifyAddedItem() {
// setup
- add(ITEM_ONE);
+ add(QUALIFIED_NAME1);
// tests
assertEquals(1, this.attribute.getSupportedItems().size());
- assertTrue(this.attribute.getSupportedItems().contains(ITEM_ONE));
+ assertTrue(this.attribute.getSupportedItems().contains(QUALIFIED_NAME1));
}
@Test
@@ -72,9 +73,9 @@
@Test
public void verifyMultipleElementsCndNotation() {
// setup
- add(ITEM_ONE);
- add(ITEM_TWO);
- add(ITEM_THREE);
+ add(QUALIFIED_NAME1);
+ add(QUALIFIED_NAME2);
+ add(QUALIFIED_NAME3);
// tests
assertEquals(REQUIRED_TYPES_THREE_ITEM_FORM, this.attribute.toCndNotation(CndElement.NotationType.COMPACT));
@@ -85,7 +86,7 @@
@Test
public void verifyOneElementCndNotation() {
// setup
- add(ITEM_ONE);
+ add(QUALIFIED_NAME1);
// tests
assertEquals(REQUIRED_TYPES_ONE_ITEM_FORM, this.attribute.toCndNotation(CndElement.NotationType.COMPACT));
@@ -96,21 +97,21 @@
@Test
public void verifyRemoveItem() {
// setup
- add(ITEM_ONE);
- add(ITEM_TWO);
- remove(ITEM_ONE);
+ add(QUALIFIED_NAME1);
+ add(QUALIFIED_NAME2);
+ remove(QUALIFIED_NAME1);
// tests
- assertFalse(this.attribute.getSupportedItems().contains(ITEM_ONE));
+ assertFalse(this.attribute.getSupportedItems().contains(QUALIFIED_NAME1));
}
@Test
public void verifySameElementIsNotAdded() {
// setup
- add(ITEM_ONE);
+ add(QUALIFIED_NAME1);
// tests
- if (this.attribute.add(ITEM_ONE)) {
+ if (this.attribute.add(QUALIFIED_NAME1)) {
fail();
}
@@ -120,7 +121,7 @@
@Test
public void verifyStateShouldBeIsAfterAdd() {
// setup
- add(ITEM_ONE);
+ add(QUALIFIED_NAME1);
// tests
assertEquals(AttributeState.Value.IS, this.attribute.get());
@@ -129,8 +130,8 @@
@Test
public void verifyStateShouldBeIsNotWhenEmpty() {
// setup
- add(ITEM_ONE);
- remove(ITEM_ONE);
+ add(QUALIFIED_NAME1);
+ remove(QUALIFIED_NAME1);
// tests
assertEquals(0, this.attribute.getSupportedItems().size());
Modified: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/test/AllTests.java
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/test/AllTests.java 2012-03-14 18:25:37 UTC (rev 39515)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/src/org/jboss/tools/modeshape/jcr/test/AllTests.java 2012-03-14 21:11:58 UTC (rev 39516)
@@ -15,6 +15,7 @@
import org.jboss.tools.modeshape.jcr.cnd.LocalNameTest;
import org.jboss.tools.modeshape.jcr.cnd.NamespaceMappingTest;
import org.jboss.tools.modeshape.jcr.cnd.PropertyDefinitionTest;
+import org.jboss.tools.modeshape.jcr.cnd.QualifiedNameTest;
import org.jboss.tools.modeshape.jcr.cnd.attributes.AbstractTest;
import org.jboss.tools.modeshape.jcr.cnd.attributes.AutocreatedTest;
import org.jboss.tools.modeshape.jcr.cnd.attributes.DefaultTypeTest;
@@ -46,11 +47,11 @@
@RunWith(Suite.class)
@Suite.SuiteClasses({ ChildNodeDefinitionTest.class, CndImporterTest.class, CndTokenizerTest.class, CndValidatorTest.class,
CompactNodeTypeDefinitionTest.class, LocalNameTest.class, NamespaceMappingTest.class, PropertyDefinitionTest.class,
- AbstractTest.class, AutocreatedTest.class, DefaultTypeTest.class, DefaultValuesTest.class, MandatoryTest.class,
- MixinTest.class, MultipleTest.class, NodeAttributesTest.class, NodeTypeAttributesTest.class, NoFullTextTest.class,
- NoQueryOrderTest.class, OnParentValueTest.class, OrderableTest.class, PrimaryItemTest.class, PropertyAttributesTest.class,
- ProtectedTest.class, QueryableTest.class, QueryOperatorsTest.class, RequiredTypesTest.class, SameNameSiblingsTest.class,
- SuperTypesTest.class, ValueConstraintsTest.class })
+ QualifiedNameTest.class, AbstractTest.class, AutocreatedTest.class, DefaultTypeTest.class, DefaultValuesTest.class,
+ MandatoryTest.class, MixinTest.class, MultipleTest.class, NodeAttributesTest.class, NodeTypeAttributesTest.class,
+ NoFullTextTest.class, NoQueryOrderTest.class, OnParentValueTest.class, OrderableTest.class, PrimaryItemTest.class,
+ PropertyAttributesTest.class, ProtectedTest.class, QueryableTest.class, QueryOperatorsTest.class, RequiredTypesTest.class,
+ SameNameSiblingsTest.class, SuperTypesTest.class, ValueConstraintsTest.class })
public class AllTests {
// nothing to do
}
Added: trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/testdata/jsr_283_builtins.cnd
===================================================================
--- trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/testdata/jsr_283_builtins.cnd (rev 0)
+++ trunk/modeshape/tests/org.jboss.tools.modeshape.jcr.test/testdata/jsr_283_builtins.cnd 2012-03-14 21:11:58 UTC (rev 39516)
@@ -0,0 +1,183 @@
+<jcr='http://www.jcp.org/jcr/1.0'>
+<nt='http://www.jcp.org/jcr/nt/1.0'>
+<mix='http://www.jcp.org/jcr/mix/1.0'>
+
+// ------------------------------------------------------------------------
+// Pre-defined Node Types
+// ------------------------------------------------------------------------
+
+[nt:base] abstract
+ - jcr:primaryType (name) mandatory autocreated
+ protected compute
+ - jcr:mixinTypes (name) protected multiple compute
+
+[nt:unstructured]
+ orderable
+ - * (undefined) multiple
+ - * (undefined)
+ + * (nt:base) = nt:unstructured sns version
+
+[mix:created] mixin
+ - jcr:created (date) protected
+ - jcr:createdBy (string) protected
+
+[nt:hierarchyNode] > mix:created abstract
+
+[nt:file] > nt:hierarchyNode
+ + jcr:content (nt:base) primary mandatory
+
+[nt:linkedFile] > nt:hierarchyNode
+ - jcr:content (reference) primary mandatory
+
+[nt:folder] > nt:hierarchyNode
+ + * (nt:hierarchyNode) version
+
+[mix:referenceable] mixin
+ - jcr:uuid (string) mandatory autocreated protected initialize
+
+[mix:mimeType] mixin
+ - jcr:mimeType (string)
+ - jcr:encoding (string)
+
+[mix:lastModified] mixin
+ - jcr:lastModified (date)
+ - jcr:lastModifiedBy (string)
+
+[nt:resource] > mix:mimeType, mix:lastModified
+ - jcr:data (binary) primary mandatory
+
+[nt:nodeType]
+ - jcr:nodeTypeName (name) mandatory protected copy
+ - jcr:supertypes (name) multiple protected copy
+ - jcr:isAbstract (boolean) mandatory protected copy
+ - jcr:isMixin (boolean) mandatory protected copy
+ - jcr:isQueryable (boolean) mandatory protected copy
+ - jcr:hasOrderableChildNodes (boolean) mandatory protected copy
+ - jcr:primaryItemName (name) protected copy
+ + jcr:propertyDefinition (nt:propertyDefinition) = nt:propertyDefinition sns protected copy
+ + jcr:childNodeDefinition (nt:childNodeDefinition) = nt:childNodeDefinition sns protected copy
+
+[nt:propertyDefinition]
+ - jcr:name (name) protected
+ - jcr:autoCreated (boolean) mandatory protected
+ - jcr:mandatory (boolean) mandatory protected
+ - jcr:isFullTextSearchable (boolean) mandatory protected
+ - jcr:isQueryOrderable (boolean) mandatory protected
+ - jcr:onParentVersion (string) mandatory protected
+ < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE',
+ 'IGNORE', 'ABORT'
+ - jcr:protected (boolean) mandatory protected
+ - jcr:requiredType (string) mandatory protected
+ < 'STRING', 'URI', 'BINARY', 'LONG', 'DOUBLE', 'DECIMAL', 'BOOLEAN',
+ 'DATE', 'NAME', 'PATH', 'REFERENCE', 'WEAKREFERENCE', 'UNDEFINED'
+ - jcr:valueConstraints (string) multiple protected
+ - jcr:availableQueryOperators (name) mandatory multiple protected
+ - jcr:defaultValues (undefined) multiple protected
+ - jcr:multiple (boolean) mandatory protected
+
+[nt:childNodeDefinition]
+ - jcr:name (name) protected
+ - jcr:autoCreated (boolean) mandatory protected
+ - jcr:mandatory (boolean) mandatory protected
+ - jcr:onParentVersion (string) mandatory protected
+ < 'COPY', 'VERSION', 'INITIALIZE', 'COMPUTE',
+ 'IGNORE', 'ABORT'
+ - jcr:protected (boolean) mandatory protected
+ - jcr:requiredPrimaryTypes (name) = 'nt:base' mandatory protected multiple
+ - jcr:defaultPrimaryType (name) protected
+ - jcr:sameNameSiblings (boolean) mandatory protected
+
+[nt:versionHistory] > mix:referenceable
+ - jcr:versionableUuid (string) mandatory autocreated protected abort
+ - jcr:copiedFrom (weakreference) protected abort < 'nt:version'
+ + jcr:rootVersion (nt:version) = nt:version mandatory autocreated protected abort
+ + jcr:versionLabels (nt:versionLabels) = nt:versionLabels mandatory autocreated protected abort
+ + * (nt:version) = nt:version protected abort
+
+
+[nt:versionLabels]
+ - * (reference) protected abort < 'nt:version'
+
+[nt:version] > mix:referenceable
+ - jcr:created (date) mandatory autocreated protected abort
+ - jcr:predecessors (reference) protected multiple abort < 'nt:version'
+ - jcr:successors (reference) protected multiple abort < 'nt:version'
+ - jcr:activity (reference) protected abort < 'nt:activity'
+ + jcr:frozenNode (nt:frozenNode) protected abort
+
+[nt:frozenNode] > mix:referenceable
+ orderable
+ - jcr:frozenPrimaryType (name) mandatory autocreated protected abort
+ - jcr:frozenMixinTypes (name) protected multiple abort
+ - jcr:frozenUuid (string) mandatory autocreated protected abort
+ - * (undefined) protected abort
+ - * (undefined) protected multiple abort
+ + * (nt:base) protected sns abort
+
+[nt:versionedChild]
+ - jcr:childVersionHistory (reference) mandatory autocreated protected abort < 'nt:versionHistory'
+
+[nt:query]
+ - jcr:statement (string)
+ - jcr:language (string)
+
+[nt:activity] > mix:referenceable
+ - jcr:activityTitle (string) mandatory autocreated protected
+
+
+[mix:simpleVersionable] mixin
+ - jcr:isCheckedOut (boolean) = 'true' mandatory autocreated protected ignore
+
+[mix:versionable] > mix:simpleVersionable, mix:referenceable mixin
+ - jcr:versionHistory (reference) mandatory protected ignore < 'nt:versionHistory'
+ - jcr:baseVersion (reference) mandatory protected ignore < 'nt:version'
+ - jcr:predecessors (reference) mandatory protected multiple ignore < 'nt:version'
+ - jcr:mergeFailed (reference) protected multiple abort
+ - jcr:activity (reference) protected < 'nt:version'
+ - jcr:configuration (reference) protected ignore < 'nt:configuration'
+
+[nt:configuration] > mix:versionable
+ - jcr:root (reference) mandatory autocreated protected
+
+[nt:address]
+ - jcr:protocol (string)
+ - jcr:host (string)
+ - jcr:port (string)
+ - jcr:repository (string)
+ - jcr:workspace (string)
+ - jcr:path (path)
+ - jcr:id (weakreference)
+
+[nt:naturalText]
+ - jcr:text (string)
+ - jcr:messageId (string)
+
+
+// ------------------------------------------------------------------------
+// Pre-defined Mixins
+// ------------------------------------------------------------------------
+
+[mix:etag] mixin
+ - jcr:etag (string) protected autocreated
+
+[mix:lockable] mixin
+ - jcr:lockOwner (string) protected ignore
+ - jcr:lockIsDeep (boolean) protected ignore
+
+[mix:lifecycle] mixin
+ - jcr:lifecyclePolicy (reference) protected initialize
+ - jcr:currentLifecycleState (string) protected initialize
+
+[mix:managedRetention] > mix:referenceable mixin
+ - jcr:hold (string) protected multiple
+ - jcr:isDeep (boolean) protected multiple
+ - jcr:retentionPolicy (reference) protected
+
+[mix:shareable] > mix:referenceable mixin
+
+[mix:title] mixin
+ - jcr:title (string)
+ - jcr:description (string)
+
+[mix:language] mixin
+ - jcr:language (string)
12 years, 8 months
JBoss Tools SVN: r39515 - in trunk/jst/plugins/org.jboss.tools.jst.web: src/org/jboss/tools/jst/web/browser/wtp and 1 other directories.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-14 14:25:37 -0400 (Wed, 14 Mar 2012)
New Revision: 39515
Modified:
trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManager.java
trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManagerListener.java
Log:
JBIDE-11306
https://issues.jboss.org/browse/JBIDE-11306
'Run on Server' on struts/jsf objects.
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2012-03-14 18:23:33 UTC (rev 39514)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/META-INF/MANIFEST.MF 2012-03-14 18:25:37 UTC (rev 39515)
@@ -11,6 +11,7 @@
Require-Bundle: org.jboss.tools.common.model;visibility:=reexport,
org.jboss.tools.common.projecttemplates;visibility:=reexport,
org.jboss.tools.common.validation,
+ org.jboss.ide.eclipse.as.ui;visibility:=reexport,
org.eclipse.ui;bundle-version="3.7.0",
org.eclipse.jdt.launching;bundle-version="3.6.0",
org.eclipse.debug.ui;bundle-version="3.7.0",
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java 2012-03-14 18:23:33 UTC (rev 39514)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/browser/wtp/RunOnServerContext.java 2012-03-14 18:25:37 UTC (rev 39515)
@@ -16,14 +16,17 @@
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.osgi.util.NLS;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.wst.server.core.*;
+import org.eclipse.wst.server.core.IServer.IOperationListener;
import org.eclipse.wst.server.core.internal.*;
import org.eclipse.wst.server.core.util.*;
@@ -114,7 +117,7 @@
protected void doExecute(String lastRunUrl) throws XModelException {
ServiceDialog d = PreferenceModelUtilities.getPreferenceModel().getService();
- IServer server = ServerManager.getInstance().getSelectedServer();
+ final IServer server = ServerManager.getInstance().getSelectedServer();
if(server == null) {
if(lastRunUrl != null && lastRunUrl.startsWith("%server%")) { //$NON-NLS-1$
String message = WebUIMessages.PLEASE_CREATE_A_SERVER_AND_SELECT_IT_ON_TOOLBAR;
@@ -128,11 +131,23 @@
server.getModules();
- String launchMode = ILaunchManager.DEBUG_MODE.equals(server.getMode()) ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE;
+ final String launchMode = ILaunchManager.DEBUG_MODE.equals(server.getMode()) ? ILaunchManager.DEBUG_MODE : ILaunchManager.RUN_MODE;
try {
- Object launchable = new HttpLaunchable(new URL(lastRunUrl));
- IClient[] clients = getClients(server, launchable, launchMode);
- IClient client = clients[0];
+ final Object launchable = new HttpLaunchable(new URL(lastRunUrl));
+ final IClient[] clients = getClients(server, launchable, launchMode);
+ final IClient client = clients[0];
+ if(server.getLaunch() == null) {
+ server.start(launchMode, new IOperationListener() {
+ public void done(IStatus result) {
+ Display.getDefault().asyncExec(new Runnable() {
+ public void run() {
+ client.launch(server, launchable, launchMode, server.getLaunch());
+ }
+ });
+ }
+ });
+ return;
+ }
client.launch(server, launchable, launchMode, server.getLaunch());
} catch (MalformedURLException e) {
WebModelPlugin.getPluginLog().logError(e);
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManager.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManager.java 2012-03-14 18:23:33 UTC (rev 39514)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManager.java 2012-03-14 18:25:37 UTC (rev 39515)
@@ -10,173 +10,5 @@
******************************************************************************/
package org.jboss.tools.jst.web.server;
-import java.util.*;
-
-import org.eclipse.core.runtime.preferences.DefaultScope;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.InstanceScope;
-import org.eclipse.wst.server.core.*;
-import org.jboss.tools.jst.web.WebModelPlugin;
-
-public class ServerManager {
- private static ServerManager instance;
-
- public static synchronized ServerManager getInstance() {
- if(instance == null) {
- instance = new ServerManager();
- }
- return instance;
- }
-
- private List<ServerManagerListener> listeners = new ArrayList<ServerManagerListener>();
- private IServerListener serverListener;
- protected IServer[] servers = new IServer[0];
-
- IServer selected = null;
-
- public ServerManager() {
- serverListener = new ServerListenerImpl();
- load();
- }
-
- void load() {
- servers = (IServer[])ServerCore.getServers().clone();
- loadSelectedServer();
- ServerResourceListenerImpl listener = new ServerResourceListenerImpl();
- ServerCore.addRuntimeLifecycleListener(listener);
- ServerCore.addServerLifecycleListener(listener);
- }
-
- private void loadSelectedServer() {
- if(servers == null || servers.length == 0) return;
- String ds = getDefaultWebServer();
- IServer s = getServer(ds);
- if(s == null && servers.length > 0) {
- s = servers[0];
- setDefaultWebServer(servers[0].getId());
- }
- setSelectedServerInternal(s);
- }
-
- public IServer[] getServers() {
- return servers;
- }
-
- public IServer getServer(String serverId) {
- for (int i = 0; i < servers.length; i++) {
- if(servers[i].getId().equals(serverId)) {
- return servers[i];
- }
- }
- return null;
- }
-
- public void addListener(ServerManagerListener listener) {
- if(!listeners.contains(listener)) listeners.add(listener);
- }
-
- public void removeListener(ServerManagerListener listener) {
- listeners.remove(listener);
- }
-
- void fire() {
- ServerManagerListener[] ls = (ServerManagerListener[])listeners.toArray(new ServerManagerListener[0]);
- for (int i = 0; i < ls.length; i++) {
- ls[i].serverManagerChanged();
- }
- }
-
- public void setSelectedServer(String id) {
- IServer server = getServer(id);
- if(server == selected) return;
- setSelectedServerInternal(server);
- setDefaultWebServer(id);
- fire();
- }
-
- private void setSelectedServerInternal(IServer server) {
- if(selected == server) return;
- if(selected != null) selected.removeServerListener(serverListener);
- selected = server;
- if(selected != null) selected.addServerListener(serverListener);
- }
-
- public String getSelectedServerId() {
- String result = getDefaultWebServer();
- return result == null ? "" : result; //$NON-NLS-1$
- }
-
- public IServer getSelectedServer() {
- return selected;
- }
-
- class ServerResourceListenerImpl implements IRuntimeLifecycleListener, IServerLifecycleListener {
- public void serverAdded(IServer server) {
- IServer[] ss = new IServer[servers.length + 1];
- System.arraycopy(servers, 0, ss, 0, servers.length);
- ss[servers.length] = server;
- servers = ss;
- loadSelectedServer();
- fire();
- }
- public void serverChanged(IServer server) {
- fire();
- }
- public void serverRemoved(IServer server) {
- List<IServer> l = new ArrayList<IServer>();
- for (int i = 0; i < servers.length; i++) {
- if(servers[i] != server) l.add(servers[i]);
- }
- if(l.size() == servers.length) return;
- servers = l.toArray(new IServer[0]);
- loadSelectedServer();
- fire();
- }
- public void runtimeAdded(IRuntime runtime) {
- fire();
- }
- public void runtimeChanged(IRuntime runtime) {
- fire();
- }
- public void runtimeRemoved(IRuntime runtime) {
- fire();
- }
- }
-
- class ServerListenerImpl implements IServerListener {
- public void serverChanged(ServerEvent arg0) {
- fire();
- }
- }
-
- static String DEFAULT_WEB_SERVER = WebModelPlugin.PLUGIN_ID + ".defaultWebServer"; //$NON-NLS-1$
-
- static String getDefaultWebServer() {
- String result = getInstancePreference(DEFAULT_WEB_SERVER);
- return result;
- }
-
- static void setDefaultWebServer(String value) {
- getInstancePreferences().put(DEFAULT_WEB_SERVER, value);
- }
-
- static IEclipsePreferences getInstancePreferences() {
- return new InstanceScope().getNode(WebModelPlugin.PLUGIN_ID);
- }
-
- static IEclipsePreferences getDefaultPreferences() {
- return new DefaultScope().getNode(WebModelPlugin.PLUGIN_ID);
- }
-
- static String getInstancePreference(String key) {
- IEclipsePreferences p = getInstancePreferences();
- String value = p == null ? null : p.get(key, null);
- return value != null ? value : getDefaultPreference(key);
- }
-
- static String getDefaultPreference(String key) {
- IEclipsePreferences p = getDefaultPreferences();
- return p == null ? null : p.get(key, null);
- }
-
+public class ServerManager extends org.jboss.ide.eclipse.as.ui.actions.ServerManager {
}
Modified: trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManagerListener.java
===================================================================
--- trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManagerListener.java 2012-03-14 18:23:33 UTC (rev 39514)
+++ trunk/jst/plugins/org.jboss.tools.jst.web/src/org/jboss/tools/jst/web/server/ServerManagerListener.java 2012-03-14 18:25:37 UTC (rev 39515)
@@ -10,7 +10,5 @@
******************************************************************************/
package org.jboss.tools.jst.web.server;
-public interface ServerManagerListener {
- public void serverManagerChanged();
-
+public interface ServerManagerListener extends org.jboss.ide.eclipse.as.ui.actions.ServerManagerListener {
}
12 years, 8 months
JBoss Tools SVN: r39514 - trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF.
by jbosstools-commits@lists.jboss.org
Author: scabanovich
Date: 2012-03-14 14:23:33 -0400 (Wed, 14 Mar 2012)
New Revision: 39514
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
Log:
JBIDE-11306
https://issues.jboss.org/browse/JBIDE-11306
'Run on Server' on struts/jsf objects.
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-03-14 17:22:53 UTC (rev 39513)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.ui/META-INF/MANIFEST.MF 2012-03-14 18:23:33 UTC (rev 39514)
@@ -60,6 +60,7 @@
org.jboss.ide.eclipse.as.dmr;bundle-version="2.3.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.jboss.ide.eclipse.as.ui,
+ org.jboss.ide.eclipse.as.ui.actions,
org.jboss.ide.eclipse.as.ui.console,
org.jboss.ide.eclipse.as.ui.dialogs,
org.jboss.ide.eclipse.as.ui.editor,
12 years, 8 months
JBoss Tools SVN: r39513 - in trunk/as/plugins: org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers and 3 other directories.
by jbosstools-commits@lists.jboss.org
Author: rob.stryker(a)jboss.com
Date: 2012-03-14 13:22:53 -0400 (Wed, 14 Mar 2012)
New Revision: 39513
Modified:
trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java
trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
Log:
JBIDE-11308 - adding some logging to help debug
Modified: trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.archives.webtools/src/org/jboss/ide/eclipse/archives/webtools/modules/WTPZippedPublisher.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -24,6 +24,7 @@
import org.eclipse.wst.server.core.model.IModuleFile;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.eclipse.wst.server.core.util.ModuleFile;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
@@ -66,11 +67,12 @@
if( DeploymentMarkerUtils.supportsJBoss7MarkerDeployment(server)) {
status = handleJBoss7Deployment(method, server, module, publishType, delta, monitor);
} else {
+ Trace.trace(Trace.STRING_FINER, "Using as<=6 publishModule logic in WTPZippedPublisher for module " + module[module.length-1].getName() ); //$NON-NLS-1$
IDeployableServer ds = ServerConverter.getDeployableServer(server);
String deployRoot = getDeployRoot(module, ds);
LocalZippedPublisherUtil util = new LocalZippedPublisherUtil();
status = util.publishModule(server, deployRoot, module, publishType, delta, monitor);
- monitor.done();
+ Trace.trace(Trace.STRING_FINER, "Zipping complete for module " + module[module.length-1].getName() ); //$NON-NLS-1$ monitor.done();
}
return status;
}
@@ -83,12 +85,16 @@
IDeployableServer ds = ServerConverter.getDeployableServer(server);
String deployRoot = getDeployRoot(module, ds);
if( publishType == IJBossServerPublisher.REMOVE_PUBLISH) {
+ Trace.trace(Trace.STRING_FINER, "Removing .dodeploy marker in WTPZippedPublisher to undeploy module " + module[module.length-1].getName() ); //$NON-NLS-1$
DeploymentMarkerUtils.removeDeployedMarkerIfExists(method, ds, module, monitor);
} else {
+ Trace.trace(Trace.STRING_FINER, "Zipping module in WTPZippedPublisher for module " + module[module.length-1].getName() ); //$NON-NLS-1$
LocalZippedPublisherUtil util = new LocalZippedPublisherUtil();
IStatus s = util.publishModule(server, deployRoot, module, publishType, delta, monitor);
IPath outPath = util.getOutputFilePath();
if( util.hasBeenChanged()) {
+ Trace.trace(Trace.STRING_FINER, "Output zip changed. Copying file to destination. WTPZippedPublisher for module " + module[module.length-1].getName() ); //$NON-NLS-1$
+
// Copy out file
IPath depPath = PublishUtil.getDeployPath(method, module, ds);
IPath folder = depPath.removeLastSegments(1);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractPublishMethod.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -18,6 +18,7 @@
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.ExtensionManager;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublisher;
@@ -28,17 +29,15 @@
public void publishStart(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Publish start in " + getClass().getName()); //$NON-NLS-1$
}
public int publishFinish(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
- IModule[] modules = behaviour.getServer().getModules();
- boolean allpublished= true;
- for (int i = 0; i < modules.length; i++) {
- if(behaviour.getServer().getModulePublishState(new IModule[]{modules[i]})!=IServer.PUBLISH_STATE_NONE)
- allpublished=false;
- }
- return allpublished ? IServer.PUBLISH_STATE_NONE : IServer.PUBLISH_STATE_INCREMENTAL;
+ Trace.trace(Trace.STRING_FINER, "Beginning publishFinish in " + getClass().getName()); //$NON-NLS-1$
+ int result = getServerPublishState(behaviour);
+ Trace.trace(Trace.STRING_FINER, "Ending publishFinish with server restart state of " + result); //$NON-NLS-1$
+ return result;
}
public int getServerPublishState(DeployableServerBehavior behaviour) {
@@ -56,6 +55,8 @@
public int publishModule(DeployableServerBehavior behaviour, int kind,
int deltaKind, IModule[] module, IProgressMonitor monitor)
throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Beginning to publish module " + module[module.length-1].getName()); //$NON-NLS-1$
+
// kind = [incremental, full, auto, clean] = [1,2,3,4]
// delta = [no_change, added, changed, removed] = [0,1,2,3]
if( module.length == 0 ) return IServer.PUBLISH_STATE_NONE;
@@ -68,6 +69,7 @@
IModuleResourceDelta[] deltas = new IModuleResourceDelta[]{};
if( deltaKind != ServerBehaviourDelegate.REMOVED)
deltas = behaviour.getPublishedResourceDelta(module);
+ Trace.trace(Trace.STRING_FINER, "Publisher for module " + module[module.length-1].getName() + " is " + publisher.getClass().getName()); //$NON-NLS-1$//$NON-NLS-2$
if( publisher != null ) {
try {
IStatus result = publisher.publishModule(
@@ -78,6 +80,7 @@
ServerLogger.getDefault().log(behaviour.getServer(), result);
} catch( CoreException ce) {
// Let the user know
+ Trace.trace(Trace.STRING_FINER, "Exception publishing module: " + ce.getMessage()); //$NON-NLS-1$
ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
throw ce;
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/publishers/AbstractServerToolsPublisher.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -34,6 +34,7 @@
import org.eclipse.wst.server.core.util.ProjectModule;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.modules.ResourceModuleResourceUtil;
import org.jboss.ide.eclipse.as.core.publishers.patterns.IModulePathFilter;
@@ -109,6 +110,7 @@
status = unpublish(this.server, module, subMon);
} else {
if( ServerModelUtilities.isAnyDeleted(module) ) {
+ Trace.trace(Trace.STRING_FINER, "Handling a wtp 'deleted module' (aka missing). No Action Taken. Returning state=unknown "); //$NON-NLS-1$
publishState = IServer.PUBLISH_STATE_UNKNOWN;
} else {
if (publishType == FULL_PUBLISH ) {
@@ -186,7 +188,8 @@
protected IStatus fullPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
monitor.beginTask("Full Publish: " + moduleTree[moduleTree.length-1].getName(), 1000); //$NON-NLS-1$
-
+ Trace.trace(Trace.STRING_FINER, "Begin Handling a full publish for module " + module.getName()); //$NON-NLS-1$
+
IPath deployPath = getDeployPath(moduleTree, server);
IPublishCopyCallbackHandler callback = getCallbackHandler(getRootPath(deployPath).append(deployPath));
IModuleResource[] members = PublishUtil.getResources(module, getSubMon(monitor, 200));
@@ -200,9 +203,11 @@
//if( !ServerModelUtilities.isBinaryModule(module))
callback.deleteResource(new Path("/"), getSubMon(monitor, 100)); //$NON-NLS-1$
- if( monitor.isCanceled())
+ if( monitor.isCanceled()) {
+ Trace.trace(Trace.STRING_FINER, "Monitor canceled during full publish for module " + module.getName()); //$NON-NLS-1$
return canceledStatus();
-
+ }
+
List<IStatus> list = new ArrayList<IStatus>();
boolean isBinaryObject = ServerModelUtilities.isBinaryModule(module);
@@ -218,6 +223,7 @@
list.addAll(Arrays.asList(transferForceZippedChild(deployPath, module, moduleTree, monitor)));
}
+ Trace.trace(Trace.STRING_FINER, "full publish completed for module " + module.getName()); //$NON-NLS-1$
monitor.done();
if( list.size() > 0 )
return createMultiStatus(list, module);
@@ -319,11 +325,13 @@
protected IStatus incrementalPublish(IModule[] moduleTree, IModule module, IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Begin Handling an incremental publish"); //$NON-NLS-1$
IStatus[] results = new IStatus[] {};
IPath deployPath = getDeployPath(moduleTree, server);
IPublishCopyCallbackHandler h1 = getCallbackHandler(deployPath);
// quick switch to full publish for JBIDE-9112, recent switch from zip to unzipped requires full publish
if( h1.isFile(new Path("/"), new NullProgressMonitor())) { //$NON-NLS-1$
+ Trace.trace(Trace.STRING_FINER, "Incremental Publish forced to become full publish, see JBIDE-9112"); //$NON-NLS-1$
return fullPublish(moduleTree, module, monitor);
}
@@ -362,6 +370,7 @@
IStatus ret = new Status(IStatus.OK, JBossServerCorePlugin.PLUGIN_ID, IEventCodes.JST_PUB_FULL_SUCCESS,
NLS.bind(Messages.CountModifiedMembers, PublishUtil.countChanges(delta), module.getName()), null);
+ Trace.trace(Trace.STRING_FINER, "End Handling an incremental publish. The copying of files has been completed. "); //$NON-NLS-1$
return ret;
}
@@ -408,11 +417,13 @@
protected IStatus unpublish(IDeployableServer jbServer, IModule[] module,
IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Handling an unpublish"); //$NON-NLS-1$
monitor.beginTask("Removing Module: " + module[module.length-1].getName(), 100); //$NON-NLS-1$
IPath remotePath = getDeployPath(module, server);
IPublishCopyCallbackHandler handler = getCallbackHandler(getRootPath(remotePath).append(remotePath));
handler.deleteResource(new Path("/"), getSubMon(monitor, 100)); //$NON-NLS-1$
monitor.done();
+ Trace.trace(Trace.STRING_FINER, "Deleted deployment resource: " + remotePath); //$NON-NLS-1$
return Status.OK_STATUS;
}
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DelegatingServerBehavior.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -20,6 +20,7 @@
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.publishers.JSTPublisherXMLToucher;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
@@ -54,19 +55,22 @@
public synchronized IJBossBehaviourDelegate getDelegate() {
IJBossServerPublishMethodType type = DeploymentPreferenceLoader.getCurrentDeploymentMethodType(getServer());
String id = type == null ? LocalPublishMethod.LOCAL_PUBLISH_METHOD : type.getId();
+ IJBossBehaviourDelegate ret = null;
if( id.equals(lastModeId) && delegate != null && delegate.getBehaviourTypeId().equals(id))
- return delegate;
-
- Behaviour b = BehaviourModel.getModel().getBehaviour(getServer().getServerType().getId());
- BehaviourImpl impl = b.getImpl(id);
- if( impl != null ) {
- IJBossBehaviourDelegate d = impl.createBehaviourDelegate();
- d.setActualBehaviour(this);
- lastModeId = id;
- delegate = d;
- return delegate;
+ ret = delegate;
+ else {
+ Behaviour b = BehaviourModel.getModel().getBehaviour(getServer().getServerType().getId());
+ BehaviourImpl impl = b.getImpl(id);
+ if( impl != null ) {
+ IJBossBehaviourDelegate d = impl.createBehaviourDelegate();
+ d.setActualBehaviour(this);
+ lastModeId = id;
+ ret = d;
+ }
}
- return null;
+ delegate = ret;
+ //Trace.trace(Trace.STRING_FINEST, "Finding DelegatingServerBehavior's delegate for server " + getServer().getName() +". Class=" + (ret == null ? null : ret.getClass().getName())); //$NON-NLS-1$//$NON-NLS-2$
+ return ret;
}
public IModulePathFilter getPathFilter(IModule[] moduleTree) {
@@ -77,6 +81,7 @@
}
public void stop(boolean force) {
+ Trace.trace(Trace.STRING_FINER, "DelegatingServerBehavior initiating stop for server " + getServer().getName()); //$NON-NLS-1$
getDelegate().stop(force);
}
@@ -134,6 +139,7 @@
}
protected void publishFinish(final IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "PublishFinish in DelegatingServerBehavior"); //$NON-NLS-1$
try {
getDelegate().publishFinish(monitor);
} finally {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/DeployableServerBehavior.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -27,6 +27,7 @@
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
import org.eclipse.wst.server.core.model.ServerBehaviourDelegate;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.LocalPublishMethod;
import org.jboss.ide.eclipse.as.core.publishers.patterns.IModulePathFilter;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
@@ -59,6 +60,7 @@
protected void publishStart(IProgressMonitor monitor) throws CoreException {
if( method != null )
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Already publishing")); //$NON-NLS-1$
+ Trace.trace(Trace.STRING_FINER, "Publish Start in DeployableServerBehavior"); //$NON-NLS-1$
method = getOrCreatePublishMethod();
publishTaskModel = new HashMap<String, Object>();
method.publishStart(this, monitor);
@@ -76,12 +78,16 @@
* @throws CoreException
*/
protected IJBossServerPublishMethod getOrCreatePublishMethod() throws CoreException {
- if( method == null )
+ if( method == null ) {
method = createPublishMethod();
+ Trace.trace(Trace.STRING_FINER, "Creating publish method " + (method == null ? null : method.getClass().getName())); //$NON-NLS-1$
+ }
return method;
}
protected void publishFinish(IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "PublishFinish in DeployableServerBehavior"); //$NON-NLS-1$
+
if( method == null )
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Not publishing")); //$NON-NLS-1$
try {
@@ -105,6 +111,8 @@
}
protected void publishModule(int kind, int deltaKind, IModule[] module, IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Beginning to publish module " + module[module.length-1].getName() + " in DeployableServerBehavior"); //$NON-NLS-1$ //$NON-NLS-2$
+
if( method == null )
throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "Not publishing")); //$NON-NLS-1$
try {
@@ -114,6 +122,7 @@
setModuleState(module, IServer.STATE_STARTED );
}
} catch(CoreException ce) {
+ Trace.trace(Trace.STRING_FINER, "Error publishing module " + module[module.length-1].getName() + " in DeployableServerBehavior. " + ce.getMessage()); //$NON-NLS-1$ //$NON-NLS-2$
setModulePublishState(module, IServer.PUBLISH_STATE_FULL);
setModuleState(module, IServer.STATE_UNKNOWN );
throw ce;
@@ -214,6 +223,7 @@
getServer().addServerListener(new IServerListener() {
public void serverChanged(ServerEvent event) {
if( event.getState() != serverStateVal ) {
+ Trace.trace(Trace.STRING_FINER, "Framework has changed server state from starting to stopped. Ensuring server has stopped."); //$NON-NLS-1$
// something's been changed by the framework and NOT by us.
if( serverStateVal == IServer.STATE_STARTING && event.getState() == IServer.STATE_STOPPED) {
stop(true);
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DelegatingJBoss7ServerBehavior.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -29,6 +29,7 @@
import org.eclipse.wst.server.core.IModule;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
import org.jboss.ide.eclipse.as.core.Messages;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.events.IEventCodes;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
@@ -81,6 +82,7 @@
@Override
protected void publishFinish(IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "PublishFinish in DelegatingJBoss7ServerBehavior"); //$NON-NLS-1$
// Handle the dodeploy
try {
createDoDeployMarkers(monitor);
@@ -94,6 +96,7 @@
return;
}
List<IPath> paths = getMarkedDoDeploy();
+ Trace.trace(Trace.STRING_FINER, "Marking " + paths.size() + " dodeploy files."); //$NON-NLS-1$//$NON-NLS-2$
monitor.beginTask("Completing Publishes", paths.size() + 1); //$NON-NLS-1$
createDoDeployMarker(getOrCreatePublishMethod(), paths, monitor);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/DeploymentMarkerUtils.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -30,6 +30,7 @@
import org.eclipse.wst.server.core.model.IModuleFile;
import org.eclipse.wst.server.core.util.ModuleFile;
import org.jboss.ide.eclipse.as.core.JBossServerCorePlugin;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
import org.jboss.ide.eclipse.as.core.server.IJBossServerPublishMethod;
@@ -85,7 +86,9 @@
IPath depPath, IProgressMonitor monitor) throws CoreException {
IPath folder = depPath.removeLastSegments(1);
IPublishCopyCallbackHandler callback = method.getCallbackHandler(folder, server);
- callback.copyFile(createBlankModule(), new Path(depPath.lastSegment() + DO_DEPLOY), monitor);
+ IPath lastSegment = new Path(depPath.lastSegment() + DO_DEPLOY);
+ callback.copyFile(createBlankModule(), lastSegment, monitor);
+ Trace.trace(Trace.STRING_FINER, "Creating dodeploy file: " + folder.append(lastSegment)); //$NON-NLS-1$
return Status.OK_STATUS;
}
@@ -170,6 +173,8 @@
*/
public static IStatus removeDeployedMarkerIfExists(IJBossServerPublishMethod method, IServer server, IPath depPath,
IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Removing deployment marker file on path " + depPath); //$NON-NLS-1$
+
try {
return removeFile(DEPLOYED, server, depPath, method, monitor);
} catch (CoreException e) {
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.core/jbosscore/org/jboss/ide/eclipse/as/core/server/internal/v7/JBoss7JSTPublisher.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -18,6 +18,7 @@
import org.eclipse.wst.server.core.IModule;
import org.eclipse.wst.server.core.IServer;
import org.eclipse.wst.server.core.model.IModuleResourceDelta;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.publishers.AbstractServerToolsPublisher;
import org.jboss.ide.eclipse.as.core.publishers.JSTPublisherXMLToucher;
import org.jboss.ide.eclipse.as.core.publishers.PublishUtil;
@@ -46,6 +47,8 @@
IServer server, IModule[] module,
int publishType, IModuleResourceDelta[] delta,
IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Using AS7 publishModule logic in JBoss7JSTPublisher for module " + module[module.length-1].getName() ); //$NON-NLS-1$
+
IDeployableServer ds = ServerConverter.getDeployableServer(server);
DeploymentMarkerUtils.removeDeployFailedMarker(method, server, PublishUtil.getDeployPath(method, module, ds), monitor);
@@ -83,6 +86,7 @@
private void doDeployRequired(IJBossServerPublishMethod method,IDeployableServer server,
IModule[] moduleTree, IProgressMonitor monitor ) throws CoreException {
IPath p = PublishUtil.getDeployPath(method, moduleTree, server);
+ Trace.trace(Trace.STRING_FINER, "Marking path " + p + " as requiring a .dodeploy marker, but NOT creating the file yet"); //$NON-NLS-1$ //$NON-NLS-2$
DelegatingJBoss7ServerBehavior beh = ServerConverter.getJBoss7ServerBehavior(server.getServer());
beh.markDoDeploy(p);
}
Modified: trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java
===================================================================
--- trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-03-14 17:03:19 UTC (rev 39512)
+++ trunk/as/plugins/org.jboss.ide.eclipse.as.rse.core/src/org/jboss/ide/eclipse/as/rse/core/RSEPublishMethod.java 2012-03-14 17:22:53 UTC (rev 39513)
@@ -26,6 +26,7 @@
import org.eclipse.rse.services.files.IFileService;
import org.eclipse.rse.subsystems.files.core.servicesubsystem.IFileServiceSubSystem;
import org.eclipse.wst.server.core.IServer;
+import org.jboss.ide.eclipse.as.core.Trace;
import org.jboss.ide.eclipse.as.core.extensions.events.ServerLogger;
import org.jboss.ide.eclipse.as.core.publishers.AbstractPublishMethod;
import org.jboss.ide.eclipse.as.core.server.IDeployableServer;
@@ -63,6 +64,7 @@
public void publishStart(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
+ super.publishStart(behaviour, monitor);
this.behaviour = behaviour;
loadRemoteDeploymentDetails();
ensureConnection(monitor);
@@ -71,11 +73,12 @@
if( b != null && getServer().getServerState() == IServer.STATE_STARTED ) {
stopDeploymentScanner();
}
- super.publishStart(behaviour, monitor);
+ Trace.trace(Trace.STRING_FINER, "Finished publish start for server " + getServer().getName());
}
public int publishFinish(DeployableServerBehavior behaviour,
IProgressMonitor monitor) throws CoreException {
+ Trace.trace(Trace.STRING_FINER, "Beginning publishFinish for server " + getServer().getName());
DelegatingServerBehavior b = (DelegatingServerBehavior) behaviour.getServer().loadAdapter(DelegatingServerBehavior.class, new NullProgressMonitor());
if( b != null && getServer().getServerState() == IServer.STATE_STARTED ) {
startDeploymentScanner();
@@ -84,12 +87,14 @@
}
protected void startDeploymentScanner() {
+ Trace.trace(Trace.STRING_FINER, "Starting remote deployment scanner for server " + getServer().getName());
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), true);
if( cmd != null )
launchCommandNoResult((DelegatingServerBehavior)behaviour, 3000, cmd);
}
protected void stopDeploymentScanner() {
+ Trace.trace(Trace.STRING_FINER, "Stopping remote deployment scanner for server " + getServer().getName());
String cmd = getDeploymentScannerCommand(new NullProgressMonitor(), false);
if( cmd != null )
launchCommandNoResult((DelegatingServerBehavior)behaviour, 3000, cmd);
@@ -131,10 +136,12 @@
}
public boolean ensureConnection(IProgressMonitor monitor) {
+ Trace.trace(Trace.STRING_FINER, "Ensuring connection to remote server for server " + getServer().getName());
if (fileSubSystem != null && !fileSubSystem.isConnected()) {
try {
fileSubSystem.connect(monitor, false);
} catch (Exception e) {
+ Trace.trace(Trace.STRING_FINER, "Exception connecting to remote server: " + e.getMessage());
// I'd rather not catch Exception, but that's all they throw
return false;
}
@@ -169,7 +176,9 @@
}
protected void loadRemoteDeploymentDetails() throws CoreException{
+ Trace.trace(Trace.STRING_FINER, "Ensuring RSE is initialized");
RSEUtils.waitForFullInit();
+ Trace.trace(Trace.STRING_FINER, "Loading remote deployment details for server " + getServer().getName());
String connectionName = RSEUtils.getRSEConnectionName(behaviour.getServer());
IDeployableServer ds = ServerConverter.getDeployableServer(behaviour.getServer());
this.remoteRootFolder = new Path(RSEUtils.getDeployRootFolder(ds));
@@ -207,13 +216,13 @@
}
private void launchCommandNoResult(DelegatingServerBehavior behaviour, int delay, String command) {
+ Trace.trace(Trace.STRING_FINER, "Launching remote command: " + command);
try {
ServerShellModel model = RSEHostShellModel.getInstance().getModel(behaviour.getServer());
model.executeRemoteCommand("/", command, new String[]{}, new NullProgressMonitor(), delay, true);
} catch( CoreException ce ) {
+ Trace.trace(Trace.STRING_FINER, "Exception launching remote command (command="+command+"): " + ce.getMessage());
ServerLogger.getDefault().log(behaviour.getServer(), ce.getStatus());
}
}
-
-
}
12 years, 8 months
JBoss Tools SVN: r39512 - trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-03-14 13:03:19 -0400 (Wed, 14 Mar 2012)
New Revision: 39512
Modified:
trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java
Log:
JBIDE-11309 Runtime created from within wizard isn't in "Target Runtime" combo box
Modified: trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java
===================================================================
--- trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java 2012-03-14 16:30:02 UTC (rev 39511)
+++ trunk/maven/plugins/org.jboss.tools.maven.project.examples/src/org/jboss/tools/maven/project/examples/wizard/ArchetypeExamplesWizardFirstPage.java 2012-03-14 17:03:19 UTC (rev 39512)
@@ -46,6 +46,7 @@
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Link;
@@ -55,6 +56,8 @@
import org.eclipse.wst.common.project.facet.core.ProjectFacetsManager;
import org.eclipse.wst.common.project.facet.core.runtime.RuntimeManager;
import org.eclipse.wst.server.core.IRuntime;
+import org.eclipse.wst.server.core.IRuntimeLifecycleListener;
+import org.eclipse.wst.server.core.ServerCore;
import org.eclipse.wst.server.core.internal.facets.FacetUtil;
import org.jboss.ide.eclipse.as.core.util.RuntimeUtils;
import org.jboss.tools.maven.project.examples.MavenProjectExamplesActivator;
@@ -87,6 +90,8 @@
private ProjectExample projectExample;
private WizardContext context;
+ private IRuntimeLifecycleListener listener;
+
public ArchetypeExamplesWizardFirstPage() {
super(new ProjectImportConfiguration(), "", "",new ArrayList<IWorkingSet>());
}
@@ -102,6 +107,35 @@
@Override
protected void createAdditionalControls(Composite container) {
+ listener = new IRuntimeLifecycleListener() {
+
+ @Override
+ public void runtimeRemoved(IRuntime runtime) {
+ runInUIThread();
+ }
+
+ @Override
+ public void runtimeChanged(IRuntime runtime) {
+ runInUIThread();
+ }
+
+ @Override
+ public void runtimeAdded(IRuntime runtime) {
+ runInUIThread();
+ }
+
+ private void runInUIThread() {
+ Display.getDefault().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ configureRuntimeCombo();
+ }
+ });
+ }
+
+ };
+ ServerCore.addRuntimeLifecycleListener(listener);
GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1);
projectNameLabel = new Label(container, SWT.NONE);
projectNameLabel.setText(Messages.ArchetypeExamplesWizardFirstPage_ProjectName_Label);
@@ -134,15 +168,7 @@
}
});
- //TODO read facet version from project example metadata
- IProjectFacetVersion facetVersion;
- try {
- facetVersion = ProjectFacetsManager.getProjectFacet(
- IJ2EEFacetConstants.DYNAMIC_WEB).getLatestVersion();
- createServerTargetComposite(container, facetVersion);
- } catch (CoreException e) {
- e.printStackTrace();
- }
+ createServerTargetComposite(container);
Label emptyLabel = new Label(container, SWT.NONE);
emptyLabel.setLayoutData(new GridData(SWT.FILL, SWT.TOP, true, false,
@@ -160,19 +186,49 @@
createMissingRepositoriesWarning(composite, gridData);
}
- protected void createServerTargetComposite(Composite parent,
- IProjectFacetVersion facetVersion) {
+ protected void createServerTargetComposite(Composite parent) {
Label serverTargetLabel = new Label(parent, SWT.NONE);
serverTargetLabel.setText(Messages.ArchetypeExamplesWizardFirstPage_Target_Runtime_Label);
GridData gridData = new GridData(SWT.FILL, SWT.TOP, true, false, 2, 1);
serverTargetCombo = new Combo(parent, SWT.BORDER | SWT.READ_ONLY);
serverTargetCombo.setLayoutData(gridData);
- serverRuntimes = getServerRuntimes(facetVersion);
serverTargetCombo.add(Messages.ArchetypeExamplesWizardFirstPage_No_TargetRuntime);
+ serverTargetCombo.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ if (isCurrentPage()) {
+ context.setProperty(MavenProjectConstants.ENTERPRISE_TARGET, isEnterpriseTargetRuntime());
+ }
+ validateEnterpriseRepo();
+ }
+ });
+
+ configureRuntimeCombo();
+
+ }
+
+ protected void configureRuntimeCombo() {
+ if (serverTargetCombo == null || serverTargetCombo.isDisposed()) {
+ return;
+ }
+ //TODO read facet version from project example metadata
+ IProjectFacetVersion facetVersion;
+ try {
+ facetVersion = ProjectFacetsManager.getProjectFacet(
+ IJ2EEFacetConstants.DYNAMIC_WEB).getLatestVersion();
+ } catch (CoreException e) {
+ MavenProjectExamplesActivator.log(e);
+ return;
+ }
+
int i =0, selectedRuntimeIdx = 0;
String lastUsedRuntime = dialogSettings.get(TARGET_RUNTIME);
+ serverRuntimes = getServerRuntimes(facetVersion);
+ serverTargetCombo.removeAll();
+ serverTargetCombo.add(Messages.ArchetypeExamplesWizardFirstPage_No_TargetRuntime);
for (Map.Entry<String, IRuntime> entry : serverRuntimes.entrySet()) {
serverTargetCombo.add(entry.getKey());
++i;
@@ -182,20 +238,9 @@
}
}
- serverTargetCombo.addModifyListener(new ModifyListener() {
-
- @Override
- public void modifyText(ModifyEvent e) {
- if (isCurrentPage()) {
- context.setProperty(MavenProjectConstants.ENTERPRISE_TARGET, isEnterpriseTargetRuntime());
- }
- validateEnterpriseRepo();
- }
- });
if (selectedRuntimeIdx > 0) {
serverTargetCombo.select(selectedRuntimeIdx);
}
-
}
protected void validate() {
@@ -396,6 +441,10 @@
dialogSettings.put(TARGET_RUNTIME, lastUsedRuntime.getId());
}
}
+ if (listener != null) {
+ ServerCore.removeRuntimeLifecycleListener(listener);
+ listener = null;
+ }
super.dispose();
}
12 years, 8 months
JBoss Tools SVN: r39511 - in trunk: as/site and 29 other directories.
by jbosstools-commits@lists.jboss.org
Author: mickael_istria
Date: 2012-03-14 12:30:02 -0400 (Wed, 14 Mar 2012)
New Revision: 39511
Added:
trunk/archives/site/category.xml
trunk/as/site/category.xml
trunk/bpel/site/category.xml
trunk/cdi/site/category.xml
trunk/common/site/category.xml
trunk/deltacloud/site/category.xml
trunk/esb/site/category.xml
trunk/examples/site/category.xml
trunk/flow/site/category.xml
trunk/forge/site/category.xml
trunk/freemarker/site/category.xml
trunk/gwt/site/category.xml
trunk/hibernatetools/site/category.xml
trunk/jbpm/site/category.xml
trunk/jmx/site/category.xml
trunk/jsf/site/category.xml
trunk/jst/site/category.xml
trunk/maven/site/category.xml
trunk/modeshape/site/category.xml
trunk/openshift/site/category.xml
trunk/portlet/site/category.xml
trunk/runtime/site/category.xml
trunk/seam/site/category.xml
trunk/smooks/site/category.xml
trunk/struts/site/category.xml
trunk/tests/site/category.xml
trunk/usage/site/category.xml
trunk/vpe/site/category.xml
trunk/ws/site/category.xml
trunk/xulrunner/site/category.xml
Removed:
trunk/archives/site/site.xml
trunk/as/site/site.xml
trunk/bpel/site/site.xml
trunk/cdi/site/site.xml
trunk/common/site/site.xml
trunk/deltacloud/site/site.xml
trunk/esb/site/site.xml
trunk/examples/site/site.xml
trunk/flow/site/site.xml
trunk/forge/site/site.xml
trunk/freemarker/site/site.xml
trunk/gwt/site/site.xml
trunk/hibernatetools/site/site.xml
trunk/jbpm/site/site.xml
trunk/jmx/site/site.xml
trunk/jsf/site/site.xml
trunk/jst/site/site.xml
trunk/maven/site/site.xml
trunk/modeshape/site/site.xml
trunk/openshift/site/site.xml
trunk/portlet/site/site.xml
trunk/runtime/site/site.xml
trunk/seam/site/site.xml
trunk/smooks/site/site.xml
trunk/struts/site/site.xml
trunk/tests/site/site.xml
trunk/usage/site/site.xml
trunk/vpe/site/site.xml
trunk/ws/site/site.xml
trunk/xulrunner/site/site.xml
Modified:
trunk/archives/site/pom.xml
trunk/as/site/pom.xml
trunk/bpel/site/pom.xml
trunk/cdi/site/pom.xml
trunk/common/site/pom.xml
trunk/deltacloud/site/pom.xml
trunk/esb/site/pom.xml
trunk/examples/site/pom.xml
trunk/flow/site/pom.xml
trunk/forge/site/pom.xml
trunk/freemarker/site/pom.xml
trunk/gwt/site/pom.xml
trunk/hibernatetools/site/pom.xml
trunk/jbpm/site/pom.xml
trunk/jmx/site/pom.xml
trunk/jsf/site/pom.xml
trunk/jst/site/pom.xml
trunk/maven/features/pom.xml
trunk/maven/site/pom.xml
trunk/modeshape/site/pom.xml
trunk/openshift/site/pom.xml
trunk/portlet/site/pom.xml
trunk/runtime/site/pom.xml
trunk/seam/site/pom.xml
trunk/smooks/site/pom.xml
trunk/struts/site/pom.xml
trunk/tests/site/pom.xml
trunk/usage/site/pom.xml
trunk/vpe/site/pom.xml
trunk/ws/site/pom.xml
trunk/xulrunner/site/pom.xml
Log:
JBIDE-10596:
Move to eclipse-repository instead of eclipse-update-site
Copied: trunk/archives/site/category.xml (from rev 38541, trunk/archives/site/site.xml)
===================================================================
--- trunk/archives/site/category.xml (rev 0)
+++ trunk/archives/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools archives Nightly Build Update Site -->
+ <category-def label="JBoss Tools archives Nightly Build Update Site" name="JBoss Tools archives Nightly Build Update Site">
+ <description>JBoss Tools archives Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.ide.eclipse.archives.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.feature" version="0.0.0">
+ <category name="JBoss Tools archives Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.archives.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.source.feature" version="0.0.0">
+ <category name="JBoss Tools archives Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.archives.test.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.test.feature" version="0.0.0">
+ <category name="JBoss Tools archives Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.archives.test.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.test.source.feature" version="0.0.0">
+ <category name="JBoss Tools archives Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/archives/site/pom.xml
===================================================================
--- trunk/archives/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/archives/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -9,5 +9,5 @@
<groupId>org.jboss.tools.archives</groupId>
<artifactId>site</artifactId>
<name>archives.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/archives/site/site.xml
===================================================================
--- trunk/archives/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/archives/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools archives Nightly Build Update Site -->
- <category-def label="JBoss Tools archives Nightly Build Update Site" name="JBoss Tools archives Nightly Build Update Site">
- <description>JBoss Tools archives Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.ide.eclipse.archives.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.feature" version="0.0.0">
- <category name="JBoss Tools archives Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.ide.eclipse.archives.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.source.feature" version="0.0.0">
- <category name="JBoss Tools archives Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.ide.eclipse.archives.test.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.test.feature" version="0.0.0">
- <category name="JBoss Tools archives Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.ide.eclipse.archives.test.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.archives.test.source.feature" version="0.0.0">
- <category name="JBoss Tools archives Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/as/site/category.xml (from rev 38541, trunk/as/site/site.xml)
===================================================================
--- trunk/as/site/category.xml (rev 0)
+++ trunk/as/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools as Nightly Build Update Site -->
+ <category-def label="JBoss Tools as Nightly Build Update Site" name="JBoss Tools as Nightly Build Update Site">
+ <description>JBoss Tools as Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.ide.eclipse.as.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.feature" version="0.0.0">
+ <category name="JBoss Tools as Nightly Build Update Site" />
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.as.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.source.feature" version="0.0.0">
+ <category name="JBoss Tools as Nightly Build Update Site" />
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.as.test.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.test.feature" version="0.0.0">
+ <category name="JBoss Tools as Nightly Build Update Site" />
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.as.test.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.test.source.feature" version="0.0.0">
+ <category name="JBoss Tools as Nightly Build Update Site" />
+ </feature>
+</site>
Modified: trunk/as/site/pom.xml
===================================================================
--- trunk/as/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/as/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -8,5 +8,5 @@
</parent>
<groupId>org.jboss.tools.as</groupId>
<artifactId>as.site</artifactId>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/as/site/site.xml
===================================================================
--- trunk/as/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/as/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools as Nightly Build Update Site -->
- <category-def label="JBoss Tools as Nightly Build Update Site" name="JBoss Tools as Nightly Build Update Site">
- <description>JBoss Tools as Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.ide.eclipse.as.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.feature" version="0.0.0">
- <category name="JBoss Tools as Nightly Build Update Site" />
- </feature>
- <feature url="features/org.jboss.ide.eclipse.as.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.source.feature" version="0.0.0">
- <category name="JBoss Tools as Nightly Build Update Site" />
- </feature>
- <feature url="features/org.jboss.ide.eclipse.as.test.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.test.feature" version="0.0.0">
- <category name="JBoss Tools as Nightly Build Update Site" />
- </feature>
- <feature url="features/org.jboss.ide.eclipse.as.test.source.feature_0.0.0.jar" id="org.jboss.ide.eclipse.as.test.source.feature" version="0.0.0">
- <category name="JBoss Tools as Nightly Build Update Site" />
- </feature>
-</site>
Copied: trunk/bpel/site/category.xml (from rev 38541, trunk/bpel/site/site.xml)
===================================================================
--- trunk/bpel/site/category.xml (rev 0)
+++ trunk/bpel/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,40 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools bpel Nightly Build Update Site -->
+ <category-def label="JBoss Tools bpel Nightly Build Update Site" name="JBoss Tools bpel Nightly Build Update Site">
+ <description>JBoss Tools bpel Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.bpel.feature_0.0.0.jar" id="org.jboss.tools.bpel.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.bpel.source.feature_0.0.0.jar" id="org.jboss.tools.bpel.source.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.eclipse.bpel.feature_0.0.0.jar" id="org.eclipse.bpel.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.eclipse.bpel.common.feature_0.0.0.jar" id="org.eclipse.bpel.common.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.eclipse.bpel.jboss.riftsaw.runtime.feature_0.0.0.jar" id="org.eclipse.bpel.jboss.riftsaw.runtime.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+
+ <feature url="features/org.eclipse.bpel.apache.ode.runtime.feature_0.0.0.jar" id="org.eclipse.bpel.apache.ode.runtime.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <!-- TODO: COMING SOON - see JBDS-1810
+ <feature url="features/org.jboss.tools.bpel.runtime.feature_0.0.0.jar" id="org.jboss.tools.bpel.runtime.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ -->
+
+ <feature url="features/org.jboss.tools.bpel.test.feature_0.0.0.jar" id="org.jboss.tools.bpel.test.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.bpel.test.source.feature_0.0.0.jar" id="org.jboss.tools.bpel.test.source.feature" version="0.0.0">
+ <category name="JBoss Tools bpel Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/bpel/site/pom.xml
===================================================================
--- trunk/bpel/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/bpel/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,7 +10,7 @@
<groupId>org.jboss.tools.bpel</groupId>
<artifactId>bpel.site</artifactId>
<version>0.1.0-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
<!--
<repositories>
-->
Deleted: trunk/bpel/site/site.xml
===================================================================
--- trunk/bpel/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/bpel/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,40 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools bpel Nightly Build Update Site -->
- <category-def label="JBoss Tools bpel Nightly Build Update Site" name="JBoss Tools bpel Nightly Build Update Site">
- <description>JBoss Tools bpel Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.bpel.feature_0.0.0.jar" id="org.jboss.tools.bpel.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.bpel.source.feature_0.0.0.jar" id="org.jboss.tools.bpel.source.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.eclipse.bpel.feature_0.0.0.jar" id="org.eclipse.bpel.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.eclipse.bpel.common.feature_0.0.0.jar" id="org.eclipse.bpel.common.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.eclipse.bpel.jboss.riftsaw.runtime.feature_0.0.0.jar" id="org.eclipse.bpel.jboss.riftsaw.runtime.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
-
- <feature url="features/org.eclipse.bpel.apache.ode.runtime.feature_0.0.0.jar" id="org.eclipse.bpel.apache.ode.runtime.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- <!-- TODO: COMING SOON - see JBDS-1810
- <feature url="features/org.jboss.tools.bpel.runtime.feature_0.0.0.jar" id="org.jboss.tools.bpel.runtime.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- -->
-
- <feature url="features/org.jboss.tools.bpel.test.feature_0.0.0.jar" id="org.jboss.tools.bpel.test.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.bpel.test.source.feature_0.0.0.jar" id="org.jboss.tools.bpel.test.source.feature" version="0.0.0">
- <category name="JBoss Tools bpel Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/cdi/site/category.xml (from rev 38541, trunk/cdi/site/site.xml)
===================================================================
--- trunk/cdi/site/category.xml (rev 0)
+++ trunk/cdi/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools cdi Nightly Build Update Site -->
+ <category-def label="JBoss Tools cdi Nightly Build Update Site" name="JBoss Tools cdi Nightly Build Update Site">
+ <description>JBoss Tools cdi Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.cdi.feature_0.0.0.jar" id="org.jboss.tools.cdi.feature" version="0.0.0">
+ <category name="JBoss Tools cdi Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.cdi.seam.feature_0.0.0.jar" id="org.jboss.tools.cdi.seam.feature" version="0.0.0">
+ <category name="JBoss Tools cdi Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.cdi.test.feature_0.0.0.jar" id="org.jboss.tools.cdi.test.feature" version="0.0.0">
+ <category name="JBoss Tools cdi Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.cdi.seam.test.feature_0.0.0.jar" id="org.jboss.tools.cdi.seam.test.feature" version="0.0.0">
+ <category name="JBoss Tools cdi Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/cdi/site/pom.xml
===================================================================
--- trunk/cdi/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/cdi/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>cdi.site</artifactId>
<name>cdi.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/cdi/site/site.xml
===================================================================
--- trunk/cdi/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/cdi/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools cdi Nightly Build Update Site -->
- <category-def label="JBoss Tools cdi Nightly Build Update Site" name="JBoss Tools cdi Nightly Build Update Site">
- <description>JBoss Tools cdi Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.cdi.feature_0.0.0.jar" id="org.jboss.tools.cdi.feature" version="0.0.0">
- <category name="JBoss Tools cdi Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.cdi.seam.feature_0.0.0.jar" id="org.jboss.tools.cdi.seam.feature" version="0.0.0">
- <category name="JBoss Tools cdi Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.cdi.test.feature_0.0.0.jar" id="org.jboss.tools.cdi.test.feature" version="0.0.0">
- <category name="JBoss Tools cdi Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.cdi.seam.test.feature_0.0.0.jar" id="org.jboss.tools.cdi.seam.test.feature" version="0.0.0">
- <category name="JBoss Tools cdi Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/common/site/category.xml (from rev 38541, trunk/common/site/site.xml)
===================================================================
--- trunk/common/site/category.xml (rev 0)
+++ trunk/common/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools common Nightly Build Update Site -->
+ <category-def label="JBoss Tools common Nightly Build Update Site" name="JBoss Tools common Nightly Build Update Site">
+ <description>JBoss Tools common Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.common.all.feature_0.0.0.jar" id="org.jboss.tools.common.all.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.all.source.feature_0.0.0.jar" id="org.jboss.tools.common.all.source.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+
+ <feature url="features/org.jboss.tools.common.core.feature_0.0.0.jar" id="org.jboss.tools.common.core.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.feature_0.0.0.jar" id="org.jboss.tools.common.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.text.ext.feature_0.0.0.jar" id="org.jboss.tools.common.text.ext.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.ui.feature_0.0.0.jar" id="org.jboss.tools.common.ui.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.verification.feature_0.0.0.jar" id="org.jboss.tools.common.verification.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+
+ <feature url="features/org.jboss.tools.common.jdt.feature_0.0.0.jar" id="org.jboss.tools.common.jdt.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.jdt.source.feature_0.0.0.jar" id="org.jboss.tools.common.jdt.source.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+
+ <feature url="features/org.jboss.tools.common.mylyn.feature_0.0.0.jar" id="org.jboss.tools.common.mylyn.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.mylyn.source.feature_0.0.0.jar" id="org.jboss.tools.common.mylyn.source.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+
+ <feature url="features/org.jboss.tools.common.all.test.feature_0.0.0.jar" id="org.jboss.tools.common.all.test.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.common.all.test.source.feature_0.0.0.jar" id="org.jboss.tools.common.all.test.source.feature" version="0.0.0">
+ <category name="JBoss Tools common Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/common/site/pom.xml
===================================================================
--- trunk/common/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/common/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -9,5 +9,5 @@
<groupId>org.jboss.tools.common</groupId>
<artifactId>common.site</artifactId>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/common/site/site.xml
===================================================================
--- trunk/common/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/common/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,52 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools common Nightly Build Update Site -->
- <category-def label="JBoss Tools common Nightly Build Update Site" name="JBoss Tools common Nightly Build Update Site">
- <description>JBoss Tools common Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.common.all.feature_0.0.0.jar" id="org.jboss.tools.common.all.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.all.source.feature_0.0.0.jar" id="org.jboss.tools.common.all.source.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
-
- <feature url="features/org.jboss.tools.common.core.feature_0.0.0.jar" id="org.jboss.tools.common.core.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.feature_0.0.0.jar" id="org.jboss.tools.common.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.text.ext.feature_0.0.0.jar" id="org.jboss.tools.common.text.ext.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.ui.feature_0.0.0.jar" id="org.jboss.tools.common.ui.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.verification.feature_0.0.0.jar" id="org.jboss.tools.common.verification.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
-
- <feature url="features/org.jboss.tools.common.jdt.feature_0.0.0.jar" id="org.jboss.tools.common.jdt.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.jdt.source.feature_0.0.0.jar" id="org.jboss.tools.common.jdt.source.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
-
- <feature url="features/org.jboss.tools.common.mylyn.feature_0.0.0.jar" id="org.jboss.tools.common.mylyn.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.mylyn.source.feature_0.0.0.jar" id="org.jboss.tools.common.mylyn.source.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
-
- <feature url="features/org.jboss.tools.common.all.test.feature_0.0.0.jar" id="org.jboss.tools.common.all.test.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.common.all.test.source.feature_0.0.0.jar" id="org.jboss.tools.common.all.test.source.feature" version="0.0.0">
- <category name="JBoss Tools common Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/deltacloud/site/category.xml (from rev 38541, trunk/deltacloud/site/site.xml)
===================================================================
--- trunk/deltacloud/site/category.xml (rev 0)
+++ trunk/deltacloud/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools as Nightly Build Update Site -->
+ <category-def label="JBoss Tools Deltacloud Nightly Build Update Site" name="JBoss Tools Deltacloud Nightly Build Update Site">
+ <description>JBoss Tools Deltacloud Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.deltacloud.feature_0.0.0.jar" id="org.jboss.tools.deltacloud.feature" version="0.0.0">
+ <category name="JBoss Tools Deltacloud Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.deltacloud.test.feature_0.0.0.jar" id="org.jboss.tools.deltacloud.test.feature" version="0.0.0">
+ <category name="JBoss Tools Deltacloud Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/deltacloud/site/pom.xml
===================================================================
--- trunk/deltacloud/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/deltacloud/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>deltacloud.site</artifactId>
<name>deltacloud.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/deltacloud/site/site.xml
===================================================================
--- trunk/deltacloud/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/deltacloud/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools as Nightly Build Update Site -->
- <category-def label="JBoss Tools Deltacloud Nightly Build Update Site" name="JBoss Tools Deltacloud Nightly Build Update Site">
- <description>JBoss Tools Deltacloud Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.deltacloud.feature_0.0.0.jar" id="org.jboss.tools.deltacloud.feature" version="0.0.0">
- <category name="JBoss Tools Deltacloud Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.deltacloud.test.feature_0.0.0.jar" id="org.jboss.tools.deltacloud.test.feature" version="0.0.0">
- <category name="JBoss Tools Deltacloud Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/esb/site/category.xml (from rev 38541, trunk/esb/site/site.xml)
===================================================================
--- trunk/esb/site/category.xml (rev 0)
+++ trunk/esb/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools esb Nightly Build Update Site -->
+ <category-def label="JBoss Tools esb Nightly Build Update Site" name="JBoss Tools esb Nightly Build Update Site">
+ <description>JBoss Tools esb Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.esb.feature_0.0.0.jar" id="org.jboss.tools.esb.feature" version="0.0.0">
+ <category name="JBoss Tools esb Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.esb.test.feature_0.0.0.jar" id="org.jboss.tools.esb.test.feature" version="0.0.0">
+ <category name="JBoss Tools esb Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/esb/site/pom.xml
===================================================================
--- trunk/esb/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/esb/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>esb.site</artifactId>
<name>esb.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/esb/site/site.xml
===================================================================
--- trunk/esb/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/esb/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools esb Nightly Build Update Site -->
- <category-def label="JBoss Tools esb Nightly Build Update Site" name="JBoss Tools esb Nightly Build Update Site">
- <description>JBoss Tools esb Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.esb.feature_0.0.0.jar" id="org.jboss.tools.esb.feature" version="0.0.0">
- <category name="JBoss Tools esb Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.esb.test.feature_0.0.0.jar" id="org.jboss.tools.esb.test.feature" version="0.0.0">
- <category name="JBoss Tools esb Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/examples/site/category.xml (from rev 38541, trunk/examples/site/site.xml)
===================================================================
--- trunk/examples/site/category.xml (rev 0)
+++ trunk/examples/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools examples Nightly Build Update Site -->
+ <category-def label="JBoss Tools examples Nightly Build Update Site" name="JBoss Tools examples Nightly Build Update Site">
+ <description>JBoss Tools examples Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar" id="org.jboss.tools.project.examples.feature" version="0.0.0">
+ <category name="JBoss Tools examples Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.community.project.examples.feature_0.0.0.jar" id="org.jboss.tools.community.project.examples.feature" version="0.0.0">
+ <category name="JBoss Tools examples Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.project.examples.test.feature_0.0.0.jar" id="org.jboss.tools.project.examples.test.feature" version="0.0.0">
+ <category name="JBoss Tools examples Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/examples/site/pom.xml
===================================================================
--- trunk/examples/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/examples/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>examples.site</artifactId>
<name>examples.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/examples/site/site.xml
===================================================================
--- trunk/examples/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/examples/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools examples Nightly Build Update Site -->
- <category-def label="JBoss Tools examples Nightly Build Update Site" name="JBoss Tools examples Nightly Build Update Site">
- <description>JBoss Tools examples Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.project.examples.feature_0.0.0.jar" id="org.jboss.tools.project.examples.feature" version="0.0.0">
- <category name="JBoss Tools examples Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.community.project.examples.feature_0.0.0.jar" id="org.jboss.tools.community.project.examples.feature" version="0.0.0">
- <category name="JBoss Tools examples Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.project.examples.test.feature_0.0.0.jar" id="org.jboss.tools.project.examples.test.feature" version="0.0.0">
- <category name="JBoss Tools examples Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/flow/site/category.xml (from rev 38541, trunk/flow/site/site.xml)
===================================================================
--- trunk/flow/site/category.xml (rev 0)
+++ trunk/flow/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools flow Nightly Build Update Site -->
+ <category-def label="JBoss Tools flow Nightly Build Update Site" name="JBoss Tools flow Nightly Build Update Site">
+ <description>JBoss Tools flow Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.flow.common.feature_0.0.0.jar" id="org.jboss.tools.flow.common.feature" version="0.0.0">
+ <category name="JBoss Tools flow Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.flow.common.test.feature_0.0.0.jar" id="org.jboss.tools.flow.common.test.feature" version="0.0.0">
+ <category name="JBoss Tools flow Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/flow/site/pom.xml
===================================================================
--- trunk/flow/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/flow/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>flow.site</artifactId>
<name>flow.site</name>
<version>0.0.1-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/flow/site/site.xml
===================================================================
--- trunk/flow/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/flow/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools flow Nightly Build Update Site -->
- <category-def label="JBoss Tools flow Nightly Build Update Site" name="JBoss Tools flow Nightly Build Update Site">
- <description>JBoss Tools flow Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.flow.common.feature_0.0.0.jar" id="org.jboss.tools.flow.common.feature" version="0.0.0">
- <category name="JBoss Tools flow Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.flow.common.test.feature_0.0.0.jar" id="org.jboss.tools.flow.common.test.feature" version="0.0.0">
- <category name="JBoss Tools flow Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/forge/site/category.xml (from rev 38541, trunk/forge/site/site.xml)
===================================================================
--- trunk/forge/site/category.xml (rev 0)
+++ trunk/forge/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools Forge Nightly Build Update Site -->
+ <category-def label="JBoss Tools Forge Nightly Build Update Site" name="JBoss Tools Forge Nightly Build Update Site">
+ <description>JBoss Tools Forge Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.forge.feature_0.0.0.jar" id="org.jboss.tools.forge.feature" version="0.0.0">
+ <category name="JBoss Tools Forge Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.forge.test.feature_0.0.0.jar" id="org.jboss.tools.forge.test.feature" version="0.0.0">
+ <category name="JBoss Tools Forge Nightly Build Update Site"/>
+ </feature>
+</site>
Modified: trunk/forge/site/pom.xml
===================================================================
--- trunk/forge/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/forge/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>forge.site</artifactId>
<name>forge.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/forge/site/site.xml
===================================================================
--- trunk/forge/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/forge/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools Forge Nightly Build Update Site -->
- <category-def label="JBoss Tools Forge Nightly Build Update Site" name="JBoss Tools Forge Nightly Build Update Site">
- <description>JBoss Tools Forge Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.forge.feature_0.0.0.jar" id="org.jboss.tools.forge.feature" version="0.0.0">
- <category name="JBoss Tools Forge Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.forge.test.feature_0.0.0.jar" id="org.jboss.tools.forge.test.feature" version="0.0.0">
- <category name="JBoss Tools Forge Nightly Build Update Site"/>
- </feature>
-</site>
Copied: trunk/freemarker/site/category.xml (from rev 38541, trunk/freemarker/site/site.xml)
===================================================================
--- trunk/freemarker/site/category.xml (rev 0)
+++ trunk/freemarker/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools freemarker Nightly Build Update Site -->
+ <category-def label="JBoss Tools freemarker Nightly Build Update Site" name="JBoss Tools freemarker Nightly Build Update Site">
+ <description>JBoss Tools freemarker Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.ide.eclipse.freemarker.feature_0.0.0.jar" id="org.jboss.ide.eclipse.freemarker.feature" version="0.0.0">
+ <category name="JBoss Tools freemarker Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.ide.eclipse.freemarker.test.feature_0.0.0.jar" id="org.jboss.ide.eclipse.freemarker.test.feature" version="0.0.0">
+ <category name="JBoss Tools freemarker Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/freemarker/site/pom.xml
===================================================================
--- trunk/freemarker/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/freemarker/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -9,5 +9,5 @@
<groupId>org.jboss.tools.freemarker</groupId>
<artifactId>freemarker.site</artifactId>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/freemarker/site/site.xml
===================================================================
--- trunk/freemarker/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/freemarker/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools freemarker Nightly Build Update Site -->
- <category-def label="JBoss Tools freemarker Nightly Build Update Site" name="JBoss Tools freemarker Nightly Build Update Site">
- <description>JBoss Tools freemarker Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.ide.eclipse.freemarker.feature_0.0.0.jar" id="org.jboss.ide.eclipse.freemarker.feature" version="0.0.0">
- <category name="JBoss Tools freemarker Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.ide.eclipse.freemarker.test.feature_0.0.0.jar" id="org.jboss.ide.eclipse.freemarker.test.feature" version="0.0.0">
- <category name="JBoss Tools freemarker Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/gwt/site/category.xml (from rev 38541, trunk/gwt/site/site.xml)
===================================================================
--- trunk/gwt/site/category.xml (rev 0)
+++ trunk/gwt/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools GWT Integration Nightly Build Update Site -->
+ <category-def label="JBoss Tools GWT Integration Nightly Build Update Site" name="JBoss Tools GWT Integration Nightly Build Update Site">
+ <description>JBoss Tools GWT Integration Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.gwt.feature_0.0.0.jar" id="org.jboss.tools.gwt.feature" version="0.0.0">
+ <category name="JBoss Tools GWT Integration Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/gwt/site/pom.xml
===================================================================
--- trunk/gwt/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/gwt/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>gwt.site</artifactId>
<name>gwt.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/gwt/site/site.xml
===================================================================
--- trunk/gwt/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/gwt/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools GWT Integration Nightly Build Update Site -->
- <category-def label="JBoss Tools GWT Integration Nightly Build Update Site" name="JBoss Tools GWT Integration Nightly Build Update Site">
- <description>JBoss Tools GWT Integration Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.gwt.feature_0.0.0.jar" id="org.jboss.tools.gwt.feature" version="0.0.0">
- <category name="JBoss Tools GWT Integration Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/hibernatetools/site/category.xml (from rev 38541, trunk/hibernatetools/site/site.xml)
===================================================================
--- trunk/hibernatetools/site/category.xml (rev 0)
+++ trunk/hibernatetools/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools hibernatetools Nightly Build Update Site -->
+ <category-def label="JBoss Tools hibernatetools Nightly Build Update Site" name="JBoss Tools hibernatetools Nightly Build Update Site">
+ <description>JBoss Tools hibernatetools Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.hibernate.eclipse.feature_0.0.0.jar" id="org.hibernate.eclipse.feature" version="0.0.0">
+ <category name="JBoss Tools hibernatetools Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.hibernate.eclipse.test.feature_0.0.0.jar" id="org.hibernate.eclipse.test.feature" version="0.0.0">
+ <category name="JBoss Tools hibernatetools Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/hibernatetools/site/pom.xml
===================================================================
--- trunk/hibernatetools/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/hibernatetools/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>hibernatetools.site</artifactId>
<name>hibernatetools.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/hibernatetools/site/site.xml
===================================================================
--- trunk/hibernatetools/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/hibernatetools/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools hibernatetools Nightly Build Update Site -->
- <category-def label="JBoss Tools hibernatetools Nightly Build Update Site" name="JBoss Tools hibernatetools Nightly Build Update Site">
- <description>JBoss Tools hibernatetools Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.hibernate.eclipse.feature_0.0.0.jar" id="org.hibernate.eclipse.feature" version="0.0.0">
- <category name="JBoss Tools hibernatetools Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.hibernate.eclipse.test.feature_0.0.0.jar" id="org.hibernate.eclipse.test.feature" version="0.0.0">
- <category name="JBoss Tools hibernatetools Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/jbpm/site/category.xml (from rev 38541, trunk/jbpm/site/site.xml)
===================================================================
--- trunk/jbpm/site/category.xml (rev 0)
+++ trunk/jbpm/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools jbpm Nightly Build Update Site -->
+ <category-def label="JBoss Tools jbpm Nightly Build Update Site" name="JBoss Tools jbpm Nightly Build Update Site">
+ <description>JBoss Tools jbpm Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.flow.jpdl4.feature_0.0.0.jar" id="org.jboss.tools.flow.jpdl4.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jbpm.common.feature_0.0.0.jar" id="org.jboss.tools.jbpm.common.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jbpm.convert.feature_0.0.0.jar" id="org.jboss.tools.jbpm.convert.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jbpm3.feature_0.0.0.jar" id="org.jboss.tools.jbpm3.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jbpm4.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jbpm.gd.jpdl.feature_0.0.0.jar" id="org.jbpm.gd.jpdl.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jbpm3.test.feature_0.0.0.jar" id="org.jboss.tools.jbpm3.test.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jbpm4.test.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.test.feature" version="0.0.0">
+ <category name="JBoss Tools jbpm Nightly Build Update Site"/>
+ </feature>
+</site>
Modified: trunk/jbpm/site/pom.xml
===================================================================
--- trunk/jbpm/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jbpm/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>jbpm.site</artifactId>
<name>jbpm.site</name>
<version>0.0.1-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/jbpm/site/site.xml
===================================================================
--- trunk/jbpm/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jbpm/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools jbpm Nightly Build Update Site -->
- <category-def label="JBoss Tools jbpm Nightly Build Update Site" name="JBoss Tools jbpm Nightly Build Update Site">
- <description>JBoss Tools jbpm Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.flow.jpdl4.feature_0.0.0.jar" id="org.jboss.tools.flow.jpdl4.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jbpm.common.feature_0.0.0.jar" id="org.jboss.tools.jbpm.common.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jbpm.convert.feature_0.0.0.jar" id="org.jboss.tools.jbpm.convert.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jbpm3.feature_0.0.0.jar" id="org.jboss.tools.jbpm3.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jbpm4.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jbpm.gd.jpdl.feature_0.0.0.jar" id="org.jbpm.gd.jpdl.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jbpm3.test.feature_0.0.0.jar" id="org.jboss.tools.jbpm3.test.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jbpm4.test.feature_0.0.0.jar" id="org.jboss.tools.jbpm4.test.feature" version="0.0.0">
- <category name="JBoss Tools jbpm Nightly Build Update Site"/>
- </feature>
-</site>
Copied: trunk/jmx/site/category.xml (from rev 38541, trunk/jmx/site/site.xml)
===================================================================
--- trunk/jmx/site/category.xml (rev 0)
+++ trunk/jmx/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools jmx Nightly Build Update Site -->
+ <category-def label="JBoss Tools jmx Nightly Build Update Site" name="JBoss Tools jmx Nightly Build Update Site">
+ <description>JBoss Tools jmx Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.jmx.feature_0.0.0.jar" id="org.jboss.tools.jmx.feature" version="0.0.0">
+ <category name="JBoss Tools jmx Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jmx.source.feature_0.0.0.jar" id="org.jboss.tools.jmx.source.feature" version="0.0.0">
+ <category name="JBoss Tools jmx Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jmx.test.feature_0.0.0.jar" id="org.jboss.tools.jmx.test.feature" version="0.0.0">
+ <category name="JBoss Tools jmx Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jmx.test.source.feature_0.0.0.jar" id="org.jboss.tools.jmx.test.source.feature" version="0.0.0">
+ <category name="JBoss Tools jmx Nightly Build Update Site"/>
+ </feature>
+</site>
Modified: trunk/jmx/site/pom.xml
===================================================================
--- trunk/jmx/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jmx/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>jmx.site</artifactId>
<name>jmx.site</name>
<version>1.2.0-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/jmx/site/site.xml
===================================================================
--- trunk/jmx/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jmx/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools jmx Nightly Build Update Site -->
- <category-def label="JBoss Tools jmx Nightly Build Update Site" name="JBoss Tools jmx Nightly Build Update Site">
- <description>JBoss Tools jmx Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.jmx.feature_0.0.0.jar" id="org.jboss.tools.jmx.feature" version="0.0.0">
- <category name="JBoss Tools jmx Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jmx.source.feature_0.0.0.jar" id="org.jboss.tools.jmx.source.feature" version="0.0.0">
- <category name="JBoss Tools jmx Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jmx.test.feature_0.0.0.jar" id="org.jboss.tools.jmx.test.feature" version="0.0.0">
- <category name="JBoss Tools jmx Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jmx.test.source.feature_0.0.0.jar" id="org.jboss.tools.jmx.test.source.feature" version="0.0.0">
- <category name="JBoss Tools jmx Nightly Build Update Site"/>
- </feature>
-</site>
Copied: trunk/jsf/site/category.xml (from rev 38541, trunk/jsf/site/site.xml)
===================================================================
--- trunk/jsf/site/category.xml (rev 0)
+++ trunk/jsf/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools jsf Nightly Build Update Site -->
+ <category-def label="JBoss Tools jsf Nightly Build Update Site" name="JBoss Tools jsf Nightly Build Update Site">
+ <description>JBoss Tools jsf Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.jsf.feature_0.0.0.jar" id="org.jboss.tools.jsf.feature" version="0.0.0">
+ <category name="JBoss Tools jsf Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jsf.test.feature_0.0.0.jar" id="org.jboss.tools.jsf.test.feature" version="0.0.0">
+ <category name="JBoss Tools jsf Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.richfaces.feature_0.0.0.jar" id="org.jboss.tools.richfaces.feature" version="0.0.0">
+ <category name="JBoss Tools jsf Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/jsf/site/pom.xml
===================================================================
--- trunk/jsf/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jsf/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>jsf.site</artifactId>
<name>jsf.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/jsf/site/site.xml
===================================================================
--- trunk/jsf/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jsf/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools jsf Nightly Build Update Site -->
- <category-def label="JBoss Tools jsf Nightly Build Update Site" name="JBoss Tools jsf Nightly Build Update Site">
- <description>JBoss Tools jsf Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.jsf.feature_0.0.0.jar" id="org.jboss.tools.jsf.feature" version="0.0.0">
- <category name="JBoss Tools jsf Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jsf.test.feature_0.0.0.jar" id="org.jboss.tools.jsf.test.feature" version="0.0.0">
- <category name="JBoss Tools jsf Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.richfaces.feature_0.0.0.jar" id="org.jboss.tools.richfaces.feature" version="0.0.0">
- <category name="JBoss Tools jsf Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/jst/site/category.xml (from rev 38541, trunk/jst/site/site.xml)
===================================================================
--- trunk/jst/site/category.xml (rev 0)
+++ trunk/jst/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools jst Nightly Build Update Site -->
+ <category-def label="JBoss Tools jst Nightly Build Update Site" name="JBoss Tools jst Nightly Build Update Site">
+ <description>JBoss Tools jst Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.jst.feature_0.0.0.jar" id="org.jboss.tools.jst.feature" version="0.0.0">
+ <category name="JBoss Tools jst Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jst.test.feature_0.0.0.jar" id="org.jboss.tools.jst.test.feature" version="0.0.0">
+ <category name="JBoss Tools JST Tests Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.jst.web.tiles.feature_0.0.0.jar" id="org.jboss.tools.jst.web.tiles.feature" version="0.0.0">
+ <category name="JBoss Tools jst Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/jst/site/pom.xml
===================================================================
--- trunk/jst/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jst/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>jst.site</artifactId>
<name>jst.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/jst/site/site.xml
===================================================================
--- trunk/jst/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/jst/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools jst Nightly Build Update Site -->
- <category-def label="JBoss Tools jst Nightly Build Update Site" name="JBoss Tools jst Nightly Build Update Site">
- <description>JBoss Tools jst Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.jst.feature_0.0.0.jar" id="org.jboss.tools.jst.feature" version="0.0.0">
- <category name="JBoss Tools jst Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jst.test.feature_0.0.0.jar" id="org.jboss.tools.jst.test.feature" version="0.0.0">
- <category name="JBoss Tools JST Tests Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.jst.web.tiles.feature_0.0.0.jar" id="org.jboss.tools.jst.web.tiles.feature" version="0.0.0">
- <category name="JBoss Tools jst Nightly Build Update Site"/>
- </feature>
-
-</site>
Modified: trunk/maven/features/pom.xml
===================================================================
--- trunk/maven/features/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/maven/features/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -26,5 +26,22 @@
<module>org.jboss.tools.maven.jpa.feature</module>
<module>org.jboss.tools.maven.profiles.feature</module>
</modules>
+
+ <repositories>
+ <repository>
+ <id>indigo</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/releases/indigo</url>
+ </repository>
+ <repository>
+ <id>wtp</id>
+ <layout>p2</layout>
+ <url>http://download.jboss.org/jbosstools/updates/m2eclipse-wtp/</url>
+ </repository>
+ <repository>
+ <id>swtbot</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/technology/swtbot/helios/dev-build/update-site/</url>
+ </repository>
+ </repositories>
</project>
-
Copied: trunk/maven/site/category.xml (from rev 38541, trunk/maven/site/site.xml)
===================================================================
--- trunk/maven/site/category.xml (rev 0)
+++ trunk/maven/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools maven Nightly Build Update Site -->
+ <category-def label="JBoss Tools maven Nightly Build Update Site" name="JBoss Tools maven Nightly Build Update Site">
+ <description>JBoss Tools maven Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.maven.feature_0.0.0.jar" id="org.jboss.tools.maven.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.seam.feature_0.0.0.jar" id="org.jboss.tools.maven.seam.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.jsf.feature_0.0.0.jar" id="org.jboss.tools.maven.jsf.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.cdi.feature_0.0.0.jar" id="org.jboss.tools.maven.cdi.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.portlet.feature_0.0.0.jar" id="org.jboss.tools.maven.portlet.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.hibernate.feature_0.0.0.jar" id="org.jboss.tools.maven.hibernate.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.project.examples.feature_0.0.0.jar" id="org.jboss.tools.maven.project.examples.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.jaxrs.feature_0.0.0.jar" id="org.jboss.tools.maven.jaxrs.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.jpa.feature_0.0.0.jar" id="org.jboss.tools.maven.jpa.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.jbosspackaging.feature_0.0.0.jar" id="org.jboss.tools.maven.jbosspackaging.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.test.feature_0.0.0.jar" id="org.jboss.tools.maven.test.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.maven.profiles.feature_0.0.0.jar" id="org.jboss.tools.maven.profiles.feature" version="0.0.0">
+ <category name="JBoss Tools maven Nightly Build Update Site"/>
+ </feature>
+</site>
Modified: trunk/maven/site/pom.xml
===================================================================
--- trunk/maven/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/maven/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>maven.site</artifactId>
<name>maven.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/maven/site/site.xml
===================================================================
--- trunk/maven/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/maven/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,44 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools maven Nightly Build Update Site -->
- <category-def label="JBoss Tools maven Nightly Build Update Site" name="JBoss Tools maven Nightly Build Update Site">
- <description>JBoss Tools maven Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.maven.feature_0.0.0.jar" id="org.jboss.tools.maven.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.seam.feature_0.0.0.jar" id="org.jboss.tools.maven.seam.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.jsf.feature_0.0.0.jar" id="org.jboss.tools.maven.jsf.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.cdi.feature_0.0.0.jar" id="org.jboss.tools.maven.cdi.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.portlet.feature_0.0.0.jar" id="org.jboss.tools.maven.portlet.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.hibernate.feature_0.0.0.jar" id="org.jboss.tools.maven.hibernate.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.project.examples.feature_0.0.0.jar" id="org.jboss.tools.maven.project.examples.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.jaxrs.feature_0.0.0.jar" id="org.jboss.tools.maven.jaxrs.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.jpa.feature_0.0.0.jar" id="org.jboss.tools.maven.jpa.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.jbosspackaging.feature_0.0.0.jar" id="org.jboss.tools.maven.jbosspackaging.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.test.feature_0.0.0.jar" id="org.jboss.tools.maven.test.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.maven.profiles.feature_0.0.0.jar" id="org.jboss.tools.maven.profiles.feature" version="0.0.0">
- <category name="JBoss Tools maven Nightly Build Update Site"/>
- </feature>
-</site>
Copied: trunk/modeshape/site/category.xml (from rev 38541, trunk/modeshape/site/site.xml)
===================================================================
--- trunk/modeshape/site/category.xml (rev 0)
+++ trunk/modeshape/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools modeshape Nightly Build Update Site -->
+ <category-def label="JBoss Tools modeshape Nightly Build Update Site" name="JBoss Tools modeshape Nightly Build Update Site">
+ <description>JBoss Tools modeshape Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.modeshape.rest.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.feature" version="0.0.0">
+ <category name="JBoss Tools modeshape Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.modeshape.rest.test.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.test.feature" version="0.0.0">
+ <category name="JBoss Tools modeshape Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/modeshape/site/pom.xml
===================================================================
--- trunk/modeshape/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/modeshape/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>modeshape.site</artifactId>
<name>modeshape.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/modeshape/site/site.xml
===================================================================
--- trunk/modeshape/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/modeshape/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools modeshape Nightly Build Update Site -->
- <category-def label="JBoss Tools modeshape Nightly Build Update Site" name="JBoss Tools modeshape Nightly Build Update Site">
- <description>JBoss Tools modeshape Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.modeshape.rest.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.feature" version="0.0.0">
- <category name="JBoss Tools modeshape Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.modeshape.rest.test.feature_0.0.0.jar" id="org.jboss.tools.modeshape.rest.test.feature" version="0.0.0">
- <category name="JBoss Tools modeshape Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/openshift/site/category.xml (from rev 38541, trunk/openshift/site/site.xml)
===================================================================
--- trunk/openshift/site/category.xml (rev 0)
+++ trunk/openshift/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools as Nightly Build Update Site -->
+ <category-def label="JBoss Tools OpenShift Nightly Build Update Site" name="JBoss Tools OpenShift Nightly Build Update Site">
+ <description>JBoss Tools OpenShift Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.openshift.egit.integration.feature_0.0.0.jar" id="org.jboss.tools.openshift.egit.integration.feature" version="0.0.0">
+ <category name="JBoss Tools OpenShift Nightly Build Update Site" />
+ </feature>
+ <feature url="features/org.jboss.tools.openshift.egit.integration.source.feature_0.0.0.jar" id="org.jboss.tools.openshift.egit.integration.source.feature" version="0.0.0">
+ <category name="JBoss Tools OpenShift Nightly Build Update Site" />
+ </feature>
+
+ <feature url="features/org.jboss.tools.openshift.express.feature_0.0.0.jar" id="org.jboss.tools.openshift.express.feature" version="0.0.0">
+ <category name="JBoss Tools OpenShift Nightly Build Update Site" />
+ </feature>
+ <feature url="features/org.jboss.tools.openshift.express.source.feature_0.0.0.jar" id="org.jboss.tools.openshift.express.source.feature" version="0.0.0">
+ <category name="JBoss Tools OpenShift Nightly Build Update Site" />
+ </feature>
+</site>
Modified: trunk/openshift/site/pom.xml
===================================================================
--- trunk/openshift/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/openshift/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -8,5 +8,5 @@
</parent>
<groupId>org.jboss.tools.openshift</groupId>
<artifactId>openshift.site</artifactId>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/openshift/site/site.xml
===================================================================
--- trunk/openshift/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/openshift/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools as Nightly Build Update Site -->
- <category-def label="JBoss Tools OpenShift Nightly Build Update Site" name="JBoss Tools OpenShift Nightly Build Update Site">
- <description>JBoss Tools OpenShift Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.openshift.egit.integration.feature_0.0.0.jar" id="org.jboss.tools.openshift.egit.integration.feature" version="0.0.0">
- <category name="JBoss Tools OpenShift Nightly Build Update Site" />
- </feature>
- <feature url="features/org.jboss.tools.openshift.egit.integration.source.feature_0.0.0.jar" id="org.jboss.tools.openshift.egit.integration.source.feature" version="0.0.0">
- <category name="JBoss Tools OpenShift Nightly Build Update Site" />
- </feature>
-
- <feature url="features/org.jboss.tools.openshift.express.feature_0.0.0.jar" id="org.jboss.tools.openshift.express.feature" version="0.0.0">
- <category name="JBoss Tools OpenShift Nightly Build Update Site" />
- </feature>
- <feature url="features/org.jboss.tools.openshift.express.source.feature_0.0.0.jar" id="org.jboss.tools.openshift.express.source.feature" version="0.0.0">
- <category name="JBoss Tools OpenShift Nightly Build Update Site" />
- </feature>
-</site>
Copied: trunk/portlet/site/category.xml (from rev 38541, trunk/portlet/site/site.xml)
===================================================================
--- trunk/portlet/site/category.xml (rev 0)
+++ trunk/portlet/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools portlet Nightly Build Update Site -->
+ <category-def label="JBoss Tools portlet Nightly Build Update Site" name="JBoss Tools portlet Nightly Build Update Site">
+ <description>JBoss Tools portlet Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.portlet.feature_0.0.0.jar" id="org.jboss.tools.portlet.feature" version="0.0.0">
+ <category name="JBoss Tools portlet Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.portlet.test.feature_0.0.0.jar" id="org.jboss.tools.portlet.test.feature" version="0.0.0">
+ <category name="JBoss Tools portlet Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/portlet/site/pom.xml
===================================================================
--- trunk/portlet/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/portlet/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>portlet.site</artifactId>
<name>portlet.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/portlet/site/site.xml
===================================================================
--- trunk/portlet/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/portlet/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools portlet Nightly Build Update Site -->
- <category-def label="JBoss Tools portlet Nightly Build Update Site" name="JBoss Tools portlet Nightly Build Update Site">
- <description>JBoss Tools portlet Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.portlet.feature_0.0.0.jar" id="org.jboss.tools.portlet.feature" version="0.0.0">
- <category name="JBoss Tools portlet Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.portlet.test.feature_0.0.0.jar" id="org.jboss.tools.portlet.test.feature" version="0.0.0">
- <category name="JBoss Tools portlet Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/runtime/site/category.xml (from rev 38541, trunk/runtime/site/site.xml)
===================================================================
--- trunk/runtime/site/category.xml (rev 0)
+++ trunk/runtime/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>
+ To install these features, point Eclipse at this site.
+ </description>
+ <category-def name="JBoss Tools runtime Nightly Build Update Site" label="JBoss Tools runtime Nightly Build Update Site">
+ <description>
+ JBoss Tools runtime Nightly Build Update Site: contains all features in this build.
+ </description>
+ </category-def>
+ <feature url="features/org.jboss.tools.runtime.core.feature_0.0.0.jar" id="org.jboss.tools.runtime.core.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.runtime.as.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.as.detector.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.runtime.drools.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.drools.detector.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.runtime.esb.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.esb.detector.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.runtime.jbpm.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.jbpm.detector.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.runtime.seam.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.seam.detector.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.runtime.test.feature_0.0.0.jar" id="org.jboss.tools.runtime.test.feature" version="0.0.0">
+ <category name="JBoss Tools runtime Nightly Build Update Site"/>
+ </feature>
+</site>
Modified: trunk/runtime/site/pom.xml
===================================================================
--- trunk/runtime/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/runtime/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>runtime.site</artifactId>
<name>runtime.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/runtime/site/site.xml
===================================================================
--- trunk/runtime/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/runtime/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>
- To install these features, point Eclipse at this site.
- </description>
- <category-def name="JBoss Tools runtime Nightly Build Update Site" label="JBoss Tools runtime Nightly Build Update Site">
- <description>
- JBoss Tools runtime Nightly Build Update Site: contains all features in this build.
- </description>
- </category-def>
- <feature url="features/org.jboss.tools.runtime.core.feature_0.0.0.jar" id="org.jboss.tools.runtime.core.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.runtime.as.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.as.detector.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.runtime.drools.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.drools.detector.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.runtime.esb.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.esb.detector.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.runtime.jbpm.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.jbpm.detector.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.runtime.seam.detector.feature_0.0.0.jar" id="org.jboss.tools.runtime.seam.detector.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.runtime.test.feature_0.0.0.jar" id="org.jboss.tools.runtime.test.feature" version="0.0.0">
- <category name="JBoss Tools runtime Nightly Build Update Site"/>
- </feature>
-</site>
Copied: trunk/seam/site/category.xml (from rev 38541, trunk/seam/site/site.xml)
===================================================================
--- trunk/seam/site/category.xml (rev 0)
+++ trunk/seam/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools seam Nightly Build Update Site -->
+ <category-def label="JBoss Tools seam Nightly Build Update Site" name="JBoss Tools seam Nightly Build Update Site">
+ <description>JBoss Tools seam Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.seam.feature_0.0.0.jar" id="org.jboss.tools.seam.feature" version="0.0.0">
+ <category name="JBoss Tools seam Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.seam.test.feature_0.0.0.jar" id="org.jboss.tools.seam.test.feature" version="0.0.0">
+ <category name="JBoss Tools seam Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/seam/site/pom.xml
===================================================================
--- trunk/seam/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/seam/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>seam.site</artifactId>
<name>seam.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/seam/site/site.xml
===================================================================
--- trunk/seam/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/seam/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools seam Nightly Build Update Site -->
- <category-def label="JBoss Tools seam Nightly Build Update Site" name="JBoss Tools seam Nightly Build Update Site">
- <description>JBoss Tools seam Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.seam.feature_0.0.0.jar" id="org.jboss.tools.seam.feature" version="0.0.0">
- <category name="JBoss Tools seam Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.seam.test.feature_0.0.0.jar" id="org.jboss.tools.seam.test.feature" version="0.0.0">
- <category name="JBoss Tools seam Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/smooks/site/category.xml (from rev 38541, trunk/smooks/site/site.xml)
===================================================================
--- trunk/smooks/site/category.xml (rev 0)
+++ trunk/smooks/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools smooks Nightly Build Update Site -->
+ <category-def label="JBoss Tools smooks Nightly Build Update Site" name="JBoss Tools smooks Nightly Build Update Site">
+ <description>JBoss Tools smooks Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.smooks.feature_0.0.0.jar" id="org.jboss.tools.smooks.feature" version="0.0.0">
+ <category name="JBoss Tools smooks Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.smooks.test.feature_0.0.0.jar" id="org.jboss.tools.smooks.test.feature" version="0.0.0">
+ <category name="JBoss Tools smooks Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/smooks/site/pom.xml
===================================================================
--- trunk/smooks/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/smooks/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>smooks.site</artifactId>
<name>smooks.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/smooks/site/site.xml
===================================================================
--- trunk/smooks/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/smooks/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools smooks Nightly Build Update Site -->
- <category-def label="JBoss Tools smooks Nightly Build Update Site" name="JBoss Tools smooks Nightly Build Update Site">
- <description>JBoss Tools smooks Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.smooks.feature_0.0.0.jar" id="org.jboss.tools.smooks.feature" version="0.0.0">
- <category name="JBoss Tools smooks Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.smooks.test.feature_0.0.0.jar" id="org.jboss.tools.smooks.test.feature" version="0.0.0">
- <category name="JBoss Tools smooks Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/struts/site/category.xml (from rev 38541, trunk/struts/site/site.xml)
===================================================================
--- trunk/struts/site/category.xml (rev 0)
+++ trunk/struts/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools struts Nightly Build Update Site -->
+ <category-def label="JBoss Tools struts Nightly Build Update Site" name="JBoss Tools struts Nightly Build Update Site">
+ <description>JBoss Tools struts Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.struts.feature_0.0.0.jar" id="org.jboss.tools.struts.feature" version="0.0.0">
+ <category name="JBoss Tools struts Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.struts.test.feature_0.0.0.jar" id="org.jboss.tools.struts.test.feature" version="0.0.0">
+ <category name="JBoss Tools struts Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/struts/site/pom.xml
===================================================================
--- trunk/struts/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/struts/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>struts.site</artifactId>
<name>struts.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/struts/site/site.xml
===================================================================
--- trunk/struts/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/struts/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools struts Nightly Build Update Site -->
- <category-def label="JBoss Tools struts Nightly Build Update Site" name="JBoss Tools struts Nightly Build Update Site">
- <description>JBoss Tools struts Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.struts.feature_0.0.0.jar" id="org.jboss.tools.struts.feature" version="0.0.0">
- <category name="JBoss Tools struts Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.struts.test.feature_0.0.0.jar" id="org.jboss.tools.struts.test.feature" version="0.0.0">
- <category name="JBoss Tools struts Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/tests/site/category.xml (from rev 38541, trunk/tests/site/site.xml)
===================================================================
--- trunk/tests/site/category.xml (rev 0)
+++ trunk/tests/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools tests Nightly Build Update Site -->
+ <category-def label="JBoss Tools tests Nightly Build Update Site" name="JBoss Tools tests Nightly Build Update Site">
+ <description>JBoss Tools tests Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.test.feature_0.0.0.jar" id="org.jboss.tools.test.feature" version="0.0.0">
+ <category name="JBoss Tools tests Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.test.source.feature_0.0.0.jar" id="org.jboss.tools.test.source.feature" version="0.0.0">
+ <category name="JBoss Tools tests Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/tests/site/pom.xml
===================================================================
--- trunk/tests/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/tests/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -9,5 +9,5 @@
<groupId>org.jboss.tools.tests</groupId>
<artifactId>tests.site</artifactId>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/tests/site/site.xml
===================================================================
--- trunk/tests/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/tests/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools tests Nightly Build Update Site -->
- <category-def label="JBoss Tools tests Nightly Build Update Site" name="JBoss Tools tests Nightly Build Update Site">
- <description>JBoss Tools tests Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.test.feature_0.0.0.jar" id="org.jboss.tools.test.feature" version="0.0.0">
- <category name="JBoss Tools tests Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.test.source.feature_0.0.0.jar" id="org.jboss.tools.test.source.feature" version="0.0.0">
- <category name="JBoss Tools tests Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/usage/site/category.xml (from rev 38541, trunk/usage/site/site.xml)
===================================================================
--- trunk/usage/site/category.xml (rev 0)
+++ trunk/usage/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools Usage Reporting Nightly Build Update Site -->
+ <category-def label="JBoss Tools Usage Reporting Nightly Build Update Site" name="JBoss Tools Usage Reporting Nightly Build Update Site">
+ <description>JBoss Tools Usage Reporting Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.usage.feature_0.0.0.jar" id="org.jboss.tools.usage.feature" version="0.0.0">
+ <category name="JBoss Tools Usage Reporting Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.usage.test.feature_0.0.0.jar" id="org.jboss.tools.usage.test.feature" version="0.0.0">
+ <category name="JBoss Tools Usage Reporting Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/usage/site/pom.xml
===================================================================
--- trunk/usage/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/usage/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>usage.site</artifactId>
<name>usage.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
\ No newline at end of file
Deleted: trunk/usage/site/site.xml
===================================================================
--- trunk/usage/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/usage/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools Usage Reporting Nightly Build Update Site -->
- <category-def label="JBoss Tools Usage Reporting Nightly Build Update Site" name="JBoss Tools Usage Reporting Nightly Build Update Site">
- <description>JBoss Tools Usage Reporting Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.usage.feature_0.0.0.jar" id="org.jboss.tools.usage.feature" version="0.0.0">
- <category name="JBoss Tools Usage Reporting Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.usage.test.feature_0.0.0.jar" id="org.jboss.tools.usage.test.feature" version="0.0.0">
- <category name="JBoss Tools Usage Reporting Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/vpe/site/category.xml (from rev 38541, trunk/vpe/site/site.xml)
===================================================================
--- trunk/vpe/site/category.xml (rev 0)
+++ trunk/vpe/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools vpe Nightly Build Update Site -->
+ <!--VPE-->
+ <category-def label="JBoss Tools vpe Nightly Build Update Site" name="JBoss Tools vpe Nightly Build Update Site">
+ <description>JBoss Tools vpe Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.vpe.feature_0.0.0.jar" id="org.jboss.tools.vpe.feature" version="0.0.0">
+ <category name="JBoss Tools vpe Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.vpe.test.feature_0.0.0.jar" id="org.jboss.tools.vpe.test.feature" version="0.0.0">
+ <category name="JBoss Tools VPE Test Nightly Build Update Site"/>
+ </feature>
+
+ <!--BrowserSim-->
+ <feature url="features/org.jboss.tools.vpe.browsersim.feature_0.0.0.jar" id="org.jboss.tools.vpe.browsersim.feature" version="0.0.0">
+ <category name="JBoss Tools vpe Nightly Build Update Site"/>
+ </feature>
+ <!--feature url="features/org.jboss.tools.vpe.test.feature_0.0.0.jar" id="org.jboss.tools.vpe.browsersim.test.feature" version="0.0.0">
+ <category name="JBoss Tools BrowserSim Test Nightly Build Update Site"/>
+ </feature-->
+
+ <!-- include but leave uncategorized -->
+ <feature url="features/org.mozilla.xulrunner.feature_0.0.0.jar" id="org.mozilla.xulrunner.feature" version="0.0.0">
+ </feature>
+ <feature url="features/org.jboss.tools.xulrunner.feature_0.0.0.jar" id="org.jboss.tools.xulrunner.feature" version="0.0.0">
+ </feature>
+
+</site>
Modified: trunk/vpe/site/pom.xml
===================================================================
--- trunk/vpe/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/vpe/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>vpe</artifactId>
<version>3.3.0-SNAPSHOT</version>
</parent>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/vpe/site/site.xml
===================================================================
--- trunk/vpe/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/vpe/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,30 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools vpe Nightly Build Update Site -->
- <!--VPE-->
- <category-def label="JBoss Tools vpe Nightly Build Update Site" name="JBoss Tools vpe Nightly Build Update Site">
- <description>JBoss Tools vpe Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.vpe.feature_0.0.0.jar" id="org.jboss.tools.vpe.feature" version="0.0.0">
- <category name="JBoss Tools vpe Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.vpe.test.feature_0.0.0.jar" id="org.jboss.tools.vpe.test.feature" version="0.0.0">
- <category name="JBoss Tools VPE Test Nightly Build Update Site"/>
- </feature>
-
- <!--BrowserSim-->
- <feature url="features/org.jboss.tools.vpe.browsersim.feature_0.0.0.jar" id="org.jboss.tools.vpe.browsersim.feature" version="0.0.0">
- <category name="JBoss Tools vpe Nightly Build Update Site"/>
- </feature>
- <!--feature url="features/org.jboss.tools.vpe.test.feature_0.0.0.jar" id="org.jboss.tools.vpe.browsersim.test.feature" version="0.0.0">
- <category name="JBoss Tools BrowserSim Test Nightly Build Update Site"/>
- </feature-->
-
- <!-- include but leave uncategorized -->
- <feature url="features/org.mozilla.xulrunner.feature_0.0.0.jar" id="org.mozilla.xulrunner.feature" version="0.0.0">
- </feature>
- <feature url="features/org.jboss.tools.xulrunner.feature_0.0.0.jar" id="org.jboss.tools.xulrunner.feature" version="0.0.0">
- </feature>
-
-</site>
Copied: trunk/ws/site/category.xml (from rev 38541, trunk/ws/site/site.xml)
===================================================================
--- trunk/ws/site/category.xml (rev 0)
+++ trunk/ws/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <description>To install these features, point Eclipse at this site.</description>
+ <!-- JBoss Tools ws Nightly Build Update Site -->
+ <category-def label="JBoss Tools ws Nightly Build Update Site" name="JBoss Tools ws Nightly Build Update Site">
+ <description>JBoss Tools ws Nightly Build Update Site: contains all features in this build.</description>
+ </category-def>
+ <feature url="features/org.jboss.tools.ws.feature_0.0.0.jar" id="org.jboss.tools.ws.feature" version="0.0.0">
+ <category name="JBoss Tools ws Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.ws.jaxrs.feature_0.0.0.jar" id="org.jboss.tools.ws.jaxrs.feature" version="0.0.0">
+ <category name="JBoss Tools ws Nightly Build Update Site"/>
+ </feature>
+ <feature url="features/org.jboss.tools.ws.test.feature_0.0.0.jar" id="org.jboss.tools.ws.test.feature" version="0.0.0">
+ <category name="JBoss Tools ws Nightly Build Update Site"/>
+ </feature>
+
+</site>
Modified: trunk/ws/site/pom.xml
===================================================================
--- trunk/ws/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/ws/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -11,5 +11,5 @@
<artifactId>ws.site</artifactId>
<name>ws.site</name>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/ws/site/site.xml
===================================================================
--- trunk/ws/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/ws/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <description>To install these features, point Eclipse at this site.</description>
- <!-- JBoss Tools ws Nightly Build Update Site -->
- <category-def label="JBoss Tools ws Nightly Build Update Site" name="JBoss Tools ws Nightly Build Update Site">
- <description>JBoss Tools ws Nightly Build Update Site: contains all features in this build.</description>
- </category-def>
- <feature url="features/org.jboss.tools.ws.feature_0.0.0.jar" id="org.jboss.tools.ws.feature" version="0.0.0">
- <category name="JBoss Tools ws Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.ws.jaxrs.feature_0.0.0.jar" id="org.jboss.tools.ws.jaxrs.feature" version="0.0.0">
- <category name="JBoss Tools ws Nightly Build Update Site"/>
- </feature>
- <feature url="features/org.jboss.tools.ws.test.feature_0.0.0.jar" id="org.jboss.tools.ws.test.feature" version="0.0.0">
- <category name="JBoss Tools ws Nightly Build Update Site"/>
- </feature>
-
-</site>
Copied: trunk/xulrunner/site/category.xml (from rev 38541, trunk/xulrunner/site/site.xml)
===================================================================
--- trunk/xulrunner/site/category.xml (rev 0)
+++ trunk/xulrunner/site/category.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<site>
+ <feature url="features/org.mozilla.xulrunner.feature_0.0.0.jar" id="org.mozilla.xulrunner.feature" version="0.0.0">
+ <category name="XulRunner"/>
+ </feature>
+ <feature url="features/org.mozilla.xpcom.feature_0.0.0.jar" id="org.mozilla.xpcom.feature" version="0.0.0">
+ <category name="XulRunner"/>
+ </feature>
+ <category-def name="XulRunner" label="XulRunner support for JBoss Tools">
+ <description>XulRunner support for JBoss Tools</description>
+ </category-def>
+</site>
Modified: trunk/xulrunner/site/pom.xml
===================================================================
--- trunk/xulrunner/site/pom.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/xulrunner/site/pom.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -10,5 +10,5 @@
<artifactId>xulrunner.site</artifactId>
<name>xulrunner.site</name>
<version>1.9.2-SNAPSHOT</version>
- <packaging>eclipse-update-site</packaging>
+ <packaging>eclipse-repository</packaging>
</project>
Deleted: trunk/xulrunner/site/site.xml
===================================================================
--- trunk/xulrunner/site/site.xml 2012-03-14 16:03:42 UTC (rev 39510)
+++ trunk/xulrunner/site/site.xml 2012-03-14 16:30:02 UTC (rev 39511)
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<site>
- <feature url="features/org.mozilla.xulrunner.feature_0.0.0.jar" id="org.mozilla.xulrunner.feature" version="0.0.0">
- <category name="XulRunner"/>
- </feature>
- <feature url="features/org.mozilla.xpcom.feature_0.0.0.jar" id="org.mozilla.xpcom.feature" version="0.0.0">
- <category name="XulRunner"/>
- </feature>
- <category-def name="XulRunner" label="XulRunner support for JBoss Tools">
- <description>XulRunner support for JBoss Tools</description>
- </category-def>
-</site>
12 years, 8 months
JBoss Tools SVN: r39510 - trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples.
by jbosstools-commits@lists.jboss.org
Author: snjeza
Date: 2012-03-14 12:03:42 -0400 (Wed, 14 Mar 2012)
New Revision: 39510
Modified:
trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
Log:
JBIDE-11285 welcome content of project examples broken
Modified: trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java
===================================================================
--- trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-03-14 15:54:53 UTC (rev 39509)
+++ trunk/examples/plugins/org.jboss.tools.project.examples/src/org/jboss/tools/project/examples/ProjectExamplesActivator.java 2012-03-14 16:03:42 UTC (rev 39510)
@@ -53,6 +53,7 @@
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.Job;
@@ -68,6 +69,8 @@
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IEditorDescriptor;
+import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IPerspectiveDescriptor;
import org.eclipse.ui.IPerspectiveRegistry;
@@ -94,6 +97,7 @@
import org.eclipse.ui.internal.cheatsheets.views.CheatSheetView;
import org.eclipse.ui.internal.cheatsheets.views.ViewUtilities;
import org.eclipse.ui.internal.ide.IDEInternalPreferences;
+import org.eclipse.ui.internal.ide.IDEWorkbenchMessages;
import org.eclipse.ui.internal.ide.IDEWorkbenchPlugin;
import org.eclipse.ui.internal.util.PrefUtil;
import org.eclipse.ui.internal.wizards.newresource.ResourceMessages;
@@ -480,7 +484,13 @@
view.getCheatSheetViewer().setInput(id, id, finalURL, new DefaultStateManager(), false);
} else {
try {
- if (finalURL.toString().endsWith(README_MD) || finalURL.toString().endsWith(README_TXT) || finalURL.toString().endsWith(README_MDU)) {
+ if (finalURL.toString().endsWith(".htm") || finalURL.toString().endsWith(".html")) {
+ IWorkbenchBrowserSupport browserSupport = ProjectExamplesActivator.getDefault().getWorkbench().getBrowserSupport();
+ IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR,
+ null, null, null);
+ browser.openURL(finalURL);
+ } else {
+ boolean txtFile = finalURL.toString().endsWith(".md") || finalURL.toString().endsWith(".txt");
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
IFile[] files = null;
@@ -492,8 +502,12 @@
}
if (files.length > 0) {
try {
- IFileEditorInput input = new FileEditorInput(files[0]);
- IDE.openEditor(page, input, EditorsUI.DEFAULT_TEXT_EDITOR_ID);
+ if (txtFile) {
+ IFileEditorInput input = new FileEditorInput(files[0]);
+ IDE.openEditor(page, input, EditorsUI.DEFAULT_TEXT_EDITOR_ID);
+ } else {
+ IDE.openEditor(page, files[0]);
+ }
} catch (PartInitException e) {
ProjectExamplesActivator.log(e);
}
@@ -501,21 +515,22 @@
IFileStore store = EFS.getLocalFileSystem().getStore(
new Path(finalURL.getPath()));
try {
- IDE.openEditor(page, new FileStoreEditorInput(store),
+ FileStoreEditorInput input = new FileStoreEditorInput(store);
+ if (txtFile) {
+ IDE.openEditor(page, input,
EditorsUI.DEFAULT_TEXT_EDITOR_ID);
+ } else {
+ IDE.openEditor(page, input,
+ getEditorId(store));
+ }
} catch (PartInitException e) {
ProjectExamplesActivator.log(e);
}
}
- } else {
- IWorkbenchBrowserSupport browserSupport = ProjectExamplesActivator.getDefault().getWorkbench().getBrowserSupport();
- IWebBrowser browser = browserSupport.createBrowser(IWorkbenchBrowserSupport.LOCATION_BAR | IWorkbenchBrowserSupport.NAVIGATION_BAR,
- null, null, null);
- browser.openURL(finalURL);
- }
- } catch (PartInitException e) {
- ProjectExamplesActivator.log(e);
+ }
+ } catch (PartInitException e) {
+ ProjectExamplesActivator.log(e);
}
}
}
@@ -527,6 +542,71 @@
}
}
+ private static String getEditorId(IFileStore fileStore) throws PartInitException {
+ String name = fileStore.fetchInfo().getName();
+ if (name == null) {
+ throw new IllegalArgumentException();
+ }
+
+ IContentType contentType= null;
+ try {
+ InputStream is = null;
+ try {
+ is = fileStore.openInputStream(EFS.NONE, null);
+ contentType= Platform.getContentTypeManager().findContentTypeFor(is, name);
+ } finally {
+ if (is != null) {
+ is.close();
+ }
+ }
+ } catch (CoreException ex) {
+ // continue without content type
+ } catch (IOException ex) {
+ // continue without content type
+ }
+
+ IEditorRegistry editorReg= PlatformUI.getWorkbench().getEditorRegistry();
+
+ return getEditorDescriptor(name, editorReg, editorReg.getDefaultEditor(name, contentType)).getId();
+ }
+
+ private static IEditorDescriptor getEditorDescriptor(String name,
+ IEditorRegistry editorReg, IEditorDescriptor defaultDescriptor)
+ throws PartInitException {
+
+ if (defaultDescriptor != null) {
+ return defaultDescriptor;
+ }
+
+ IEditorDescriptor editorDesc = defaultDescriptor;
+
+ // next check the OS for in-place editor (OLE on Win32)
+ if (editorReg.isSystemInPlaceEditorAvailable(name)) {
+ editorDesc = editorReg
+ .findEditor(IEditorRegistry.SYSTEM_INPLACE_EDITOR_ID);
+ }
+
+ // next check with the OS for an external editor
+ if (editorDesc == null
+ && editorReg.isSystemExternalEditorAvailable(name)) {
+ editorDesc = editorReg
+ .findEditor(IEditorRegistry.SYSTEM_EXTERNAL_EDITOR_ID);
+ }
+
+ // next lookup the default text editor
+ if (editorDesc == null) {
+ editorDesc = editorReg
+ .findEditor(IDEWorkbenchPlugin.DEFAULT_TEXT_EDITOR_ID);
+ }
+
+ // if no valid editor found, bail out
+ if (editorDesc == null) {
+ throw new PartInitException(
+ IDEWorkbenchMessages.IDE_noFileEditorFound);
+ }
+
+ return editorDesc;
+ }
public static void fixWelcome(ProjectExample project) {
if (project == null || project.isWelcome()) {
return;
12 years, 8 months