Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/customization/org.eclipse.papyrus.customization.properties.generation')
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/ContextElement.java13
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelection.java6
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionFactory.java8
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionPackage.java48
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/PropertyDefinition.java21
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/ContextElementImpl.java103
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionFactoryImpl.java53
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionImpl.java69
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionPackageImpl.java93
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/PropertyDefinitionImpl.java104
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionAdapterFactory.java56
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionSwitch.java66
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/Activator.java22
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/GeneratorExtensionPoint.java10
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/LayoutExtensionPoint.java12
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java48
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java92
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java6
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java6
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java92
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ILayoutGenerator.java18
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java66
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/StandardLayoutGenerator.java50
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java2
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesContentProvider.java4
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesLabelProvider.java72
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java6
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java14
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java19
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/AbstractCreateContextPage.java22
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java14
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java83
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java44
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java138
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java32
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/ExtensionFilter.java20
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java46
-rw-r--r--plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/TernaryButton.java58
38 files changed, 920 insertions, 716 deletions
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/ContextElement.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/ContextElement.java
index 2d04fdc1017..c36fde86b8a 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/ContextElement.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/ContextElement.java
@@ -17,9 +17,9 @@ import org.eclipse.emf.ecore.EObject;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getElements <em>Elements</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getProperties <em>Properties</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getElements <em>Elements</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getProperties <em>Properties</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -37,6 +37,7 @@ public interface ContextElement extends EObject {
* If the meaning of the '<em>Elements</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Elements</em>' containment reference list.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getContextElement_Elements()
* @model containment="true"
@@ -52,6 +53,7 @@ public interface ContextElement extends EObject {
* If the meaning of the '<em>Properties</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Properties</em>' containment reference list.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getContextElement_Properties()
* @model containment="true"
@@ -66,6 +68,7 @@ public interface ContextElement extends EObject {
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getContextElement_Name()
@@ -78,7 +81,9 @@ public interface ContextElement extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelection.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelection.java
index 312b4c6ed36..d6833824e70 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelection.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelection.java
@@ -17,8 +17,8 @@ import org.eclipse.emf.ecore.EObject;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getFields <em>Fields</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getContextElements <em>Context Elements</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getFields <em>Fields</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getContextElements <em>Context Elements</em>}</li>
* </ul>
* </p>
*
@@ -36,6 +36,7 @@ public interface FieldSelection extends EObject {
* If the meaning of the '<em>Fields</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Fields</em>' containment reference list.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getFieldSelection_Fields()
* @model containment="true"
@@ -51,6 +52,7 @@ public interface FieldSelection extends EObject {
* If the meaning of the '<em>Context Elements</em>' containment reference list isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Context Elements</em>' containment reference list.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getFieldSelection_ContextElements()
* @model containment="true"
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionFactory.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionFactory.java
index b1a8ef9499b..9a561af4710 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionFactory.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionFactory.java
@@ -13,6 +13,7 @@ import org.eclipse.emf.ecore.EFactory;
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage
* @generated
*/
@@ -22,6 +23,7 @@ public interface FieldSelectionFactory extends EFactory {
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
FieldSelectionFactory eINSTANCE = org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionFactoryImpl.init();
@@ -30,6 +32,7 @@ public interface FieldSelectionFactory extends EFactory {
* Returns a new object of class '<em>Field Selection</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Field Selection</em>'.
* @generated
*/
@@ -39,6 +42,7 @@ public interface FieldSelectionFactory extends EFactory {
* Returns a new object of class '<em>Property Definition</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Property Definition</em>'.
* @generated
*/
@@ -48,6 +52,7 @@ public interface FieldSelectionFactory extends EFactory {
* Returns a new object of class '<em>Context Element</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Context Element</em>'.
* @generated
*/
@@ -57,9 +62,10 @@ public interface FieldSelectionFactory extends EFactory {
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the package supported by this factory.
* @generated
*/
FieldSelectionPackage getFieldSelectionPackage();
-} //FieldSelectionFactory
+} // FieldSelectionFactory
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionPackage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionPackage.java
index c4e9152ec0d..f9cfaec3eb9 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionPackage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/FieldSelectionPackage.java
@@ -23,6 +23,7 @@ import org.eclipse.emf.ecore.EReference;
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionFactory
* @model kind="package"
* @generated
@@ -33,6 +34,7 @@ public interface FieldSelectionPackage extends EPackage {
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
String eNAME = "fieldselection";
@@ -41,6 +43,7 @@ public interface FieldSelectionPackage extends EPackage {
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/papyrus/properties/fieldSelection";
@@ -49,6 +52,7 @@ public interface FieldSelectionPackage extends EPackage {
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_PREFIX = "fs";
@@ -57,6 +61,7 @@ public interface FieldSelectionPackage extends EPackage {
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
FieldSelectionPackage eINSTANCE = org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl.init();
@@ -65,6 +70,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl <em>Field Selection</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getFieldSelection()
* @generated
@@ -75,6 +81,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Fields</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -84,6 +91,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Context Elements</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -93,6 +101,7 @@ public interface FieldSelectionPackage extends EPackage {
* The number of structural features of the '<em>Field Selection</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -102,6 +111,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl <em>Property Definition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getPropertyDefinition()
* @generated
@@ -112,6 +122,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -121,6 +132,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Value Single</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -130,6 +142,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Value Multiple</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -139,6 +152,7 @@ public interface FieldSelectionPackage extends EPackage {
* The number of structural features of the '<em>Property Definition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -148,6 +162,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl <em>Context Element</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getContextElement()
* @generated
@@ -158,6 +173,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Elements</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -167,6 +183,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Properties</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -176,6 +193,7 @@ public interface FieldSelectionPackage extends EPackage {
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -185,6 +203,7 @@ public interface FieldSelectionPackage extends EPackage {
* The number of structural features of the '<em>Context Element</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -194,6 +213,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object id for the '<em>Value</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.wizard.widget.TernaryButton.State
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getValue()
* @generated
@@ -205,6 +225,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection <em>Field Selection</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Field Selection</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection
* @generated
@@ -215,6 +236,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getFields <em>Fields</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Fields</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getFields()
* @see #getFieldSelection()
@@ -226,6 +248,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getContextElements <em>Context Elements</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Context Elements</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection#getContextElements()
* @see #getFieldSelection()
@@ -237,6 +260,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition <em>Property Definition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Property Definition</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition
* @generated
@@ -247,6 +271,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getName()
* @see #getPropertyDefinition()
@@ -258,6 +283,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueSingle <em>Value Single</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Value Single</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueSingle()
* @see #getPropertyDefinition()
@@ -269,6 +295,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueMultiple <em>Value Multiple</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Value Multiple</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueMultiple()
* @see #getPropertyDefinition()
@@ -280,6 +307,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement <em>Context Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Context Element</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement
* @generated
@@ -290,6 +318,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getElements <em>Elements</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Elements</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getElements()
* @see #getContextElement()
@@ -301,6 +330,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getProperties <em>Properties</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Properties</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getProperties()
* @see #getContextElement()
@@ -312,6 +342,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement#getName()
* @see #getContextElement()
@@ -323,6 +354,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the meta object for data type '{@link org.eclipse.papyrus.customization.properties.generation.wizard.widget.TernaryButton.State <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for data type '<em>Value</em>'.
* @see org.eclipse.papyrus.customization.properties.generation.wizard.widget.TernaryButton.State
* @model instanceClass="org.eclipse.papyrus.customization.properties.generation.wizard.widget.TernaryButton.State"
@@ -334,6 +366,7 @@ public interface FieldSelectionPackage extends EPackage {
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the factory that creates the instances of the model.
* @generated
*/
@@ -349,6 +382,7 @@ public interface FieldSelectionPackage extends EPackage {
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @generated
*/
interface Literals {
@@ -357,6 +391,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl <em>Field Selection</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getFieldSelection()
* @generated
@@ -367,6 +402,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Fields</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference FIELD_SELECTION__FIELDS = eINSTANCE.getFieldSelection_Fields();
@@ -375,6 +411,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Context Elements</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference FIELD_SELECTION__CONTEXT_ELEMENTS = eINSTANCE.getFieldSelection_ContextElements();
@@ -383,6 +420,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl <em>Property Definition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getPropertyDefinition()
* @generated
@@ -393,6 +431,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute PROPERTY_DEFINITION__NAME = eINSTANCE.getPropertyDefinition_Name();
@@ -401,6 +440,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Value Single</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute PROPERTY_DEFINITION__VALUE_SINGLE = eINSTANCE.getPropertyDefinition_ValueSingle();
@@ -409,6 +449,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Value Multiple</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute PROPERTY_DEFINITION__VALUE_MULTIPLE = eINSTANCE.getPropertyDefinition_ValueMultiple();
@@ -417,6 +458,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl <em>Context Element</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getContextElement()
* @generated
@@ -427,6 +469,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Elements</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference CONTEXT_ELEMENT__ELEMENTS = eINSTANCE.getContextElement_Elements();
@@ -435,6 +478,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Properties</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference CONTEXT_ELEMENT__PROPERTIES = eINSTANCE.getContextElement_Properties();
@@ -443,6 +487,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute CONTEXT_ELEMENT__NAME = eINSTANCE.getContextElement_Name();
@@ -451,6 +496,7 @@ public interface FieldSelectionPackage extends EPackage {
* The meta object literal for the '<em>Value</em>' data type.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.wizard.widget.TernaryButton.State
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionPackageImpl#getValue()
* @generated
@@ -459,4 +505,4 @@ public interface FieldSelectionPackage extends EPackage {
}
-} //FieldSelectionPackage
+} // FieldSelectionPackage
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/PropertyDefinition.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/PropertyDefinition.java
index eee0a1a686b..499f8da30df 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/PropertyDefinition.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/PropertyDefinition.java
@@ -17,9 +17,9 @@ import org.eclipse.papyrus.customization.properties.generation.wizard.widget.Ter
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueSingle <em>Value Single</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueMultiple <em>Value Multiple</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueSingle <em>Value Single</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueMultiple <em>Value Multiple</em>}</li>
* </ul>
* </p>
*
@@ -36,6 +36,7 @@ public interface PropertyDefinition extends EObject {
* If the meaning of the '<em>Name</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getPropertyDefinition_Name()
@@ -48,7 +49,9 @@ public interface PropertyDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getName <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Name</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Name</em>' attribute.
* @see #getName()
* @generated
*/
@@ -62,6 +65,7 @@ public interface PropertyDefinition extends EObject {
* If the meaning of the '<em>Value Single</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Value Single</em>' attribute.
* @see #setValueSingle(State)
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getPropertyDefinition_ValueSingle()
@@ -74,7 +78,9 @@ public interface PropertyDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueSingle <em>Value Single</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Value Single</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Value Single</em>' attribute.
* @see #getValueSingle()
* @generated
*/
@@ -88,6 +94,7 @@ public interface PropertyDefinition extends EObject {
* If the meaning of the '<em>Value Multiple</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Value Multiple</em>' attribute.
* @see #setValueMultiple(State)
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#getPropertyDefinition_ValueMultiple()
@@ -100,7 +107,9 @@ public interface PropertyDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition#getValueMultiple <em>Value Multiple</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Value Multiple</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Value Multiple</em>' attribute.
* @see #getValueMultiple()
* @generated
*/
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/ContextElementImpl.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/ContextElementImpl.java
index b7784a2e275..2f4d9149af1 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/ContextElementImpl.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/ContextElementImpl.java
@@ -28,9 +28,9 @@ import org.eclipse.papyrus.customization.properties.generation.fieldselection.Pr
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl#getElements <em>Elements</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl#getProperties <em>Properties</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl#getElements <em>Elements</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl#getProperties <em>Properties</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.ContextElementImpl#getName <em>Name</em>}</li>
* </ul>
* </p>
*
@@ -42,6 +42,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
* The cached value of the '{@link #getElements() <em>Elements</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getElements()
* @generated
* @ordered
@@ -52,6 +53,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
* The cached value of the '{@link #getProperties() <em>Properties</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getProperties()
* @generated
* @ordered
@@ -62,6 +64,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getName()
* @generated
* @ordered
@@ -72,6 +75,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getName()
* @generated
* @ordered
@@ -81,6 +85,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ContextElementImpl() {
@@ -90,6 +95,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -100,6 +106,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<ContextElement> getElements() {
@@ -112,6 +119,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<PropertyDefinition> getProperties() {
@@ -124,6 +132,7 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getName() {
@@ -133,27 +142,30 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, FieldSelectionPackage.CONTEXT_ELEMENT__NAME, oldName, name));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
- return ((InternalEList<?>)getElements()).basicRemove(otherEnd, msgs);
- case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
- return ((InternalEList<?>)getProperties()).basicRemove(otherEnd, msgs);
+ case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
+ return ((InternalEList<?>) getElements()).basicRemove(otherEnd, msgs);
+ case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
+ return ((InternalEList<?>) getProperties()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -161,17 +173,18 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
- return getElements();
- case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
- return getProperties();
- case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
- return getName();
+ case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
+ return getElements();
+ case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
+ return getProperties();
+ case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
+ return getName();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -179,23 +192,24 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
- getElements().clear();
- getElements().addAll((Collection<? extends ContextElement>)newValue);
- return;
- case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
- getProperties().clear();
- getProperties().addAll((Collection<? extends PropertyDefinition>)newValue);
- return;
- case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
- setName((String)newValue);
- return;
+ case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
+ getElements().clear();
+ getElements().addAll((Collection<? extends ContextElement>) newValue);
+ return;
+ case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
+ getProperties().clear();
+ getProperties().addAll((Collection<? extends PropertyDefinition>) newValue);
+ return;
+ case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
+ setName((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -203,20 +217,21 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
- getElements().clear();
- return;
- case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
- getProperties().clear();
- return;
- case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
- setName(NAME_EDEFAULT);
- return;
+ case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
+ getElements().clear();
+ return;
+ case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
+ getProperties().clear();
+ return;
+ case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
+ setName(NAME_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -224,17 +239,18 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
- return elements != null && !elements.isEmpty();
- case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
- return properties != null && !properties.isEmpty();
- case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case FieldSelectionPackage.CONTEXT_ELEMENT__ELEMENTS:
+ return elements != null && !elements.isEmpty();
+ case FieldSelectionPackage.CONTEXT_ELEMENT__PROPERTIES:
+ return properties != null && !properties.isEmpty();
+ case FieldSelectionPackage.CONTEXT_ELEMENT__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
@@ -242,11 +258,14 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
@@ -255,4 +274,4 @@ public class ContextElementImpl extends EObjectImpl implements ContextElement {
return result.toString();
}
-} //ContextElementImpl
+} // ContextElementImpl
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionFactoryImpl.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionFactoryImpl.java
index b50ec82357b..3f31b0f8904 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionFactoryImpl.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionFactoryImpl.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.customization.properties.generation.wizard.widget.Ter
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
+ *
* @generated
*/
public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSelectionFactory {
@@ -32,16 +33,16 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static FieldSelectionFactory init() {
try {
- FieldSelectionFactory theFieldSelectionFactory = (FieldSelectionFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/properties/fieldSelection");
+ FieldSelectionFactory theFieldSelectionFactory = (FieldSelectionFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/properties/fieldSelection");
if (theFieldSelectionFactory != null) {
return theFieldSelectionFactory;
}
- }
- catch (Exception exception) {
+ } catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new FieldSelectionFactoryImpl();
@@ -51,6 +52,7 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public FieldSelectionFactoryImpl() {
@@ -60,52 +62,59 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
- case FieldSelectionPackage.FIELD_SELECTION: return createFieldSelection();
- case FieldSelectionPackage.PROPERTY_DEFINITION: return createPropertyDefinition();
- case FieldSelectionPackage.CONTEXT_ELEMENT: return createContextElement();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case FieldSelectionPackage.FIELD_SELECTION:
+ return createFieldSelection();
+ case FieldSelectionPackage.PROPERTY_DEFINITION:
+ return createPropertyDefinition();
+ case FieldSelectionPackage.CONTEXT_ELEMENT:
+ return createContextElement();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object createFromString(EDataType eDataType, String initialValue) {
switch (eDataType.getClassifierID()) {
- case FieldSelectionPackage.VALUE:
- return createValueFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case FieldSelectionPackage.VALUE:
+ return createValueFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String convertToString(EDataType eDataType, Object instanceValue) {
switch (eDataType.getClassifierID()) {
- case FieldSelectionPackage.VALUE:
- return convertValueToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case FieldSelectionPackage.VALUE:
+ return convertValueToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public FieldSelection createFieldSelection() {
@@ -116,6 +125,7 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public PropertyDefinition createPropertyDefinition() {
@@ -126,6 +136,7 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public ContextElement createContextElement() {
@@ -136,15 +147,17 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public State createValueFromString(EDataType eDataType, String initialValue) {
- return (State)super.createFromString(eDataType, initialValue);
+ return (State) super.createFromString(eDataType, initialValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String convertValueToString(EDataType eDataType, Object instanceValue) {
@@ -154,15 +167,17 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public FieldSelectionPackage getFieldSelectionPackage() {
- return (FieldSelectionPackage)getEPackage();
+ return (FieldSelectionPackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @deprecated
* @generated
*/
@@ -171,4 +186,4 @@ public class FieldSelectionFactoryImpl extends EFactoryImpl implements FieldSele
return FieldSelectionPackage.eINSTANCE;
}
-} //FieldSelectionFactoryImpl
+} // FieldSelectionFactoryImpl
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionImpl.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionImpl.java
index d17bb45e72d..0de6551bf86 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionImpl.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionImpl.java
@@ -27,8 +27,8 @@ import org.eclipse.papyrus.customization.properties.generation.fieldselection.Pr
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl#getFields <em>Fields</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl#getContextElements <em>Context Elements</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl#getFields <em>Fields</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.FieldSelectionImpl#getContextElements <em>Context Elements</em>}</li>
* </ul>
* </p>
*
@@ -40,6 +40,7 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
* The cached value of the '{@link #getFields() <em>Fields</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getFields()
* @generated
* @ordered
@@ -50,6 +51,7 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
* The cached value of the '{@link #getContextElements() <em>Context Elements</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getContextElements()
* @generated
* @ordered
@@ -59,6 +61,7 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected FieldSelectionImpl() {
@@ -68,6 +71,7 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -78,6 +82,7 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<PropertyDefinition> getFields() {
@@ -90,6 +95,7 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<ContextElement> getContextElements() {
@@ -102,15 +108,16 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
- return ((InternalEList<?>)getFields()).basicRemove(otherEnd, msgs);
- case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
- return ((InternalEList<?>)getContextElements()).basicRemove(otherEnd, msgs);
+ case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
+ return ((InternalEList<?>) getFields()).basicRemove(otherEnd, msgs);
+ case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
+ return ((InternalEList<?>) getContextElements()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -118,15 +125,16 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
- return getFields();
- case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
- return getContextElements();
+ case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
+ return getFields();
+ case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
+ return getContextElements();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -134,20 +142,21 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
- getFields().clear();
- getFields().addAll((Collection<? extends PropertyDefinition>)newValue);
- return;
- case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
- getContextElements().clear();
- getContextElements().addAll((Collection<? extends ContextElement>)newValue);
- return;
+ case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
+ getFields().clear();
+ getFields().addAll((Collection<? extends PropertyDefinition>) newValue);
+ return;
+ case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
+ getContextElements().clear();
+ getContextElements().addAll((Collection<? extends ContextElement>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -155,17 +164,18 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
- getFields().clear();
- return;
- case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
- getContextElements().clear();
- return;
+ case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
+ getFields().clear();
+ return;
+ case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
+ getContextElements().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -173,17 +183,18 @@ public class FieldSelectionImpl extends EObjectImpl implements FieldSelection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
- return fields != null && !fields.isEmpty();
- case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
- return contextElements != null && !contextElements.isEmpty();
+ case FieldSelectionPackage.FIELD_SELECTION__FIELDS:
+ return fields != null && !fields.isEmpty();
+ case FieldSelectionPackage.FIELD_SELECTION__CONTEXT_ELEMENTS:
+ return contextElements != null && !contextElements.isEmpty();
}
return super.eIsSet(featureID);
}
-} //FieldSelectionImpl
+} // FieldSelectionImpl
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionPackageImpl.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionPackageImpl.java
index e7d47b0e850..9f855d71590 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionPackageImpl.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/FieldSelectionPackageImpl.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.customization.properties.generation.wizard.widget.Ter
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
+ *
* @generated
*/
public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSelectionPackage {
@@ -31,6 +32,7 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass fieldSelectionEClass = null;
@@ -38,6 +40,7 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass propertyDefinitionEClass = null;
@@ -45,6 +48,7 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass contextElementEClass = null;
@@ -52,19 +56,17 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EDataType valueEDataType = null;
/**
- * Creates an instance of the model <b>Package</b>, registered with
- * {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
+ * Creates an instance of the model <b>Package</b>, registered with {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
- * <p>Note: the correct way to create the package is via the static
- * factory method {@link #init init()}, which also performs
- * initialization of the package, or returns the registered package,
- * if one already exists.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
+ * <p>
+ * Note: the correct way to create the package is via the static factory method {@link #init init()}, which also performs initialization of the package, or returns the registered package, if one already exists. <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage#eNS_URI
* @see #init()
@@ -77,26 +79,30 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
+ *
+ * <p>
+ * This method is used to initialize {@link FieldSelectionPackage#eINSTANCE} when that field is accessed. Clients should not invoke it directly. Instead, they should simply access that field to obtain the package. <!-- begin-user-doc --> <!-- end-user-doc
+ * -->
*
- * <p>This method is used to initialize {@link FieldSelectionPackage#eINSTANCE} when that field is accessed.
- * Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
- * <!-- begin-user-doc --> <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static FieldSelectionPackage init() {
- if (isInited) return (FieldSelectionPackage)EPackage.Registry.INSTANCE.getEPackage(FieldSelectionPackage.eNS_URI);
+ if (isInited) {
+ return (FieldSelectionPackage) EPackage.Registry.INSTANCE.getEPackage(FieldSelectionPackage.eNS_URI);
+ }
// Obtain or create and register package
- FieldSelectionPackageImpl theFieldSelectionPackage = (FieldSelectionPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FieldSelectionPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FieldSelectionPackageImpl());
+ FieldSelectionPackageImpl theFieldSelectionPackage = (FieldSelectionPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof FieldSelectionPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new FieldSelectionPackageImpl());
isInited = true;
@@ -109,7 +115,7 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
// Mark meta-data to indicate it can't be changed
theFieldSelectionPackage.freeze();
-
+
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(FieldSelectionPackage.eNS_URI, theFieldSelectionPackage);
return theFieldSelectionPackage;
@@ -118,6 +124,7 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getFieldSelection() {
@@ -127,24 +134,27 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getFieldSelection_Fields() {
- return (EReference)fieldSelectionEClass.getEStructuralFeatures().get(0);
+ return (EReference) fieldSelectionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getFieldSelection_ContextElements() {
- return (EReference)fieldSelectionEClass.getEStructuralFeatures().get(1);
+ return (EReference) fieldSelectionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getPropertyDefinition() {
@@ -154,33 +164,37 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPropertyDefinition_Name() {
- return (EAttribute)propertyDefinitionEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) propertyDefinitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPropertyDefinition_ValueSingle() {
- return (EAttribute)propertyDefinitionEClass.getEStructuralFeatures().get(1);
+ return (EAttribute) propertyDefinitionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getPropertyDefinition_ValueMultiple() {
- return (EAttribute)propertyDefinitionEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) propertyDefinitionEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getContextElement() {
@@ -190,33 +204,37 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getContextElement_Elements() {
- return (EReference)contextElementEClass.getEStructuralFeatures().get(0);
+ return (EReference) contextElementEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getContextElement_Properties() {
- return (EReference)contextElementEClass.getEStructuralFeatures().get(1);
+ return (EReference) contextElementEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getContextElement_Name() {
- return (EAttribute)contextElementEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) contextElementEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EDataType getValue() {
@@ -226,28 +244,33 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public FieldSelectionFactory getFieldSelectionFactory() {
- return (FieldSelectionFactory)getEFactoryInstance();
+ return (FieldSelectionFactory) getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private boolean isCreated = false;
/**
- * Creates the meta-model objects for the package. This method is
+ * Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void createPackageContents() {
- if (isCreated) return;
+ if (isCreated) {
+ return;
+ }
isCreated = true;
// Create classes and their features
@@ -272,19 +295,23 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private boolean isInitialized = false;
/**
- * Complete the initialization of the package and its meta-model. This
+ * Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void initializePackageContents() {
- if (isInitialized) return;
+ if (isInitialized) {
+ return;
+ }
isInitialized = true;
// Initialize package
@@ -300,8 +327,10 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
// Initialize classes and features; add operations and parameters
initEClass(fieldSelectionEClass, FieldSelection.class, "FieldSelection", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getFieldSelection_Fields(), this.getPropertyDefinition(), null, "fields", null, 0, -1, FieldSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getFieldSelection_ContextElements(), this.getContextElement(), null, "contextElements", null, 0, -1, FieldSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getFieldSelection_Fields(), this.getPropertyDefinition(), null, "fields", null, 0, -1, FieldSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEReference(getFieldSelection_ContextElements(), this.getContextElement(), null, "contextElements", null, 0, -1, FieldSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
initEClass(propertyDefinitionEClass, PropertyDefinition.class, "PropertyDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPropertyDefinition_Name(), ecorePackage.getEString(), "name", null, 1, 1, PropertyDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -309,8 +338,10 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
initEAttribute(getPropertyDefinition_ValueMultiple(), this.getValue(), "valueMultiple", "DEFAULT", 1, 1, PropertyDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(contextElementEClass, ContextElement.class, "ContextElement", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getContextElement_Elements(), this.getContextElement(), null, "elements", null, 0, -1, ContextElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getContextElement_Properties(), this.getPropertyDefinition(), null, "properties", null, 0, -1, ContextElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getContextElement_Elements(), this.getContextElement(), null, "elements", null, 0, -1, ContextElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEReference(getContextElement_Properties(), this.getPropertyDefinition(), null, "properties", null, 0, -1, ContextElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEAttribute(getContextElement_Name(), ecorePackage.getEString(), "name", null, 1, 1, ContextElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Initialize data types
@@ -320,4 +351,4 @@ public class FieldSelectionPackageImpl extends EPackageImpl implements FieldSele
createResource(eNS_URI);
}
-} //FieldSelectionPackageImpl
+} // FieldSelectionPackageImpl
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/PropertyDefinitionImpl.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/PropertyDefinitionImpl.java
index 754e3aff874..9bead7b1bef 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/PropertyDefinitionImpl.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/impl/PropertyDefinitionImpl.java
@@ -23,9 +23,9 @@ import org.eclipse.papyrus.customization.properties.generation.wizard.widget.Ter
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl#getValueSingle <em>Value Single</em>}</li>
- * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl#getValueMultiple <em>Value Multiple</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl#getValueSingle <em>Value Single</em>}</li>
+ * <li>{@link org.eclipse.papyrus.customization.properties.generation.fieldselection.impl.PropertyDefinitionImpl#getValueMultiple <em>Value Multiple</em>}</li>
* </ul>
* </p>
*
@@ -37,6 +37,7 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getName()
* @generated
* @ordered
@@ -47,6 +48,7 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getName()
* @generated
* @ordered
@@ -57,16 +59,18 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
* The default value of the '{@link #getValueSingle() <em>Value Single</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getValueSingle()
* @generated
* @ordered
*/
- protected static final State VALUE_SINGLE_EDEFAULT = (State)FieldSelectionFactory.eINSTANCE.createFromString(FieldSelectionPackage.eINSTANCE.getValue(), "DEFAULT");
+ protected static final State VALUE_SINGLE_EDEFAULT = (State) FieldSelectionFactory.eINSTANCE.createFromString(FieldSelectionPackage.eINSTANCE.getValue(), "DEFAULT");
/**
* The cached value of the '{@link #getValueSingle() <em>Value Single</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getValueSingle()
* @generated
* @ordered
@@ -77,16 +81,18 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
* The default value of the '{@link #getValueMultiple() <em>Value Multiple</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getValueMultiple()
* @generated
* @ordered
*/
- protected static final State VALUE_MULTIPLE_EDEFAULT = (State)FieldSelectionFactory.eINSTANCE.createFromString(FieldSelectionPackage.eINSTANCE.getValue(), "DEFAULT");
+ protected static final State VALUE_MULTIPLE_EDEFAULT = (State) FieldSelectionFactory.eINSTANCE.createFromString(FieldSelectionPackage.eINSTANCE.getValue(), "DEFAULT");
/**
* The cached value of the '{@link #getValueMultiple() <em>Value Multiple</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getValueMultiple()
* @generated
* @ordered
@@ -96,6 +102,7 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected PropertyDefinitionImpl() {
@@ -105,6 +112,7 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -115,6 +123,7 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getName() {
@@ -124,18 +133,21 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setName(String newName) {
String oldName = name;
name = newName;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, FieldSelectionPackage.PROPERTY_DEFINITION__NAME, oldName, name));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public State getValueSingle() {
@@ -145,18 +157,21 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setValueSingle(State newValueSingle) {
State oldValueSingle = valueSingle;
valueSingle = newValueSingle;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE, oldValueSingle, valueSingle));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public State getValueMultiple() {
@@ -166,29 +181,32 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setValueMultiple(State newValueMultiple) {
State oldValueMultiple = valueMultiple;
valueMultiple = newValueMultiple;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE, oldValueMultiple, valueMultiple));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
- return getName();
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
- return getValueSingle();
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
- return getValueMultiple();
+ case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
+ return getName();
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
+ return getValueSingle();
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
+ return getValueMultiple();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -196,20 +214,21 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
- setName((String)newValue);
- return;
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
- setValueSingle((State)newValue);
- return;
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
- setValueMultiple((State)newValue);
- return;
+ case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
+ setName((String) newValue);
+ return;
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
+ setValueSingle((State) newValue);
+ return;
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
+ setValueMultiple((State) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -217,20 +236,21 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
- setName(NAME_EDEFAULT);
- return;
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
- setValueSingle(VALUE_SINGLE_EDEFAULT);
- return;
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
- setValueMultiple(VALUE_MULTIPLE_EDEFAULT);
- return;
+ case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
+ setValueSingle(VALUE_SINGLE_EDEFAULT);
+ return;
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
+ setValueMultiple(VALUE_MULTIPLE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -238,17 +258,18 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
- return VALUE_SINGLE_EDEFAULT == null ? valueSingle != null : !VALUE_SINGLE_EDEFAULT.equals(valueSingle);
- case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
- return VALUE_MULTIPLE_EDEFAULT == null ? valueMultiple != null : !VALUE_MULTIPLE_EDEFAULT.equals(valueMultiple);
+ case FieldSelectionPackage.PROPERTY_DEFINITION__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_SINGLE:
+ return VALUE_SINGLE_EDEFAULT == null ? valueSingle != null : !VALUE_SINGLE_EDEFAULT.equals(valueSingle);
+ case FieldSelectionPackage.PROPERTY_DEFINITION__VALUE_MULTIPLE:
+ return VALUE_MULTIPLE_EDEFAULT == null ? valueMultiple != null : !VALUE_MULTIPLE_EDEFAULT.equals(valueMultiple);
}
return super.eIsSet(featureID);
}
@@ -256,11 +277,14 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
@@ -273,4 +297,4 @@ public class PropertyDefinitionImpl extends EObjectImpl implements PropertyDefin
return result.toString();
}
-} //PropertyDefinitionImpl
+} // PropertyDefinitionImpl
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionAdapterFactory.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionAdapterFactory.java
index 9204c24e039..c7cf1b7908e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionAdapterFactory.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionAdapterFactory.java
@@ -20,6 +20,7 @@ import org.eclipse.papyrus.customization.properties.generation.fieldselection.Pr
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage
* @generated
*/
@@ -29,6 +30,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected static FieldSelectionPackage modelPackage;
@@ -37,6 +39,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public FieldSelectionAdapterFactory() {
@@ -50,6 +53,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
+ *
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@@ -59,7 +63,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
return true;
}
if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
@@ -68,38 +72,44 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected FieldSelectionSwitch<Adapter> modelSwitch = new FieldSelectionSwitch<Adapter>() {
- @Override
- public Adapter caseFieldSelection(FieldSelection object) {
- return createFieldSelectionAdapter();
- }
- @Override
- public Adapter casePropertyDefinition(PropertyDefinition object) {
- return createPropertyDefinitionAdapter();
- }
- @Override
- public Adapter caseContextElement(ContextElement object) {
- return createContextElementAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ @Override
+ public Adapter caseFieldSelection(FieldSelection object) {
+ return createFieldSelectionAdapter();
+ }
+
+ @Override
+ public Adapter casePropertyDefinition(PropertyDefinition object) {
+ return createPropertyDefinitionAdapter();
+ }
+
+ @Override
+ public Adapter caseContextElement(ContextElement object) {
+ return createContextElementAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param target the object to adapt.
+ *
+ * @param target
+ * the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
+ return modelSwitch.doSwitch((EObject) target);
}
@@ -109,6 +119,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelection
* @generated
@@ -123,6 +134,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.PropertyDefinition
* @generated
@@ -137,6 +149,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* This default implementation returns null so that we can easily ignore cases;
* it's useful to ignore a case when inheritance will catch all the cases anyway.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.ContextElement
* @generated
@@ -150,6 +163,7 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @generated
*/
@@ -157,4 +171,4 @@ public class FieldSelectionAdapterFactory extends AdapterFactoryImpl {
return null;
}
-} //FieldSelectionAdapterFactory
+} // FieldSelectionAdapterFactory
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionSwitch.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionSwitch.java
index 4eef47e2de0..dda26c2a29d 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionSwitch.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src-gen/org/eclipse/papyrus/customization/properties/generation/fieldselection/util/FieldSelectionSwitch.java
@@ -23,16 +23,18 @@ import org.eclipse.papyrus.customization.properties.generation.fieldselection.Pr
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.customization.properties.generation.fieldselection.FieldSelectionPackage
* @generated
*/
-public class FieldSelectionSwitch<T> extends
-Switch<T> {
+public class FieldSelectionSwitch<T> extends
+ Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected static FieldSelectionPackage modelPackage;
@@ -41,6 +43,7 @@ Switch<T> {
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public FieldSelectionSwitch() {
@@ -53,6 +56,7 @@ Switch<T> {
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @parameter ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
@@ -66,31 +70,39 @@ Switch<T> {
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
- case FieldSelectionPackage.FIELD_SELECTION: {
- FieldSelection fieldSelection = (FieldSelection)theEObject;
- T result = caseFieldSelection(fieldSelection);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ case FieldSelectionPackage.FIELD_SELECTION: {
+ FieldSelection fieldSelection = (FieldSelection) theEObject;
+ T result = caseFieldSelection(fieldSelection);
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- case FieldSelectionPackage.PROPERTY_DEFINITION: {
- PropertyDefinition propertyDefinition = (PropertyDefinition)theEObject;
- T result = casePropertyDefinition(propertyDefinition);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ return result;
+ }
+ case FieldSelectionPackage.PROPERTY_DEFINITION: {
+ PropertyDefinition propertyDefinition = (PropertyDefinition) theEObject;
+ T result = casePropertyDefinition(propertyDefinition);
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- case FieldSelectionPackage.CONTEXT_ELEMENT: {
- ContextElement contextElement = (ContextElement)theEObject;
- T result = caseContextElement(contextElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ return result;
+ }
+ case FieldSelectionPackage.CONTEXT_ELEMENT: {
+ ContextElement contextElement = (ContextElement) theEObject;
+ T result = caseContextElement(contextElement);
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- default: return defaultCase(theEObject);
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
@@ -100,7 +112,9 @@ Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- * @param object the target of the switch.
+ *
+ * @param object
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Field Selection</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -115,7 +129,9 @@ Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- * @param object the target of the switch.
+ *
+ * @param object
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Property Definition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -130,7 +146,9 @@ Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
- * @param object the target of the switch.
+ *
+ * @param object
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>Context Element</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -145,7 +163,9 @@ Switch<T> {
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
- * @param object the target of the switch.
+ *
+ * @param object
+ * the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
@@ -155,4 +175,4 @@ Switch<T> {
return null;
}
-} //FieldSelectionSwitch
+} // FieldSelectionSwitch
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/Activator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/Activator.java
index 078ad73abe4..8b0c4fdf072 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/Activator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/Activator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -50,7 +50,7 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the shared instance
- *
+ *
* @return the shared instance
*/
public static Activator getDefault() {
@@ -59,9 +59,9 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the image at the given path from this plugin
- *
+ *
* @param path
- * the path of the image to be displayed
+ * the path of the image to be displayed
* @return The Image at the given location, or null if it couldn't be found
*/
public Image getImage(String path) {
@@ -70,16 +70,16 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the image descriptor at the given path from this plugin
- *
+ *
* @param path
- * the path of the image to be displayed
+ * the path of the image to be displayed
* @return The Image Descriptor at the given location, or null if it couldn't be found
*/
public ImageDescriptor getImageDescriptor(String path) {
final ImageRegistry registry = getImageRegistry();
String key = PLUGIN_ID + "/" + path; //$NON-NLS-1$
ImageDescriptor descriptor = registry.getDescriptor(key);
- if(descriptor == null) {
+ if (descriptor == null) {
registry.put(key, AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path));
descriptor = registry.getDescriptor(key);
}
@@ -88,11 +88,11 @@ public class Activator extends AbstractUIPlugin {
/**
* Returns the image from the given image descriptor
- *
+ *
* @param pluginId
- * The plugin in which the image is located
+ * The plugin in which the image is located
* @param path
- * The path to the image from the plugin
+ * The path to the image from the plugin
* @return
* The Image at the given location, or null if it couldn't be found
*/
@@ -100,7 +100,7 @@ public class Activator extends AbstractUIPlugin {
final ImageRegistry registry = getImageRegistry();
String key = pluginId + "/" + path; //$NON-NLS-1$
Image image = registry.get(key);
- if(image == null) {
+ if (image == null) {
registry.put(key, AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, path));
image = registry.get(key);
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/GeneratorExtensionPoint.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/GeneratorExtensionPoint.java
index 5141bdaa53d..8a7a011a201 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/GeneratorExtensionPoint.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/GeneratorExtensionPoint.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.extensionpoint;
@@ -26,7 +26,7 @@ import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
/**
* Handles the extension point org.eclipse.papyrus.customization.properties.generation.generator
* Registers the given Generator to the Property view generation wizard
- *
+ *
* @author Camille Letavernier
*/
public class GeneratorExtensionPoint {
@@ -43,10 +43,10 @@ public class GeneratorExtensionPoint {
IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
List<IGenerator> generators = new ArrayList<IGenerator>(2);
- for(IConfigurationElement e : config) {
+ for (IConfigurationElement e : config) {
String generatorClassName = e.getAttribute("generator"); //$NON-NLS-1$
IGenerator generator = ClassLoaderHelper.newInstance(generatorClassName, IGenerator.class);
- if(generator == null) {
+ if (generator == null) {
Activator.log.warn("Cannot instantiate the generator : " + generatorClassName); //$NON-NLS-1$
continue;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/LayoutExtensionPoint.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/LayoutExtensionPoint.java
index 6ac14193e7c..a04720cdf5e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/LayoutExtensionPoint.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/extensionpoint/LayoutExtensionPoint.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.extensionpoint;
@@ -26,7 +26,7 @@ import org.eclipse.papyrus.infra.tools.util.ClassLoaderHelper;
/**
* Handles the extension point org.eclipse.papyrus.customization.properties.generation.layout
* Registers the given layout Generator to the Property view generation wizard
- *
+ *
* @author Camille Letavernier
*/
public class LayoutExtensionPoint {
@@ -42,10 +42,10 @@ public class LayoutExtensionPoint {
IConfigurationElement[] config = Platform.getExtensionRegistry().getConfigurationElementsFor(EXTENSION_ID);
List<ILayoutGenerator> generators = new ArrayList<ILayoutGenerator>(2);
- for(IConfigurationElement e : config) {
+ for (IConfigurationElement e : config) {
String generatorClassName = e.getAttribute("generator"); //$NON-NLS-1$
ILayoutGenerator generator = ClassLoaderHelper.newInstance(generatorClassName, ILayoutGenerator.class);
- if(generator == null) {
+ if (generator == null) {
Activator.log.warn("Cannot instantiate the layout generator : " + generatorClassName); //$NON-NLS-1$
continue;
}
@@ -54,7 +54,7 @@ public class LayoutExtensionPoint {
this.generators = Collections.unmodifiableList(generators);
}
-
+
public List<ILayoutGenerator> getGenerators() {
return generators;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
index a1e7e5ca3f5..c2082f9fe1e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/AbstractQVTGenerator.java
@@ -10,7 +10,7 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
@@ -66,12 +66,12 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
private Set<Listener> listeners = new HashSet<Listener>();
private int strategy;
-
+
private Collection<ResourceSet> scratchResourceSets;
public List<Context> generate(List<URI> targetURI) {
- switch(strategy) {
+ switch (strategy) {
case 0:
generatedContexts = generateSameFile(targetURI);
break;
@@ -88,8 +88,8 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
}
public void dispose() {
- if(scratchResourceSets != null) {
- for(ResourceSet next : scratchResourceSets) {
+ if (scratchResourceSets != null) {
+ for (ResourceSet next : scratchResourceSets) {
EMFHelper.unload(next);
}
scratchResourceSets = null;
@@ -108,7 +108,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
* @return the ModelExtent containing the generated context
*/
protected ModelExtent getOutContextExtent() {
- if(out == null) {
+ if (out == null) {
out = new BasicModelExtent();
}
@@ -124,18 +124,18 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
* Loads the EObject from the given URI.
*
* @param uri
- * The URI from which the EObject is loaded
+ * The URI from which the EObject is loaded
* @return
* The loaded EObject, or null if an error occured
* @throws IOException
- * If the URI isn't a valid EObject
+ * If the URI isn't a valid EObject
*/
protected EObject loadEMFModel(URI uri) throws IOException {
ResourceSet resourceSet = createResourceSet();
try {
Resource resource = resourceSet.getResource(uri, true);
- if(resource != null) {
- if(!resource.getContents().isEmpty()) {
+ if (resource != null) {
+ if (!resource.getContents().isEmpty()) {
return resource.getContents().get(0);
}
}
@@ -145,10 +145,10 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
return null;
}
-
+
protected final ResourceSet createResourceSet() {
ResourceSet result = new ResourceSetImpl();
- if(scratchResourceSets == null) {
+ if (scratchResourceSets == null) {
scratchResourceSets = new ArrayList<ResourceSet>();
}
scratchResourceSets.add(result);
@@ -164,7 +164,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
}
public void handleEvent(Event event) {
- for(Listener listener : listeners) {
+ for (Listener listener : listeners) {
listener.handleEvent(event);
}
}
@@ -173,16 +173,16 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
* Return the generated Context from a list of EObjects
*
* @param outObjects
- * The list of EObjects from which the context will be retrieved
+ * The list of EObjects from which the context will be retrieved
* @return
* The main generated context
*/
protected List<Context> getContexts(List<EObject> outObjects) {
List<Context> result = new LinkedList<Context>();
- for(Object objectResult : outObjects) {
- if(objectResult instanceof Context) {
- result.add((Context)objectResult);
+ for (Object objectResult : outObjects) {
+ if (objectResult instanceof Context) {
+ result.add((Context) objectResult);
}
}
@@ -202,7 +202,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
TransformationExecutor executor = new TransformationExecutor(transformationURI);
Diagnostic diagnostic = executor.loadTransformation();
- if(diagnostic.getSeverity() != Diagnostic.OK) {
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
Activator.log.warn("Cannot load the transformation : " + transformationURI);
return generatedContexts = null;
}
@@ -215,10 +215,10 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
ExecutionDiagnostic result = executor.execute(context, extents.toArray(new ModelExtent[0]));
- if(result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
+ if (result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
List<EObject> outObjects = getOutContextExtent().getContents();
Object objectResult = outObjects.get(0);
- if(!(objectResult instanceof Context)) {
+ if (!(objectResult instanceof Context)) {
return null;
}
@@ -246,7 +246,7 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
TransformationExecutor executor = new TransformationExecutor(transformationURI);
Diagnostic diagnostic = executor.loadTransformation();
- if(diagnostic.getSeverity() != Diagnostic.OK) {
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
Activator.log.warn("Cannot load the transformation : " + transformationURI);
return generatedContexts = null;
}
@@ -256,17 +256,17 @@ public abstract class AbstractQVTGenerator implements IGenerator, Listener {
context.setLog(new WriterLog(new OutputStreamWriter(System.out)));
List<Context> temp = new LinkedList<Context>();
- for(int i = 0; i < targetURI.size(); i++) {
+ for (int i = 0; i < targetURI.size(); i++) {
extents = getModelExtents(i);
ExecutionDiagnostic result = executor.execute(context, extents.toArray(new ModelExtent[0]));
- if(result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
+ if (result.getSeverity() == org.eclipse.emf.common.util.Diagnostic.OK) {
List<EObject> outObjects = getOutContextExtent().getContents();
Object objectResult = outObjects.get(0);
- if(!(objectResult instanceof Context)) {
+ if (!(objectResult instanceof Context)) {
return null;
}
ResourceSet resourceSet = createResourceSet();
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java
index 6ce5928da4a..f55725e948a 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EcoreGenerator.java
@@ -74,7 +74,7 @@ public class EcoreGenerator extends AbstractQVTGenerator {
sourceLabel.setLayoutData(data);
sourceFileChooser = new FileChooser(root, false);
- sourceFileChooser.setFilterExtensions(new String[]{ "ecore" }); //$NON-NLS-1$
+ sourceFileChooser.setFilterExtensions(new String[] { "ecore" }); //$NON-NLS-1$
sourceFileChooser.addListener(this);
listEPackages = new ArrayList<EPackage>();
@@ -95,21 +95,21 @@ public class EcoreGenerator extends AbstractQVTGenerator {
public boolean isSelectedSingle(Property property) {
EStructuralFeature feature = getFeature(property);
- if(feature == null) {
+ if (feature == null) {
return false;
}
- if(feature.isDerived()) {
+ if (feature.isDerived()) {
return false;
}
- if(!feature.isChangeable()) {
+ if (!feature.isChangeable()) {
return false;
}
- if(feature instanceof EReference) {
- EReference reference = (EReference)feature;
- if(reference.isContainer() || reference.isContainment()) {
+ if (feature instanceof EReference) {
+ EReference reference = (EReference) feature;
+ if (reference.isContainer() || reference.isContainment()) {
return false;
}
}
@@ -130,15 +130,15 @@ public class EcoreGenerator extends AbstractQVTGenerator {
EPackage currentPackage = ecorePackage;
EClassifier classifier = findClassifier(path, currentPackage);
- if(classifier == null) {
+ if (classifier == null) {
return null;
}
- if(!(classifier instanceof EClass)) {
+ if (!(classifier instanceof EClass)) {
return null;
}
- EClass eClass = (EClass)classifier;
+ EClass eClass = (EClass) classifier;
return eClass.getEStructuralFeature(property.getName());
}
@@ -147,20 +147,20 @@ public class EcoreGenerator extends AbstractQVTGenerator {
* EPackage
*
* @param path
- * The list of package and subpackages names, and the classifier
- * name, i.e. the list of segments in the classifier's qualified
- * name
+ * The list of package and subpackages names, and the classifier
+ * name, i.e. the list of segments in the classifier's qualified
+ * name
* @param source
- * The root EPackage in which the classifier should be retrieved
+ * The root EPackage in which the classifier should be retrieved
* @return The corresponding EClassifier, or null if it couldn't be
* retrieved
*/
protected EClassifier findClassifier(List<String> path, EPackage source) {
String qualifier = path.get(0);
EClassifier classifier = source.getEClassifier(qualifier);
- if(classifier == null) {
+ if (classifier == null) {
source = findSubPackage(source, qualifier);
- if(source == null) {
+ if (source == null) {
return null;
}
path.remove(0);
@@ -175,14 +175,14 @@ public class EcoreGenerator extends AbstractQVTGenerator {
* given package
*
* @param currentPackage
- * The EPackage in which the subpackage should be found
+ * The EPackage in which the subpackage should be found
* @param packageName
- * The name of the EPackage to find
+ * The name of the EPackage to find
* @return The corresponding EPackage, or null if it couldn't be found
*/
protected EPackage findSubPackage(EPackage currentPackage, String packageName) {
- for(EPackage pack : currentPackage.getESubpackages()) {
- if(pack.getName().equals(packageName)) {
+ for (EPackage pack : currentPackage.getESubpackages()) {
+ if (pack.getName().equals(packageName)) {
return pack;
}
}
@@ -196,7 +196,7 @@ public class EcoreGenerator extends AbstractQVTGenerator {
private List<String> getPath(DataContextElement element) {
List<String> result;
- if(element.getPackage() == null) {
+ if (element.getPackage() == null) {
result = new LinkedList<String>();
} else {
result = getPath(element.getPackage());
@@ -207,21 +207,21 @@ public class EcoreGenerator extends AbstractQVTGenerator {
}
public boolean isSelectedMultiple(Property property) {
- if(!isSelectedSingle(property)) {
+ if (!isSelectedSingle(property)) {
return false;
}
EStructuralFeature feature = getFeature(property);
- Set<String> validDataTypes = new HashSet<String>(Arrays.asList(new String[]{ "int", "boolean", "float", "double" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Set<String> validDataTypes = new HashSet<String>(Arrays.asList(new String[] { "int", "boolean", "float", "double" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- if(feature.getEType() instanceof EDataType) {
- if(validDataTypes.contains(((EDataType)feature.getEType()).getInstanceTypeName())) {
+ if (feature.getEType() instanceof EDataType) {
+ if (validDataTypes.contains(((EDataType) feature.getEType()).getInstanceTypeName())) {
return true;
}
}
- if(feature.getEType() instanceof EEnum) {
+ if (feature.getEType() instanceof EEnum) {
return true;
}
@@ -252,17 +252,17 @@ public class EcoreGenerator extends AbstractQVTGenerator {
PropertiesRoot root = ConfigurationManager.getInstance().getPropertiesRoot();
ModelExtent inRoot = new BasicModelExtent(Collections.singletonList(root));
- if(!listEPackages.isEmpty()) {
+ if (!listEPackages.isEmpty()) {
temp.setContents(listEPackages);
- if(!listEPackages.contains(ecorePackage)) {
- result.add(temp); //if the root package isnt selected
+ if (!listEPackages.contains(ecorePackage)) {
+ result.add(temp); // if the root package isnt selected
} else {
result.add(inPackage);
}
result.add(temp);
} else {
- //Basic Method
+ // Basic Method
result.add(inPackage);
result.add(inPackage);
}
@@ -282,30 +282,30 @@ public class EcoreGenerator extends AbstractQVTGenerator {
URI packageURI = URI.createPlatformResourceURI(sourceFileChooser.getFilePath(), true);
try {
- ecorePackage = (EPackage)loadEMFModel(packageURI);
+ ecorePackage = (EPackage) loadEMFModel(packageURI);
} catch (IOException e) {
// nothing
}
new ArrayList<Object>();
List<Object> listePackage = new ArrayList<Object>();
- if(!listePackage.contains(ecorePackage)) {
+ if (!listePackage.contains(ecorePackage)) {
listePackage.add(ecorePackage);
}
TreeIterator<EObject> tree = ecorePackage.eAllContents();
- while(tree.hasNext()) {
+ while (tree.hasNext()) {
EObject obj = tree.next();
- if(obj instanceof EStructuralFeature) {
- EStructuralFeature feature = (EStructuralFeature)obj;
+ if (obj instanceof EStructuralFeature) {
+ EStructuralFeature feature = (EStructuralFeature) obj;
EClass eClass = feature.getEContainingClass();
- if(eClass != null) {
+ if (eClass != null) {
EClassifier classifier = feature.getEType();
EPackage targetPackage = null;
- if(classifier != null) {
+ if (classifier != null) {
targetPackage = classifier.getEPackage();
}
- if(targetPackage != null) {
- if(!ecorePackage.equals(targetPackage)) {
- if(!listePackage.contains(targetPackage)) {
+ if (targetPackage != null) {
+ if (!ecorePackage.equals(targetPackage)) {
+ if (!listePackage.contains(targetPackage)) {
listePackage.add(targetPackage);
}
@@ -313,12 +313,12 @@ public class EcoreGenerator extends AbstractQVTGenerator {
}
}
}
- if(obj instanceof EClass) {
+ if (obj instanceof EClass) {
- EClass eclass = (EClass)obj;
+ EClass eclass = (EClass) obj;
List<EClass> liste = eclass.getESuperTypes();
- for(EClass item : liste) {
- if(!listePackage.contains(item.getEPackage())) {
+ for (EClass item : liste) {
+ if (!listePackage.contains(item.getEPackage())) {
listePackage.add(item.getEPackage());
}
@@ -332,8 +332,8 @@ public class EcoreGenerator extends AbstractQVTGenerator {
public void addCheckElement(Object obj) {
- if(obj instanceof EPackage) {
- EPackage pack = (EPackage)obj;
+ if (obj instanceof EPackage) {
+ EPackage pack = (EPackage) obj;
listEPackages.add(pack);
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java
index 70533dfb552..52e9a1047f3 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/EditContextGenerator.java
@@ -10,7 +10,7 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Thibault Le Ouay t.leouay@sherpa-eng.com
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
@@ -38,9 +38,9 @@ public class EditContextGenerator implements IGenerator {
public void dispose() {
// TODO Auto-generated method stub
-
+
}
-
+
public List<Context> generate(List<URI> targetURI) {
// TODO Auto-generated method stub
return null;
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
index 1450b85be98..5d71b90e995 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/IGenerator.java
@@ -10,7 +10,7 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.generators;
@@ -51,7 +51,7 @@ public interface IGenerator {
* for changes on them.
*
* @param parent
- * The Composite in which the controls will be displayed
+ * The Composite in which the controls will be displayed
*/
public void createControls(Composite parent);
@@ -140,7 +140,7 @@ public interface IGenerator {
public void setStrategy(int strategy);
public void addCheckElement(Object obj);
-
+
/**
* Disposes of any resources allocated by me when I am no longer needed.
*/
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java
index 2ea5d2cc1ef..736253e9af7 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/generators/ProfileGenerator.java
@@ -55,7 +55,7 @@ import org.eclipse.uml2.uml.Profile;
* @author Camille Letavernier
*/
-//FIXME warning if all profiles have the same name overwrite the same file
+// FIXME warning if all profiles have the same name overwrite the same file
public class ProfileGenerator extends AbstractQVTGenerator {
private FileChooser sourceFileChooser;
@@ -80,7 +80,7 @@ public class ProfileGenerator extends AbstractQVTGenerator {
sourceLabel.setLayoutData(data);
sourceFileChooser = new FileChooser(root, false);
- sourceFileChooser.setFilterExtensions(new String[]{ "profile.uml" }); //$NON-NLS-1$
+ sourceFileChooser.setFilterExtensions(new String[] { "profile.uml" }); //$NON-NLS-1$
sourceFileChooser.addListener(this);
listEObject = new ArrayList<EObject>();
}
@@ -102,8 +102,8 @@ public class ProfileGenerator extends AbstractQVTGenerator {
LinkedList<ModelExtent> result = new LinkedList<ModelExtent>();
ModelExtent inPackage = new BasicModelExtent();
List<EObject> liste = new ArrayList<EObject>();
- if(!listEObject.isEmpty()) {
- for(EObject currentEObject : listEObject) {
+ if (!listEObject.isEmpty()) {
+ for (EObject currentEObject : listEObject) {
EObject tempEObject = null;
try {
tempEObject = loadEMFModel(currentEObject.eResource().getURI());
@@ -122,11 +122,11 @@ public class ProfileGenerator extends AbstractQVTGenerator {
URI umlURI = URI.createURI("ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx", true);
Context umlContext = null;
try {
- umlContext = (Context)loadEMFModel(umlURI);
+ umlContext = (Context) loadEMFModel(umlURI);
} catch (IOException e) {
e.printStackTrace();
}
- if(umlContext == null) {
+ if (umlContext == null) {
Activator.log.warn("Cannot find the UML Property View configuration");
}
@@ -154,24 +154,24 @@ public class ProfileGenerator extends AbstractQVTGenerator {
* Package
*
* @param path
- * The list of package and subpackages names, and the classifier
- * name, i.e. the list of segments in the classifier qualified
- * name e.g. : SysML::Blocks::Block : ["SysML", "Blocks",
- * "Block"]
+ * The list of package and subpackages names, and the classifier
+ * name, i.e. the list of segments in the classifier qualified
+ * name e.g. : SysML::Blocks::Block : ["SysML", "Blocks",
+ * "Block"]
* @param rootPackage
- * The root Package in which the stereotype should be retrieved
+ * The root Package in which the stereotype should be retrieved
* @return The corresponding Classifier, or null if it couldn't be retrieved
*/
protected Classifier findClassifier(List<String> path, Package rootPackage) {
NamedElement element = rootPackage.getOwnedMember(path.get(0));
path.remove(0);
- if(path.size() == 0) {
- if(element instanceof Classifier) {
- return (Classifier)element;
+ if (path.size() == 0) {
+ if (element instanceof Classifier) {
+ return (Classifier) element;
}
} else {
- if(element instanceof Package) {
- return findClassifier(path, (Package)element);
+ if (element instanceof Package) {
+ return findClassifier(path, (Package) element);
}
}
return null;
@@ -184,7 +184,7 @@ public class ProfileGenerator extends AbstractQVTGenerator {
private List<String> getPath(DataContextElement element) {
List<String> result;
- if(element.getPackage() == null) {
+ if (element.getPackage() == null) {
result = new LinkedList<String>();
} else {
result = getPath(element.getPackage());
@@ -205,12 +205,12 @@ public class ProfileGenerator extends AbstractQVTGenerator {
List<String> path = getPath(property);
Package propertyRootPackage = findPackage(path.remove(0));
- if(propertyRootPackage == null) {
+ if (propertyRootPackage == null) {
return null;
}
Classifier classifier = findClassifier(path, propertyRootPackage);
- if(classifier == null) {
+ if (classifier == null) {
return null;
}
@@ -219,11 +219,11 @@ public class ProfileGenerator extends AbstractQVTGenerator {
}
public Package findPackage(String name) {
- for(Resource resource : umlProfile.eResource().getResourceSet().getResources()) {
- for(Object rootElement : resource.getContents()) {
- if(rootElement instanceof Package) {
- Package rootPackage = (Package)rootElement;
- if(name.equals(rootPackage.getName())) {
+ for (Resource resource : umlProfile.eResource().getResourceSet().getResources()) {
+ for (Object rootElement : resource.getContents()) {
+ if (rootElement instanceof Package) {
+ Package rootPackage = (Package) rootElement;
+ if (name.equals(rootPackage.getName())) {
return rootPackage;
}
}
@@ -234,16 +234,16 @@ public class ProfileGenerator extends AbstractQVTGenerator {
public boolean isSelectedSingle(Property property) {
org.eclipse.uml2.uml.Property attribute = getAttribute(property);
- if(attribute == null) {
+ if (attribute == null) {
Activator.log.warn("Cannot find the Property corresponding to " + getPath(property)); //$NON-NLS-1$
return false;
}
- if(attribute.isDerived()) {
+ if (attribute.isDerived()) {
return false;
}
- if(attribute.isReadOnly()) {
+ if (attribute.isReadOnly()) {
return false;
}
@@ -251,19 +251,19 @@ public class ProfileGenerator extends AbstractQVTGenerator {
}
public boolean isSelectedMultiple(Property property) {
- if(!isSelectedSingle(property)) {
+ if (!isSelectedSingle(property)) {
return false;
}
org.eclipse.uml2.uml.Property attribute = getAttribute(property);
- Set<String> validDataTypes = new HashSet<String>(Arrays.asList(new String[]{ "Integer", "Boolean", "Float", "Double" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
+ Set<String> validDataTypes = new HashSet<String>(Arrays.asList(new String[] { "Integer", "Boolean", "Float", "Double" })); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
- if(attribute.getType() instanceof PrimitiveType) {
- return validDataTypes.contains(((PrimitiveType)attribute.getType()).getName());
+ if (attribute.getType() instanceof PrimitiveType) {
+ return validDataTypes.contains(((PrimitiveType) attribute.getType()).getName());
}
- if(attribute.getType() instanceof Enumeration) {
+ if (attribute.getType() instanceof Enumeration) {
return true;
}
@@ -286,19 +286,19 @@ public class ProfileGenerator extends AbstractQVTGenerator {
public List<Object> getExternalReference() {
URI packageURI = URI.createPlatformResourceURI(sourceFileChooser.getFilePath(), true);
try {
- umlProfile = (Profile)loadEMFModel(packageURI);
+ umlProfile = (Profile) loadEMFModel(packageURI);
} catch (IOException e) {
- //nothing
+ // nothing
}
list = new ArrayList<Object>();
list.add(umlProfile);
TreeIterator<EObject> tree = umlProfile.eAllContents();
- while(tree.hasNext()) {
+ while (tree.hasNext()) {
Object obj = tree.next();
- if(obj instanceof PackageImport) {
- PackageImport currentPackage = (PackageImport)obj;
- if(!list.contains(currentPackage.getImportedPackage())) {
+ if (obj instanceof PackageImport) {
+ PackageImport currentPackage = (PackageImport) obj;
+ if (!list.contains(currentPackage.getImportedPackage())) {
list.add(currentPackage.getImportedPackage());
}
}
@@ -311,9 +311,9 @@ public class ProfileGenerator extends AbstractQVTGenerator {
public void addCheckElement(Object obj) {
- if(obj instanceof EObject) {
- EObject current = (EObject)obj;
- if(!listEObject.contains(current)) {
+ if (obj instanceof EObject) {
+ EObject current = (EObject) obj;
+ if (!listEObject.contains(current)) {
listEObject.add(current);
}
}
@@ -328,15 +328,15 @@ public class ProfileGenerator extends AbstractQVTGenerator {
try {
ModelExtent inProfile = null;
- if(listEObject.get(i) instanceof Package) {
- Package currentPackage = (Package)listEObject.get(i);
- umlProfile = (Profile)loadEMFModel(currentPackage.eResource().getURI());
+ if (listEObject.get(i) instanceof Package) {
+ Package currentPackage = (Package) listEObject.get(i);
+ umlProfile = (Profile) loadEMFModel(currentPackage.eResource().getURI());
inProfile = new BasicModelExtent(Collections.singletonList(umlProfile));
}
URI umlURI = URI.createURI("ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx", true);
- Context umlContext = (Context)loadEMFModel(umlURI);
- if(umlContext == null) {
+ Context umlContext = (Context) loadEMFModel(umlURI);
+ if (umlContext == null) {
Activator.log.warn("Cannot find the UML Property View configuration");
}
ModelExtent inUml = new BasicModelExtent(Collections.singletonList(umlContext));
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ILayoutGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ILayoutGenerator.java
index 930dae9353a..3868477323e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ILayoutGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ILayoutGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -22,7 +22,7 @@ import org.eclipse.papyrus.views.properties.ui.PropertyEditor;
* An interface for defining Layout generators.
* Layout generators are responsible for building a List of sections from a list
* of Property editors.
- *
+ *
* @author Camille Letavernier
*/
public interface ILayoutGenerator {
@@ -30,11 +30,11 @@ public interface ILayoutGenerator {
/**
* Return a list of Sections from a list of property editors.
* Each section should be placed in the parent's resourceSet
- *
+ *
* @param editors
- * The list of editors to layout
+ * The list of editors to layout
* @param parent
- * The view owning the resulting list of sections
+ * The view owning the resulting list of sections
* @return
* The list of sections owning the input editors
*/
@@ -47,11 +47,11 @@ public interface ILayoutGenerator {
/**
* Sets the generator used to generate the Property view configuration
- *
+ *
* @param generator
*/
- //TODO : This method has been added for a specific case (Profile layout).
- //It should be removed when we have a better way to retrieve the source
- //profile
+ // TODO : This method has been added for a specific case (Profile layout).
+ // It should be removed when we have a better way to retrieve the source
+ // profile
public void setGenerator(IGenerator generator);
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java
index 40bb1b8af93..1404c570371 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/ProfileWithDatatypes.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2012 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -44,11 +44,11 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
@Override
protected void sortEditors(List<PropertyEditor> editors) {
- for(PropertyEditor editor : editors) {
+ for (PropertyEditor editor : editors) {
Category category = new TypeCategory(editor.getProperty());
getByCategory(category).add(editor);
- if(editor.getWidgetType() == null) {
+ if (editor.getWidgetType() == null) {
Activator.log.warn(String.format("Editor for property %s doesn't have a WidgetType", editor.getProperty().getName())); //$NON-NLS-1$
continue;
}
@@ -59,7 +59,7 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
@Override
protected CompositeWidget layoutCategorizedEditors(Category category, List<PropertyEditor> editors) {
- if(((TypeCategory)category).isDatatype) {
+ if (((TypeCategory) category).isDatatype) {
CompositeWidgetType compositeType = ConfigurationManager.getInstance().getDefaultCompositeType();
CompositeWidget container = UiFactory.eINSTANCE.createCompositeWidget();
@@ -68,7 +68,7 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
Layout layout = createLayout(category.getNumColumns());
container.setLayout(layout);
- for(PropertyEditor editor : editors) {
+ for (PropertyEditor editor : editors) {
CompositeWidget group = createDataTypeGroup(editor.getProperty());
PropertyEditor viewEditor = UiFactory.eINSTANCE.createPropertyEditor();
@@ -91,28 +91,28 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
}
protected String getViewName(Property property) {
- if(!(generator instanceof ProfileGenerator)) {
+ if (!(generator instanceof ProfileGenerator)) {
return "";
}
- org.eclipse.uml2.uml.Property attribute = ((ProfileGenerator)generator).getAttribute(property);
+ org.eclipse.uml2.uml.Property attribute = ((ProfileGenerator) generator).getAttribute(property);
Package nearestPackage = attribute.getType().getNearestPackage();
Package rootPackage = nearestPackage;
- while(rootPackage.getNestingPackage() != null) {
+ while (rootPackage.getNestingPackage() != null) {
rootPackage = rootPackage.getNestingPackage();
}
- //TODO : We're assuming the rootPackage has the same name as the context...
- //This layout generator is really only compatible with ProfileGenerator
+ // TODO : We're assuming the rootPackage has the same name as the context...
+ // This layout generator is really only compatible with ProfileGenerator
return rootPackage.getName() + ":Single " + attribute.getType().getName();
}
protected Context findContext(Property property) {
DataContextElement element = property.getContextElement();
- if(element instanceof DataContextRoot) {
- //TODO : Add a container reference to Context
- return (Context)element.eContainer();
+ if (element instanceof DataContextRoot) {
+ // TODO : Add a container reference to Context
+ return (Context) element.eContainer();
}
return findContext(element);
@@ -120,8 +120,8 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
protected Context findContext(DataContextElement element) {
DataContextPackage dataContextPackage = element.getPackage();
- if(dataContextPackage instanceof DataContextRoot) {
- return (Context)dataContextPackage.eContainer();
+ if (dataContextPackage instanceof DataContextRoot) {
+ return (Context) dataContextPackage.eContainer();
}
return findContext(dataContextPackage);
}
@@ -162,9 +162,9 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
}
protected CompositeWidgetType getGroupComposite() {
- for(Environment environment : ConfigurationManager.getInstance().getPropertiesRoot().getEnvironments()) {
- for(CompositeWidgetType widgetType : environment.getCompositeWidgetTypes()) {
- if(widgetType.getNamespace() == null && widgetType.getWidgetClass().equals("Group")) {
+ for (Environment environment : ConfigurationManager.getInstance().getPropertiesRoot().getEnvironments()) {
+ for (CompositeWidgetType widgetType : environment.getCompositeWidgetTypes()) {
+ if (widgetType.getNamespace() == null && widgetType.getWidgetClass().equals("Group")) {
return widgetType;
}
}
@@ -175,9 +175,9 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
}
protected PropertyEditorType getViewEditor() {
- for(Environment environment : ConfigurationManager.getInstance().getPropertiesRoot().getEnvironments()) {
- for(PropertyEditorType widgetType : environment.getPropertyEditorTypes()) {
- if(widgetType.getNamespace() != null && "ppe".equals(widgetType.getNamespace().getName()) && widgetType.getWidgetClass().equals("ViewEditor")) {
+ for (Environment environment : ConfigurationManager.getInstance().getPropertiesRoot().getEnvironments()) {
+ for (PropertyEditorType widgetType : environment.getPropertyEditorTypes()) {
+ if (widgetType.getNamespace() != null && "ppe".equals(widgetType.getNamespace().getName()) && widgetType.getWidgetClass().equals("ViewEditor")) {
return widgetType;
}
}
@@ -199,15 +199,15 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
public TypeCategory(Property property) {
super(property);
org.eclipse.uml2.uml.Property attribute = resolveProperty(property);
- if(attribute != null) {
+ if (attribute != null) {
isDatatype = attribute.getType().eClass() == UMLPackage.eINSTANCE.getDataType();
}
}
protected org.eclipse.uml2.uml.Property resolveProperty(Property property) {
- //TODO : We should not have to rely on the IGenerator to retrieve the property...
- if(generator instanceof ProfileGenerator) {
- ProfileGenerator profileGenerator = (ProfileGenerator)generator;
+ // TODO : We should not have to rely on the IGenerator to retrieve the property...
+ if (generator instanceof ProfileGenerator) {
+ ProfileGenerator profileGenerator = (ProfileGenerator) generator;
return profileGenerator.getAttribute(property);
}
@@ -216,7 +216,7 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
@Override
public Integer getNumColumns() {
- if(isDatatype) {
+ if (isDatatype) {
return 1;
}
return super.getNumColumns();
@@ -233,20 +233,20 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
@Override
public boolean equals(Object obj) {
- if(this == obj) {
+ if (this == obj) {
return true;
}
- if(!super.equals(obj)) {
+ if (!super.equals(obj)) {
return false;
}
- if(!(obj instanceof TypeCategory)) {
+ if (!(obj instanceof TypeCategory)) {
return false;
}
- TypeCategory other = (TypeCategory)obj;
- if(!getOuterType().equals(other.getOuterType())) {
+ TypeCategory other = (TypeCategory) obj;
+ if (!getOuterType().equals(other.getOuterType())) {
return false;
}
- if(isDatatype != other.isDatatype) {
+ if (isDatatype != other.isDatatype) {
return false;
}
return true;
@@ -254,7 +254,7 @@ public class ProfileWithDatatypes extends StandardLayoutGenerator {
@Override
public Integer getTypeIndex() {
- if(isDatatype) {
+ if (isDatatype) {
return orderedTypes.length + 1;
}
return super.getTypeIndex();
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/StandardLayoutGenerator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/StandardLayoutGenerator.java
index b1805b0001e..225a0f40ae5 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/StandardLayoutGenerator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/layout/StandardLayoutGenerator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -45,9 +45,9 @@ import org.eclipse.papyrus.views.properties.util.PropertiesUtil;
* Default implementation for ILayoutGenerator
* PropertyEditors are grouped by their property type (Strings, booleans, ...)
* Boolean and integer sections have two columns, while the other ones have only one columns
- *
+ *
* All multiple value editors are displayed after all the single value editors.
- *
+ *
* @author Camille Letavernier
*/
public class StandardLayoutGenerator implements ILayoutGenerator {
@@ -67,7 +67,7 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
Section section = createSection(parent);
- for(Map.Entry<Category, List<PropertyEditor>> mapping : editorsByCategory.entrySet()) {
+ for (Map.Entry<Category, List<PropertyEditor>> mapping : editorsByCategory.entrySet()) {
Category category = mapping.getKey();
List<PropertyEditor> categorizedEditors = mapping.getValue();
@@ -98,11 +98,11 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
}
protected void sortEditors(List<PropertyEditor> editors) {
- for(PropertyEditor editor : editors) {
+ for (PropertyEditor editor : editors) {
Category category = new Category(editor.getProperty());
getByCategory(category).add(editor);
- if(editor.getWidgetType() == null) {
+ if (editor.getWidgetType() == null) {
Activator.log.warn(String.format("Editor for property %s doesn't have a WidgetType", editor.getProperty().getName())); //$NON-NLS-1$
continue;
}
@@ -116,7 +116,7 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
Section section = ContextsFactory.eINSTANCE.createSection();
section.setName(parent.getName());
- section.setSectionFile(String.format("ui/%s.xwt", section.getName().replaceAll(" ", ""))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ section.setSectionFile(String.format("ui/%s.xwt", section.getName().replaceAll(" ", ""))); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
URI compositeURI = URI.createURI(section.getSectionFile());
compositeURI = compositeURI.resolve(parent.eResource().getURI());
@@ -147,8 +147,8 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
protected List<ValueAttribute> createNamespaces(Collection<Namespace> namespaces) {
List<ValueAttribute> xmlNamespaces = new LinkedList<ValueAttribute>();
- for(Namespace namespace : namespaces) {
- if(namespace == null) {
+ for (Namespace namespace : namespaces) {
+ if (namespace == null) {
continue;
}
@@ -161,7 +161,7 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
}
protected List<PropertyEditor> getByCategory(Category category) {
- if(!editorsByCategory.containsKey(category)) {
+ if (!editorsByCategory.containsKey(category)) {
editorsByCategory.put(category, new LinkedList<PropertyEditor>());
}
return editorsByCategory.get(category);
@@ -174,7 +174,7 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
public int multiplicity;
public Integer getNumColumns() {
- switch(editorType) {
+ switch (editorType) {
case BOOLEAN:
return 2;
case ENUMERATION:
@@ -186,7 +186,7 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
case STRING:
return 1;
}
- return 1; //Cannot happen
+ return 1; // Cannot happen
}
public Category(Property property) {
@@ -206,34 +206,34 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
@Override
public boolean equals(Object obj) {
- if(this == obj) {
+ if (this == obj) {
return true;
}
- if(obj == null) {
+ if (obj == null) {
return false;
}
- if(!(obj instanceof Category)) {
+ if (!(obj instanceof Category)) {
return false;
}
- Category other = (Category)obj;
- if(!getOuterType().equals(other.getOuterType())) {
+ Category other = (Category) obj;
+ if (!getOuterType().equals(other.getOuterType())) {
return false;
}
- if(editorType != other.editorType) {
+ if (editorType != other.editorType) {
return false;
}
- if(multiplicity != other.multiplicity) {
+ if (multiplicity != other.multiplicity) {
return false;
}
return true;
}
public int compareTo(Category category) {
- if(category == null) {
+ if (category == null) {
return -1;
}
- if(category.multiplicity != multiplicity) {
+ if (category.multiplicity != multiplicity) {
return multiplicity == 1 ? -1 : 1;
}
@@ -243,8 +243,8 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
public Integer getTypeIndex() {
int i = 0;
- for(Type type : orderedTypes) {
- if(type == editorType) {
+ for (Type type : orderedTypes) {
+ if (type == editorType) {
return i;
}
i++;
@@ -265,13 +265,13 @@ public class StandardLayoutGenerator implements ILayoutGenerator {
/**
* The order in which the types are displayed
*/
- public static Type[] orderedTypes = new Type[]{ Type.STRING, Type.BOOLEAN, Type.INTEGER, Type.ENUMERATION, Type.REFERENCE };
+ public static Type[] orderedTypes = new Type[] { Type.STRING, Type.BOOLEAN, Type.INTEGER, Type.ENUMERATION, Type.REFERENCE };
public String getName() {
return Messages.StandardLayoutGenerator_name;
}
public void setGenerator(IGenerator generator) {
- //Ignored
+ // Ignored
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java
index 588c983d528..8ee5b92666d 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/messages/Messages.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2011 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesContentProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesContentProvider.java
index 85a55864949..4a5a3b35626 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesContentProvider.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesContentProvider.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2012 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -28,7 +28,7 @@ public class DataContextPropertiesContentProvider extends PropertyContentProvide
@Override
public Object[] getElements() {
- //We're only interested in the generated contexts ; not in their dependencies
+ // We're only interested in the generated contexts ; not in their dependencies
return contexts.toArray();
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesLabelProvider.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesLabelProvider.java
index a02107818f3..1ea93fa026c 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesLabelProvider.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/providers/DataContextPropertiesLabelProvider.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2012 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -49,49 +49,49 @@ public class DataContextPropertiesLabelProvider extends StyledCellLabelProvider
protected StyledString getStyledText(Object element, int columnIndex) {
String text = getText(element, columnIndex);
- if(columnIndex == selectFieldsPage.fieldColumn) {
+ if (columnIndex == selectFieldsPage.fieldColumn) {
EObject eObject = EMFHelper.getEObject(element);
- if(!(eObject instanceof Property)) {
+ if (!(eObject instanceof Property)) {
StyledString styledString = new StyledString(text, StyledString.QUALIFIER_STYLER);
return styledString;
}
}
- // if(columnIndex == selectFieldsPage.selectionSingleColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.selectionSingleColumn) {
+ // //Nothing
+ // }
//
- // if(columnIndex == selectFieldsPage.selectionMultipleColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.selectionMultipleColumn) {
+ // //Nothing
+ // }
//
- // if(columnIndex == selectFieldsPage.descriptionColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.descriptionColumn) {
+ // //Nothing
+ // }
- //Default
+ // Default
return new StyledString(text);
}
protected String getText(Object element, int columnIndex) {
- if(columnIndex == selectFieldsPage.fieldColumn) {
+ if (columnIndex == selectFieldsPage.fieldColumn) {
return labelProvider.getText(element);
}
- // if(columnIndex == selectFieldsPage.selectionSingleColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.selectionSingleColumn) {
+ // //Nothing
+ // }
//
- // if(columnIndex == selectFieldsPage.selectionMultipleColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.selectionMultipleColumn) {
+ // //Nothing
+ // }
- if(columnIndex == selectFieldsPage.descriptionColumn) {
+ if (columnIndex == selectFieldsPage.descriptionColumn) {
EObject eObject = EMFHelper.getEObject(element);
- if(eObject instanceof Property) {
- String description = ((Property)element).getDescription();
- if(description != null) {
+ if (eObject instanceof Property) {
+ String description = ((Property) element).getDescription();
+ if (description != null) {
return description.replaceAll("[\n\r]+", "\\\\");
}
@@ -99,28 +99,28 @@ public class DataContextPropertiesLabelProvider extends StyledCellLabelProvider
}
}
- //Default
+ // Default
return "";
}
protected Image getImage(Object element, int columnIndex) {
- if(columnIndex == selectFieldsPage.fieldColumn) {
+ if (columnIndex == selectFieldsPage.fieldColumn) {
return labelProvider.getImage(element);
}
- // if(columnIndex == selectFieldsPage.selectionSingleColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.selectionSingleColumn) {
+ // //Nothing
+ // }
//
- // if(columnIndex == selectFieldsPage.selectionMultipleColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.selectionMultipleColumn) {
+ // //Nothing
+ // }
//
- // if(columnIndex == selectFieldsPage.descriptionColumn) {
- // //Nothing
- // }
+ // if(columnIndex == selectFieldsPage.descriptionColumn) {
+ // //Nothing
+ // }
- //Default
+ // Default
return null;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java
index b97f6d89c24..0aa404ec6e0 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/AbstractValidator.java
@@ -1,13 +1,13 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are 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:
- * Thibault Le Ouay t.leouay@sherpa-eng.com
+ * Thibault Le Ouay t.leouay@sherpa-eng.com
*****************************************************************************/
@@ -31,7 +31,7 @@ public abstract class AbstractValidator implements IValidator {
}
public String getPluginId() {
- if(pluginId == null) {
+ if (pluginId == null) {
return Activator.PLUGIN_ID;
} else {
return pluginId;
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java
index f3676793699..3273dd876dd 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/SourceValidator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -48,22 +48,22 @@ public class SourceValidator extends AbstractValidator {
IWorkspaceRoot myWorkspaceRoot = ResourcesPlugin.getWorkspace()
.getRoot();
- IFile file =null;
- try{
+ IFile file = null;
+ try {
IPath path = new Path(s);
file = myWorkspaceRoot.getFile(path);
- }
- catch(IllegalArgumentException ex){
+ } catch (IllegalArgumentException ex) {
return error(ex.getMessage());
}
if (!file.exists()) {
return error(Messages.SourceValidator_5);
}
+ } else {
+ return error(Messages.SourceValidator_6);
}
- else return error(Messages.SourceValidator_6);
-
+
return Status.OK_STATUS;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java
index e0441c2d3c5..7aae8904862 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/validators/TargetValidator.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2013 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -18,19 +18,20 @@ import org.eclipse.papyrus.customization.properties.generation.messages.Messages
public class TargetValidator extends AbstractValidator {
-
+
public IStatus validate(Object value) {
- if(value instanceof String){
+ if (value instanceof String) {
String s = (String) value;
- if(!s.equals("")){ //$NON-NLS-1$
- if(!s.endsWith("ctx")){ //$NON-NLS-1$
+ if (!s.equals("")) { //$NON-NLS-1$
+ if (!s.endsWith("ctx")) { //$NON-NLS-1$
return error(Messages.TargetValidator_2);
}
+ } else {
+ return error(Messages.TargetValidator_3);
}
- else return error(Messages.TargetValidator_3);
- }
-
- return Status.OK_STATUS;
}
+ return Status.OK_STATUS;
+ }
+
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/AbstractCreateContextPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/AbstractCreateContextPage.java
index 70360dd1701..53a460ee9d4 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/AbstractCreateContextPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/AbstractCreateContextPage.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -17,7 +17,7 @@ import org.eclipse.jface.wizard.WizardPage;
/**
* An abstract WizardPage for the CreateContext wizard, providing helper
* methods to its implementers
- *
+ *
* @author Camille Letavernier
*/
public abstract class AbstractCreateContextPage extends WizardPage {
@@ -25,25 +25,25 @@ public abstract class AbstractCreateContextPage extends WizardPage {
/**
* Builds a new WizardPage with the given pageName
* Constructor.
- *
+ *
* @param pageName
- * The name of this wizard page
+ * The name of this wizard page
*/
public AbstractCreateContextPage(String pageName) {
super(pageName);
}
/**
- *
+ *
* Builds a new WizardPage with the given pageName, title and image
- *
+ *
* @param pageName
- * the name of the page
+ * the name of the page
* @param title
- * the title for this wizard page, or <code>null</code> if none
+ * the title for this wizard page, or <code>null</code> if none
* @param titleImage
- * the image descriptor for the title of this wizard page,
- * or <code>null</code> if none
+ * the image descriptor for the title of this wizard page,
+ * or <code>null</code> if none
*/
public AbstractCreateContextPage(String pageName, String title, ImageDescriptor titleImage) {
super(pageName, title, titleImage);
@@ -51,7 +51,7 @@ public abstract class AbstractCreateContextPage extends WizardPage {
@Override
public CreateContextWizard getWizard() {
- return (CreateContextWizard)super.getWizard();
+ return (CreateContextWizard) super.getWizard();
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java
index abf418c0861..bffba34409c 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextMainPage.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -10,7 +10,7 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Thibault Le Ouay t.leouay@sherpa-eng.com - Add SelectOutputPage
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.wizard;
@@ -32,9 +32,9 @@ import org.eclipse.swt.widgets.Listener;
/**
* A WizardPage for selecting the method of generation (e.g. from Ecore
* Metamodel or from Profile model)
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class CreateContextMainPage extends AbstractCreateContextPage implements Listener {
@@ -54,7 +54,7 @@ public class CreateContextMainPage extends AbstractCreateContextPage implements
@Override
public void dispose() {
try {
- for(IGenerator next : generators) {
+ for (IGenerator next : generators) {
next.dispose();
}
} finally {
@@ -67,7 +67,7 @@ public class CreateContextMainPage extends AbstractCreateContextPage implements
root.setLayout(new GridLayout(1, false));
combo = new CCombo(root, SWT.BORDER);
- for(IGenerator generator : generators) {
+ for (IGenerator generator : generators) {
combo.add(generator.getName());
}
combo.setEditable(false);
@@ -84,7 +84,7 @@ public class CreateContextMainPage extends AbstractCreateContextPage implements
public IWizardPage getNextPage() {
int selection = combo.getSelectionIndex();
getWizard().setGenerator(generators.get(selection));
- // getWizard().generatorPage.clearTarget();
+ // getWizard().generatorPage.clearTarget();
return getWizard().generatorPage;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java
index 6c11474f5f5..f5411680e60 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/CreateContextWizard.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010, 2014 CEA LIST and others.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -9,7 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.wizard;
@@ -25,6 +25,7 @@ import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
@@ -52,7 +53,7 @@ import org.eclipse.ui.IWorkbench;
/**
* A Wizard for generating Property view contexts
- *
+ *
* @author Camille Letavernier
*/
public class CreateContextWizard extends Wizard implements INewWizard {
@@ -60,10 +61,10 @@ public class CreateContextWizard extends Wizard implements INewWizard {
protected CreateContextMainPage mainPage;
protected GeneratorPage generatorPage;
-
+
protected SelectOutputPage selectOutputPage;
- //protected LayoutPage layout;
+ // protected LayoutPage layout;
protected SelectFieldsPage selectFieldsPage;
@@ -88,13 +89,13 @@ public class CreateContextWizard extends Wizard implements INewWizard {
@Override
public boolean performFinish() {
- if(generator == null || contexts == null || contexts.isEmpty() || layoutGenerator == null) {
+ if (generator == null || contexts == null || contexts.isEmpty() || layoutGenerator == null) {
return false;
}
ConfigurationManager configManager = ConfigurationManager.getInstance();
- for(Context context : contexts) {
+ for (Context context : contexts) {
Tab defaultTab = ContextsFactory.eINSTANCE.createTab();
defaultTab.setId(context.getName().toLowerCase());
defaultTab.setLabel(context.getName());
@@ -103,27 +104,27 @@ public class CreateContextWizard extends Wizard implements INewWizard {
FieldSelection fieldSelection = selectFieldsPage.getFieldSelection();
- // URI contextURI = context.eResource().getURI();
+ // URI contextURI = context.eResource().getURI();
// Resource selectionResource = context.eResource().getResourceSet().createResource(URI.createURI(context.getName() + "FieldSelection.xmi").resolve(contextURI)); //$NON-NLS-1$
- // selectionResource.getContents().add(fieldSelection);
- // try {
- // selectionResource.save(null);
- // } catch (IOException ex) {
+ // selectionResource.getContents().add(fieldSelection);
+ // try {
+ // selectionResource.save(null);
+ // } catch (IOException ex) {
// Activator.log.error("Couldn't persist the field selection model", ex); //$NON-NLS-1$
- // }
+ // }
layoutGenerator.setGenerator(generator);
- for(View view : context.getViews()) {
- if(view.getConstraints().size() == 0) {
+ for (View view : context.getViews()) {
+ if (view.getConstraints().size() == 0) {
continue;
}
List<PropertyEditor> editors = new LinkedList<PropertyEditor>();
- for(DataContextElement element : getAllContextElements(view.getDatacontexts())) {
- for(Property property : element.getProperties()) {
- if(isSelected(fieldSelection, property, view.getElementMultiplicity() != 1)) {
+ for (DataContextElement element : getAllContextElements(view.getDatacontexts())) {
+ for (Property property : element.getProperties()) {
+ if (isSelected(fieldSelection, property, view.getElementMultiplicity() != 1)) {
PropertyEditor editor = UiFactory.eINSTANCE.createPropertyEditor();
editor.setProperty(property);
editor.setWidgetType(configManager.getDefaultEditorType(property));
@@ -143,7 +144,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
}
int i = 1;
- for(Tab tab : context.getTabs()) {
+ for (Tab tab : context.getTabs()) {
i += tab.getSections().size();
}
final int numberOfSections = i;
@@ -152,7 +153,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
final Context currentContext = context;
final Map<String, Object> saveOptions = new HashMap<String, Object>();
- saveOptions.put(XMIResource.OPTION_PROCESS_DANGLING_HREF, XMIResource.OPTION_PROCESS_DANGLING_HREF_RECORD);
+ saveOptions.put(XMLResource.OPTION_PROCESS_DANGLING_HREF, XMLResource.OPTION_PROCESS_DANGLING_HREF_RECORD);
getContainer().run(true, true, new IRunnableWithProgress() {
@@ -163,9 +164,9 @@ public class CreateContextWizard extends Wizard implements INewWizard {
try {
currentContext.eResource().save(saveOptions);
monitor.worked(1);
- for(Tab tab : currentContext.getTabs()) {
- for(Section section : tab.getSections()) {
- if(monitor.isCanceled()) {
+ for (Tab tab : currentContext.getTabs()) {
+ for (Section section : tab.getSections()) {
+ if (monitor.isCanceled()) {
return;
}
section.getWidget().eResource().save(saveOptions);
@@ -193,11 +194,11 @@ public class CreateContextWizard extends Wizard implements INewWizard {
private boolean isSelected(FieldSelection fieldSelection, Property property, boolean multiple) {
PropertyDefinition definition = getPropertyDefinition(fieldSelection, property);
- if(definition == null) {
+ if (definition == null) {
return false;
}
TernaryButton.State value = multiple ? definition.getValueMultiple() : definition.getValueSingle();
- switch(value) {
+ switch (value) {
case TRUE:
return true;
case FALSE:
@@ -211,34 +212,34 @@ public class CreateContextWizard extends Wizard implements INewWizard {
protected PropertyDefinition getPropertyDefinition(FieldSelection fieldSelection, Property property) {
List<String> propertyPath = getPropertyPath(property.getContextElement());
- if(propertyPath.isEmpty()) {
+ if (propertyPath.isEmpty()) {
return null;
}
ContextElement currentElement = null;
- for(ContextElement contextRoot : fieldSelection.getContextElements()) {
- if(contextRoot.getName().equals(propertyPath.get(0))) {
+ for (ContextElement contextRoot : fieldSelection.getContextElements()) {
+ if (contextRoot.getName().equals(propertyPath.get(0))) {
currentElement = contextRoot;
}
}
propertyPath.remove(0);
- if(currentElement == null) {
+ if (currentElement == null) {
return null;
}
- while(propertyPath.size() > 0) {
+ while (propertyPath.size() > 0) {
String name = propertyPath.get(0);
propertyPath.remove(0);
currentElement = findByName(currentElement, name);
}
- if(currentElement == null) {
+ if (currentElement == null) {
return null;
}
- for(PropertyDefinition definition : currentElement.getProperties()) {
- if(definition.getName().equals(property.getName())) {
+ for (PropertyDefinition definition : currentElement.getProperties()) {
+ if (definition.getName().equals(property.getName())) {
return definition;
}
}
@@ -247,8 +248,8 @@ public class CreateContextWizard extends Wizard implements INewWizard {
}
protected ContextElement findByName(ContextElement source, String name) {
- for(ContextElement element : source.getElements()) {
- if(element.getName().equals(name)) {
+ for (ContextElement element : source.getElements()) {
+ if (element.getName().equals(name)) {
return element;
}
}
@@ -257,7 +258,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
protected List<String> getPropertyPath(DataContextElement element) {
List<String> result;
- if(element.getPackage() == null) {
+ if (element.getPackage() == null) {
result = new LinkedList<String>();
} else {
result = getPropertyPath(element.getPackage());
@@ -268,19 +269,19 @@ public class CreateContextWizard extends Wizard implements INewWizard {
private Set<DataContextElement> getAllContextElements(Collection<DataContextElement> source) {
Set<DataContextElement> result = new HashSet<DataContextElement>();
- for(DataContextElement element : source) {
+ for (DataContextElement element : source) {
getAllContextElements(element, result);
}
return result;
}
private void getAllContextElements(DataContextElement source, Set<DataContextElement> result) {
- if(result.contains(source)) {
+ if (result.contains(source)) {
return;
}
result.add(source);
- for(DataContextElement element : source.getSupertypes()) {
+ for (DataContextElement element : source.getSupertypes()) {
getAllContextElements(element, result);
}
}
@@ -290,7 +291,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
addPage(generatorPage = new GeneratorPage());
addPage(selectOutputPage = new SelectOutputPage());
addPage(selectFieldsPage = new SelectFieldsPage());
- //addPage(layout = new LayoutPage());
+ // addPage(layout = new LayoutPage());
setWindowTitle(Messages.CreateContextWizard_pageTitle);
@@ -303,7 +304,7 @@ public class CreateContextWizard extends Wizard implements INewWizard {
}
protected void setContexts(List<Context> contexts) {
- if(!contexts.isEmpty()) {
+ if (!contexts.isEmpty()) {
this.contexts = contexts;
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java
index 1410738921f..5870cec6b0e 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/GeneratorPage.java
@@ -10,7 +10,7 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Thibault Le Ouay t.leouay@sherpa-eng.com - Strategy improvement of generated files
* Christian W. Damus (CEA) - bug 422257
- *
+ *
*****************************************************************************/
package org.eclipse.papyrus.customization.properties.generation.wizard;
@@ -55,7 +55,7 @@ import org.eclipse.swt.widgets.Listener;
public class GeneratorPage extends AbstractCreateContextPage implements Listener {
private final List<ILayoutGenerator> layoutGenerators;
-
+
protected IGenerator generator;
private Composite root, generatorControl;
@@ -92,7 +92,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
ctx = new DataBindingContext();
srcFieldStrategy = new UpdateValueStrategy();
targetFieldStrategy = new UpdateValueStrategy();
-
+
layoutGenerators = new LayoutExtensionPoint().getGenerators();
}
@@ -125,7 +125,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
}
private void cleanGeneratorControl() {
- for(Control control : generatorControl.getChildren()) {
+ for (Control control : generatorControl.getChildren()) {
control.dispose();
}
}
@@ -149,7 +149,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
layoutCombo.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
layoutCombo.setEditable(false);
layoutCombo.setBackground(new Color(layoutCombo.getDisplay(), 255, 255, 255));
- for(ILayoutGenerator layoutGenerator : layoutGenerators) {
+ for (ILayoutGenerator layoutGenerator : layoutGenerators) {
layoutCombo.add(layoutGenerator.getName());
}
layoutCombo.select(0);
@@ -164,8 +164,8 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
targetFileChooser.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false));
targetFileChooser.addListener(this);
targetTextObservable = targetFileChooser.getObservableValue();
- targetFileChooser.setFilterExtensions(new String[]{ "ctx" });
- if(targetFieldStrategy != null) {
+ targetFileChooser.setFilterExtensions(new String[] { "ctx" });
+ if (targetFieldStrategy != null) {
targetFieldStrategy.setConverter(new IConverter() {
public Object getToType() {
@@ -178,9 +178,9 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
}
public String convert(Object fromObject) {
- if(srcTextObservable != null) {
- return (String)srcTextObservable.getValue();
- } else if(targetFileChooser.getFilePath() != null) {
+ if (srcTextObservable != null) {
+ return (String) srcTextObservable.getValue();
+ } else if (targetFileChooser.getFilePath() != null) {
return targetFileChooser.getFilePath();
}
@@ -188,7 +188,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
}
});
}
- if(srcFieldStrategy != null) {
+ if (srcFieldStrategy != null) {
srcFieldStrategy.setConverter(new IConverter() {
public Object getToType() {
@@ -201,9 +201,9 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
public String convert(Object fromObject) {
- if(fromObject instanceof String) {
- String stringObject = (String)fromObject;
- if(stringObject.equals("")) {
+ if (fromObject instanceof String) {
+ String stringObject = (String) fromObject;
+ if (stringObject.equals("")) {
return "";
}
String[] result = stringObject.split("/");
@@ -211,12 +211,12 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
String[] ext = filename.split("\\.");
StringBuilder builder = new StringBuilder();
- if(targetTextObservable != null) {
- String s = (String)targetTextObservable.getValue();
- if(!s.equals("")) {
+ if (targetTextObservable != null) {
+ String s = (String) targetTextObservable.getValue();
+ if (!s.equals("")) {
String original[] = s.split("/");
builder.append("/");
- for(int i = 1; i < original.length - 1; i++) {
+ for (int i = 1; i < original.length - 1; i++) {
builder.append(original[i]);
builder.append("/");
@@ -246,7 +246,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
String filePath = targetFileChooser.getFilePath();
- if(filePath != null) {
+ if (filePath != null) {
super.getContainer().updateButtons();
}
@@ -264,7 +264,7 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
}
public void doBinding() {
- if(srcTextObservable != null || targetTextObservable != null) {
+ if (srcTextObservable != null || targetTextObservable != null) {
srcValidator = new SourceValidator(generator);
targetValidator = new TargetValidator();
@@ -282,8 +282,8 @@ public class GeneratorPage extends AbstractCreateContextPage implements Listener
binding.getValidationStatus().addValueChangeListener(new IValueChangeListener() {
public void handleValueChange(ValueChangeEvent event) {
- IStatus status = (IStatus)event.diff.getNewValue();
- if(status.isOK()) {
+ IStatus status = (IStatus) event.diff.getNewValue();
+ if (status.isOK()) {
setNext(true);
} else {
setNext(false);
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java
index e495e6c49a6..5c8d2bf814f 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectFieldsPage.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -53,7 +53,7 @@ import org.eclipse.swt.widgets.TreeItem;
* The visibility of properties marked as Default is decided by the Generator.
* When the context is regenerated, the visibility of properties marked as default
* may change (If the generator is changed)
- *
+ *
* @author Camille Letavernier
*/
public class SelectFieldsPage extends AbstractCreateContextPage {
@@ -69,7 +69,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
public int fieldColumn = -1, selectionSingleColumn = -1, selectionMultipleColumn = -1, descriptionColumn = -1;
private int columnId = 0;
-
+
/**
* Constructor.
@@ -90,12 +90,12 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
/**
* Sets the generated partial context
- *
+ *
* @param context
- * The partially generated context
+ * The partially generated context
*/
public void setContexts(List<Context> contexts) {
- if(contexts == null || contexts.isEmpty()) {
+ if (contexts == null || contexts.isEmpty()) {
Activator.log.warn("Generated context is null"); //$NON-NLS-1$
return;
}
@@ -141,7 +141,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
column.setText(label);
column.setResizable(true);
- ((TableLayout)tree.getLayout()).addColumnData(new ColumnWeightData(weight, minimumWidth));
+ ((TableLayout) tree.getLayout()).addColumnData(new ColumnWeightData(weight, minimumWidth));
return columnId++;
}
@@ -149,7 +149,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
private void installEditors(TreeViewer viewer) {
Tree tree = viewer.getTree();
- for(TreeItem treeItem : tree.getItems()) {
+ for (TreeItem treeItem : tree.getItems()) {
installEditors(treeItem);
}
}
@@ -157,8 +157,8 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
private void installEditors(TreeItem treeItem) {
EObject eObject = EMFHelper.getEObject(treeItem.getData());
- if(eObject instanceof Property) {
- Property property = (Property)eObject;
+ if (eObject instanceof Property) {
+ Property property = (Property) eObject;
boolean defaultSingleValue = getGenerator().isSelectedSingle(property);
boolean defaultMultipleValue = getGenerator().isSelectedMultiple(property);
@@ -172,7 +172,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
createTreeEditor(treeItem, selectionMultipleColumn, defaultMultipleValue, multipleValue);
}
- for(TreeItem subItem : treeItem.getItems()) {
+ for (TreeItem subItem : treeItem.getItems()) {
installEditors(subItem);
}
@@ -195,8 +195,8 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
private FieldSelection createNewFieldSelection() {
FieldSelection selection = FieldSelectionFactory.eINSTANCE.createFieldSelection();
- for(Context context : contexts) {
- for(DataContextRoot dataContextRoot : context.getDataContexts()) {
+ for (Context context : contexts) {
+ for (DataContextRoot dataContextRoot : context.getDataContexts()) {
ContextElement definition = createContextPackage(dataContextRoot);
selection.getContextElements().add(definition);
}
@@ -208,10 +208,10 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
private ContextElement createContextPackage(DataContextPackage sourcePackage) {
ContextElement element = createContextElement(sourcePackage);
- for(DataContextElement sourceElement : sourcePackage.getElements()) {
+ for (DataContextElement sourceElement : sourcePackage.getElements()) {
ContextElement subElement;
- if(sourceElement instanceof DataContextPackage) {
- subElement = createContextPackage((DataContextPackage)sourceElement);
+ if (sourceElement instanceof DataContextPackage) {
+ subElement = createContextPackage((DataContextPackage) sourceElement);
} else {
subElement = createContextElement(sourceElement);
}
@@ -224,7 +224,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
ContextElement element = FieldSelectionFactory.eINSTANCE.createContextElement();
element.setName(sourceElement.getName());
- for(Property property : sourceElement.getProperties()) {
+ for (Property property : sourceElement.getProperties()) {
PropertyDefinition propertyDefinition = FieldSelectionFactory.eINSTANCE.createPropertyDefinition();
propertyDefinition.setName(property.getName());
propertyDefinition.setValueSingle(TernaryButton.State.DEFAULT);
@@ -237,69 +237,69 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
private void displayFields(DataContextElement contextElement, TreeViewer treeViewer) {
- // if(contextElement.getProperties().size() > 0) {
+ // if(contextElement.getProperties().size() > 0) {
//
- // Label separator = new Label(fields, SWT.SEPARATOR | SWT.HORIZONTAL);
- // GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1);
- // separator.setLayoutData(data);
+ // Label separator = new Label(fields, SWT.SEPARATOR | SWT.HORIZONTAL);
+ // GridData data = new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1);
+ // separator.setLayoutData(data);
//
- // Label elementName = new Label(fields, SWT.NONE);
- // elementName.setText(contextElement.getName());
- // FontData[] fontDatas = elementName.getFont().getFontData();
- // for(FontData fontData : fontDatas) {
- // fontData.setStyle(SWT.BOLD);
- // // fontData.setHeight(fontData.getHeight() + 2);
- // }
- // elementName.setFont(new Font(elementName.getDisplay(), fontDatas));
+ // Label elementName = new Label(fields, SWT.NONE);
+ // elementName.setText(contextElement.getName());
+ // FontData[] fontDatas = elementName.getFont().getFontData();
+ // for(FontData fontData : fontDatas) {
+ // fontData.setStyle(SWT.BOLD);
+ // // fontData.setHeight(fontData.getHeight() + 2);
+ // }
+ // elementName.setFont(new Font(elementName.getDisplay(), fontDatas));
//
- // data = new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1);
- // elementName.setLayoutData(data);
+ // data = new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1);
+ // elementName.setLayoutData(data);
//
- // Label separator2 = new Label(fields, SWT.SEPARATOR | SWT.HORIZONTAL);
- // data = new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1);
- // separator2.setLayoutData(data);
+ // Label separator2 = new Label(fields, SWT.SEPARATOR | SWT.HORIZONTAL);
+ // data = new GridData(SWT.FILL, SWT.CENTER, true, false, 4, 1);
+ // separator2.setLayoutData(data);
//
- // for(Property property : contextElement.getProperties()) {
- // Label label = new Label(fields, SWT.NONE);
- // label.setText(property.getName());
+ // for(Property property : contextElement.getProperties()) {
+ // Label label = new Label(fields, SWT.NONE);
+ // label.setText(property.getName());
//
- // TernaryButton showSingle = new TernaryButton(fields, getGenerator().isSelectedSingle(property));
- // TernaryButton showMultiple = new TernaryButton(fields, getGenerator().isSelectedMultiple(property));
+ // TernaryButton showSingle = new TernaryButton(fields, getGenerator().isSelectedSingle(property));
+ // TernaryButton showMultiple = new TernaryButton(fields, getGenerator().isSelectedMultiple(property));
//
- // PropertyDefinition propertyDefinition = getWizard().getPropertyDefinition(fieldSelection, property);
+ // PropertyDefinition propertyDefinition = getWizard().getPropertyDefinition(fieldSelection, property);
//
- // IObservableValue singleValue = EMFProperties.value(FieldSelectionPackage.eINSTANCE.getPropertyDefinition_ValueSingle()).observe(propertyDefinition);
- // IObservableValue multipleValue = EMFProperties.value(FieldSelectionPackage.eINSTANCE.getPropertyDefinition_ValueMultiple()).observe(propertyDefinition);
+ // IObservableValue singleValue = EMFProperties.value(FieldSelectionPackage.eINSTANCE.getPropertyDefinition_ValueSingle()).observe(propertyDefinition);
+ // IObservableValue multipleValue = EMFProperties.value(FieldSelectionPackage.eINSTANCE.getPropertyDefinition_ValueMultiple()).observe(propertyDefinition);
//
- // showSingle.setObservable(singleValue);
- // showMultiple.setObservable(multipleValue);
+ // showSingle.setObservable(singleValue);
+ // showMultiple.setObservable(multipleValue);
//
- // Label description = new Label(fields, SWT.WRAP);
+ // Label description = new Label(fields, SWT.WRAP);
// String propertyDescription = "";// property.getTooltipText(); //$NON-NLS-1$
// if(propertyDescription == null || propertyDescription.trim().equals("")) { //$NON-NLS-1$
- // propertyDescription = Messages.SelectFieldsPage_descriptionNotAvailable;
- // description.setAlignment(SWT.CENTER);
- // }
- // description.setText(propertyDescription);
+ // propertyDescription = Messages.SelectFieldsPage_descriptionNotAvailable;
+ // description.setAlignment(SWT.CENTER);
+ // }
+ // description.setText(propertyDescription);
//
- // data = new GridData(SWT.FILL, SWT.CENTER, true, false);
- // label.setLayoutData(data);
- // data = new GridData(SWT.FILL, SWT.CENTER, true, false);
- // showSingle.setLayoutData(data);
- // data = new GridData(SWT.FILL, SWT.CENTER, true, false);
- // showMultiple.setLayoutData(data);
- // data = new GridData(SWT.CENTER, SWT.CENTER, true, false);
- // data.widthHint = 500;
- // description.setLayoutData(data);
- // }
- // }
+ // data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ // label.setLayoutData(data);
+ // data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ // showSingle.setLayoutData(data);
+ // data = new GridData(SWT.FILL, SWT.CENTER, true, false);
+ // showMultiple.setLayoutData(data);
+ // data = new GridData(SWT.CENTER, SWT.CENTER, true, false);
+ // data.widthHint = 500;
+ // description.setLayoutData(data);
+ // }
+ // }
//
- // if(contextElement instanceof DataContextPackage) {
- // DataContextPackage contextPackage = (DataContextPackage)contextElement;
- // for(DataContextElement element : contextPackage.getElements()) {
- // displayFields(element, treeViewer);
- // }
- // }
+ // if(contextElement instanceof DataContextPackage) {
+ // DataContextPackage contextPackage = (DataContextPackage)contextElement;
+ // for(DataContextElement element : contextPackage.getElements()) {
+ // displayFields(element, treeViewer);
+ // }
+ // }
}
private IGenerator getGenerator() {
@@ -308,9 +308,9 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
/**
* Sets the URI of the generated context
- *
+ *
* @param uri
- * The URI of the generated context
+ * The URI of the generated context
*/
public void setTargetURI(List<URI> uri) {
this.targetURI = uri;
@@ -320,7 +320,7 @@ public class SelectFieldsPage extends AbstractCreateContextPage {
public void setVisible(boolean visible) {
super.setPageComplete(true);
super.setVisible(visible);
- if(contexts == null && visible) {
+ if (contexts == null && visible) {
setContexts(getWizard().generator.generate(targetURI));
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java
index 076ee40edf9..3ad07dde918 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/SelectOutputPage.java
@@ -84,13 +84,13 @@ public class SelectOutputPage extends AbstractCreateContextPage implements Liste
@Override
public String getText(Object element) {
- if(element instanceof EPackage) {
- EPackage p = (EPackage)element;
+ if (element instanceof EPackage) {
+ EPackage p = (EPackage) element;
return "Ecore package Name : " + p.getName(); //$NON-NLS-1$
}
- if(element instanceof Package) {
- Package p = (Package)element;
+ if (element instanceof Package) {
+ Package p = (Package) element;
return "Profile name : " + p.getName(); //$NON-NLS-1$
}
return null;
@@ -110,7 +110,7 @@ public class SelectOutputPage extends AbstractCreateContextPage implements Liste
public void handleEvent(Event event) {
- if(combo.getSelectionIndex() != 0) {
+ if (combo.getSelectionIndex() != 0) {
table.setVisible(true);
} else {
@@ -129,7 +129,7 @@ public class SelectOutputPage extends AbstractCreateContextPage implements Liste
public void setVisible(boolean visible) {
super.setVisible(visible);
- if(visible) {
+ if (visible) {
setSelectorData();
}
}
@@ -145,14 +145,14 @@ public class SelectOutputPage extends AbstractCreateContextPage implements Liste
public List<URI> getListPackage(int selection) {
List<URI> list = new ArrayList<URI>();
- if(selection == 0) {
+ if (selection == 0) {
list.add(getWizard().generatorPage.oldURI);
} else {
- for(Object o : viewer.getCheckedElements()) {
- if(o instanceof EPackage) {
- EPackage p = (EPackage)o;
- if(selection == 1) {
+ for (Object o : viewer.getCheckedElements()) {
+ if (o instanceof EPackage) {
+ EPackage p = (EPackage) o;
+ if (selection == 1) {
list.add(getWizard().generatorPage.oldURI);
} else {
String temp = getWizard().generatorPage.oldURI.toString();
@@ -162,9 +162,9 @@ public class SelectOutputPage extends AbstractCreateContextPage implements Liste
}
getWizard().generator.addCheckElement(o);
}
- if(o instanceof Package) {
- Package p = (Package)o;
- if(selection == 1) {
+ if (o instanceof Package) {
+ Package p = (Package) o;
+ if (selection == 1) {
list.add(getWizard().generatorPage.oldURI);
} else {
String temp = getWizard().generatorPage.oldURI.toString();
@@ -183,8 +183,8 @@ public class SelectOutputPage extends AbstractCreateContextPage implements Liste
@Override
public boolean canFlipToNextPage() {
- if(combo.getSelectionIndex() != 0) {
- if(viewer.getCheckedElements().length == 0) {
+ if (combo.getSelectionIndex() != 0) {
+ if (viewer.getCheckedElements().length == 0) {
return false;
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/ExtensionFilter.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/ExtensionFilter.java
index 6ae0b5cb716..e1fe42399ef 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/ExtensionFilter.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/ExtensionFilter.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -23,7 +23,7 @@ import org.eclipse.jface.viewers.ViewerFilter;
/**
* A filter for file extensions
- *
+ *
* @author Camille Letavernier
*/
public class ExtensionFilter extends ViewerFilter {
@@ -31,12 +31,12 @@ public class ExtensionFilter extends ViewerFilter {
private Set<String> extensions;
/**
- *
+ *
* Constructs a ViewerFilter that will only accept filenames with one of the
* given extensions
- *
+ *
* @param extensions
- * The authorized extensions
+ * The authorized extensions
*/
public ExtensionFilter(String[] extensions) {
this.extensions = new HashSet<String>(Arrays.asList(extensions));
@@ -44,14 +44,14 @@ public class ExtensionFilter extends ViewerFilter {
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(element instanceof IFile) {
- IFile file = (IFile)element;
- for(String ext : extensions) {
- if(file.getFullPath().toString().endsWith(ext)) {
+ if (element instanceof IFile) {
+ IFile file = (IFile) element;
+ for (String ext : extensions) {
+ if (file.getFullPath().toString().endsWith(ext)) {
return true;
}
}
- } else if(element instanceof IProject || element instanceof IFolder) {
+ } else if (element instanceof IProject || element instanceof IFolder) {
return true;
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java
index 6fab3c41fe9..04cdd1414af 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/FileChooser.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -36,7 +36,7 @@ import org.eclipse.swt.widgets.Text;
/**
* A Widget for selecting or creating a file in the workspace
- *
+ *
* @author Camille Letavernier
*/
public class FileChooser extends Composite implements SelectionListener, Listener {
@@ -55,12 +55,12 @@ public class FileChooser extends Composite implements SelectionListener, Listene
/**
* Constructs a new FileChooser in the given Composite
- *
+ *
* @param parent
- * The composite in which the FileChooser is created
+ * The composite in which the FileChooser is created
* @param newFile
- * True if the fileChooser allows the user to create a new file,
- * false if he should select an existing one
+ * True if the fileChooser allows the user to create a new file,
+ * false if he should select an existing one
*/
public FileChooser(Composite parent, boolean newFile) {
super(parent, SWT.NONE);
@@ -83,11 +83,11 @@ public class FileChooser extends Composite implements SelectionListener, Listene
* @return the selected file path
*/
public String getFilePath() {
- if(text.isDisposed()) {
+ if (text.isDisposed()) {
return null;
}
String path = text.getText();
- if(path.trim().equals("")) { //$NON-NLS-1$
+ if (path.trim().equals("")) { //$NON-NLS-1$
return null;
}
return path.trim();
@@ -96,7 +96,7 @@ public class FileChooser extends Composite implements SelectionListener, Listene
/**
* Sets the file extensions that this FileChooser accepts
* Files that don't match one of these extensions will be hidden
- *
+ *
* @param extensions
*/
public void setFilterExtensions(String[] extensions) {
@@ -112,7 +112,7 @@ public class FileChooser extends Composite implements SelectionListener, Listene
/**
* Add a listener to this widget. The listener will be notified when the user
* choose a new file
- *
+ *
* @param listener
*/
public void addListener(Listener listener) {
@@ -122,16 +122,16 @@ public class FileChooser extends Composite implements SelectionListener, Listene
public void widgetSelected(SelectionEvent e) {
IFile[] result = new IFile[0];
- if(newFile) {
+ if (newFile) {
IFile file = WorkspaceResourceDialog.openNewFile(getShell(), null, null, null, filters);
- if(file != null) {
- result = new IFile[]{ file };
+ if (file != null) {
+ result = new IFile[] { file };
}
} else {
- result = WorkspaceResourceDialog.openFileSelection(getShell(), null, null, false, new Object[]{ currentFile }, filters);
+ result = WorkspaceResourceDialog.openFileSelection(getShell(), null, null, false, new Object[] { currentFile }, filters);
}
- if(result.length >= 1) {
+ if (result.length >= 1) {
currentFile = result[0];
text.setText(currentFile.getFullPath().toString());
notifyChange();
@@ -139,22 +139,22 @@ public class FileChooser extends Composite implements SelectionListener, Listene
}
private void notifyChange() {
- for(Listener listener : listeners) {
+ for (Listener listener : listeners) {
listener.handleEvent(null);
}
}
public void widgetDefaultSelected(SelectionEvent e) {
- //Nothing
+ // Nothing
}
-
- public IObservableValue getObservableValue(){
- IWidgetValueProperty prop = WidgetProperties.text(SWT.Modify);
- return prop.observeDelayed(600, text);
+
+ public IObservableValue getObservableValue() {
+ IWidgetValueProperty prop = WidgetProperties.text(SWT.Modify);
+ return prop.observeDelayed(600, text);
}
- public void setText(String s){
+ public void setText(String s) {
text.setText(s);
-
+
}
}
diff --git a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/TernaryButton.java b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/TernaryButton.java
index dc76fb2fb60..f6613aaa6e5 100644
--- a/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/TernaryButton.java
+++ b/plugins/customization/org.eclipse.papyrus.customization.properties.generation/src/org/eclipse/papyrus/customization/properties/generation/wizard/widget/TernaryButton.java
@@ -1,6 +1,6 @@
/*****************************************************************************
* Copyright (c) 2010 CEA LIST.
- *
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -26,11 +26,11 @@ import org.eclipse.swt.widgets.Composite;
* A 3-choices button. The three possible values are "True", "False" or "Default".
* When the choice is "Default", it can be either "Default (True)" or "Default (False)",
* depending on the default value assignated to the button.
- *
+ *
* @see State
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public class TernaryButton extends Composite implements SelectionListener {
@@ -43,13 +43,13 @@ public class TernaryButton extends Composite implements SelectionListener {
private IObservableValue observable;
/**
- *
+ *
* Constructor.
- *
+ *
* @param parent
- * The parent in which the button is created
+ * The parent in which the button is created
* @param defaultValue
- * The value returned when the "default" value is selected
+ * The value returned when the "default" value is selected
*/
public TernaryButton(Composite parent, boolean defaultValue) {
super(parent, SWT.NONE);
@@ -61,7 +61,7 @@ public class TernaryButton extends Composite implements SelectionListener {
}
public void widgetSelected(SelectionEvent e) {
- switch(state) {
+ switch (state) {
case DEFAULT:
setState(State.TRUE);
break;
@@ -80,9 +80,9 @@ public class TernaryButton extends Composite implements SelectionListener {
* Sets the ObservableValue binded to this widget. The databinding
* is only one-way : modifications on the Observable value won't be
* reflected on the widget.
- *
+ *
* @param value
- * The Observable value to link to this widget
+ * The Observable value to link to this widget
*/
public void setObservable(IObservableValue value) {
this.observable = value;
@@ -90,9 +90,9 @@ public class TernaryButton extends Composite implements SelectionListener {
/**
* Change this button's value
- *
+ *
* @param state
- * The new button's state
+ * The new button's state
*/
public void setState(State state) {
this.state = state;
@@ -116,15 +116,15 @@ public class TernaryButton extends Composite implements SelectionListener {
}
public void widgetDefaultSelected(SelectionEvent e) {
- //Nothing
+ // Nothing
}
/**
* An enum representing the three possible states of the button :
* DEFAULT, TRUE, FALSE
- *
+ *
* @author Camille Letavernier
- *
+ *
*/
public enum State {
/**
@@ -143,12 +143,12 @@ public class TernaryButton extends Composite implements SelectionListener {
/**
* @param defaultValue
- * The value to return if the state is "Default"
+ * The value to return if the state is "Default"
* @return the boolean value of this button. If the State is Default, then
* the default value will be returned.
*/
public boolean getValue(boolean defaultValue) {
- switch(this) {
+ switch (this) {
case DEFAULT:
return defaultValue;
case TRUE:
@@ -157,23 +157,23 @@ public class TernaryButton extends Composite implements SelectionListener {
return false;
}
- //Cannot happen as the switch is exhaustive
+ // Cannot happen as the switch is exhaustive
throw new RuntimeException();
}
/**
* Return the image corresponding to the current state. If the state
* is "Default", the image will depend on the given defaultValue
- *
+ *
* @param defaultValue
- * The value to use if the State is "Default"
+ * The value to use if the State is "Default"
* @return
* The image corresponding to the current State
*/
public Image getImage(boolean defaultValue) {
- switch(this) {
+ switch (this) {
case DEFAULT:
- if(defaultValue) {
+ if (defaultValue) {
return Activator.getDefault().getImage("/icons/default_true.gif"); //$NON-NLS-1$
} else {
return Activator.getDefault().getImage("/icons/default_false.gif"); //$NON-NLS-1$
@@ -184,23 +184,23 @@ public class TernaryButton extends Composite implements SelectionListener {
return Activator.getDefault().getImage("/icons/false.gif"); //$NON-NLS-1$
}
- //Cannot happen as the switch is exhaustive
+ // Cannot happen as the switch is exhaustive
throw new RuntimeException();
}
/**
* Return the text corresponding to the current state. If the state
* is "Default", the text will depend on the given defaultValue
- *
+ *
* @param defaultValue
- * The value to use if the State is "Default"
+ * The value to use if the State is "Default"
* @return
* The text corresponding to the current State
*/
public String getText(boolean defaultValue) {
- switch(this) {
+ switch (this) {
case DEFAULT:
- if(defaultValue) {
+ if (defaultValue) {
return Messages.TernaryButton_defaultTrue;
} else {
return Messages.TernaryButton_defaultFalse;
@@ -211,7 +211,7 @@ public class TernaryButton extends Composite implements SelectionListener {
return Messages.TernaryButton_false;
}
- //Cannot happen as the switch is exhaustive
+ // Cannot happen as the switch is exhaustive
throw new RuntimeException();
}
}

Back to the top