Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-08-21 11:37:18 +0000
committerCamille Letavernier2014-08-21 11:37:18 +0000
commitea48a20561464c3cbb7895d430583669a9f82fcc (patch)
tree0fdf9eebacbbb301b13bafce3ca4a6952ff6e91c /extraplugins/diagramtemplate
parentf91b71175fd97557cf378cdcad845a44a6274b16 (diff)
downloadorg.eclipse.papyrus-ea48a20561464c3cbb7895d430583669a9f82fcc.tar.gz
org.eclipse.papyrus-ea48a20561464c3cbb7895d430583669a9f82fcc.tar.xz
org.eclipse.papyrus-ea48a20561464c3cbb7895d430583669a9f82fcc.zip
[Code style] Apply clean-up and formatter on Extra plug-ins
Diffstat (limited to 'extraplugins/diagramtemplate')
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/AbstractSelectionItemProvider.java115
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramDefinitionItemProvider.java197
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateEditPlugin.java13
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateItemProviderAdapterFactory.java42
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionItemProvider.java48
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionRefItemProvider.java42
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/TemplateItemProvider.java52
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/ResourceManager.java77
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/SWTResourceManager.java73
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateActionBarContributor.java98
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java390
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditorPlugin.java20
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateModelWizard.java488
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionContentProvider.java10
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java20
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java24
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ElementsAvailableContentProvider.java10
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForContentProvider.java20
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForLabelProvider.java62
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java22
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesContentProvider.java10
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/WhatContentProvider.java26
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java328
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncherReport.java27
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/AbstractSelection.java46
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramDefinition.java66
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplateFactory.java9
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplatePackage.java106
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Selection.java10
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionKind.java58
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionRef.java10
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Template.java16
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/AbstractSelectionImpl.java169
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramDefinitionImpl.java227
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplateFactoryImpl.java59
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplatePackageImpl.java129
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionImpl.java42
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionRefImpl.java46
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/TemplateImpl.java77
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateAdapterFactory.java78
-rw-r--r--extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateSwitch.java109
41 files changed, 1992 insertions, 1479 deletions
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/AbstractSelectionItemProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/AbstractSelectionItemProvider.java
index 70106e71305..3e6112a7dba 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/AbstractSelectionItemProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/AbstractSelectionItemProvider.java
@@ -33,11 +33,12 @@ import org.eclipse.papyrus.diagramtemplate.SelectionKind;
* This is the item provider adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.AbstractSelection} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class AbstractSelectionItemProvider
- extends ItemProviderAdapter
- implements
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -47,6 +48,7 @@ public class AbstractSelectionItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public AbstractSelectionItemProvider(AdapterFactory adapterFactory) {
@@ -57,6 +59,7 @@ public class AbstractSelectionItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -75,74 +78,77 @@ public class AbstractSelectionItemProvider
* This adds a property descriptor for the Element feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AbstractSelection_element_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractSelection_element_feature", "_UI_AbstractSelection_type"),
- DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__ELEMENT,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AbstractSelection_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractSelection_element_feature", "_UI_AbstractSelection_type"),
+ DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Kind feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addKindPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AbstractSelection_kind_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractSelection_kind_feature", "_UI_AbstractSelection_type"),
- DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__KIND,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AbstractSelection_kind_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractSelection_kind_feature", "_UI_AbstractSelection_type"),
+ DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__KIND,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Sub Types feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addSubTypesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_AbstractSelection_subTypes_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_AbstractSelection_subTypes_feature", "_UI_AbstractSelection_type"),
- DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__SUB_TYPES,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AbstractSelection_subTypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AbstractSelection_subTypes_feature", "_UI_AbstractSelection_type"),
+ DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__SUB_TYPES,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -157,6 +163,7 @@ public class AbstractSelectionItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -171,15 +178,16 @@ public class AbstractSelectionItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String getText(Object object) {
- SelectionKind labelValue = ((AbstractSelection)object).getKind();
+ SelectionKind labelValue = ((AbstractSelection) object).getKind();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
- getString("_UI_AbstractSelection_type") :
- getString("_UI_AbstractSelection_type") + " " + label;
+ getString("_UI_AbstractSelection_type") :
+ getString("_UI_AbstractSelection_type") + " " + label;
}
/**
@@ -187,6 +195,7 @@ public class AbstractSelectionItemProvider
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -194,13 +203,13 @@ public class AbstractSelectionItemProvider
updateChildren(notification);
switch (notification.getFeatureID(AbstractSelection.class)) {
- case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -210,6 +219,7 @@ public class AbstractSelectionItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -217,15 +227,16 @@ public class AbstractSelectionItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(DiagramTemplatePackage.Literals.ABSTRACT_SELECTION__SELECTION_REF,
- DiagramTemplateFactory.eINSTANCE.createSelectionRef()));
+ DiagramTemplateFactory.eINSTANCE.createSelectionRef()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramDefinitionItemProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramDefinitionItemProvider.java
index 8676e5ab2ca..0cc4709ae47 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramDefinitionItemProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramDefinitionItemProvider.java
@@ -32,11 +32,12 @@ import org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage;
* This is the item provider adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.DiagramDefinition} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class DiagramDefinitionItemProvider
- extends ItemProviderAdapter
- implements
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -46,6 +47,7 @@ public class DiagramDefinitionItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramDefinitionItemProvider(AdapterFactory adapterFactory) {
@@ -56,6 +58,7 @@ public class DiagramDefinitionItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -77,140 +80,146 @@ public class DiagramDefinitionItemProvider
* This adds a property descriptor for the Description feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addDescriptionPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DiagramDefinition_description_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_description_feature", "_UI_DiagramDefinition_type"),
- DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__DESCRIPTION,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DiagramDefinition_description_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_description_feature", "_UI_DiagramDefinition_type"),
+ DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__DESCRIPTION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the From Root feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addFromRootPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DiagramDefinition_fromRoot_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_fromRoot_feature", "_UI_DiagramDefinition_type"),
- DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__FROM_ROOT,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DiagramDefinition_fromRoot_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_fromRoot_feature", "_UI_DiagramDefinition_type"),
+ DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__FROM_ROOT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Diagram Kind feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addDiagramKindPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DiagramDefinition_diagramKind_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_diagramKind_feature", "_UI_DiagramDefinition_type"),
- DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__DIAGRAM_KIND,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DiagramDefinition_diagramKind_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_diagramKind_feature", "_UI_DiagramDefinition_type"),
+ DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__DIAGRAM_KIND,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Layout To Apply feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addLayoutToApplyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DiagramDefinition_layoutToApply_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_layoutToApply_feature", "_UI_DiagramDefinition_type"),
- DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DiagramDefinition_layoutToApply_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_layoutToApply_feature", "_UI_DiagramDefinition_type"),
+ DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Name feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DiagramDefinition_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_name_feature", "_UI_DiagramDefinition_type"),
- DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DiagramDefinition_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_name_feature", "_UI_DiagramDefinition_type"),
+ DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This adds a property descriptor for the Prefix feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addPrefixPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DiagramDefinition_prefix_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_prefix_feature", "_UI_DiagramDefinition_type"),
- DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__PREFIX,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DiagramDefinition_prefix_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DiagramDefinition_prefix_feature", "_UI_DiagramDefinition_type"),
+ DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__PREFIX,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -225,6 +234,7 @@ public class DiagramDefinitionItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -239,6 +249,7 @@ public class DiagramDefinitionItemProvider
* This returns DiagramDefinition.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -250,14 +261,15 @@ public class DiagramDefinitionItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String getText(Object object) {
- String label = ((DiagramDefinition)object).getName();
+ String label = ((DiagramDefinition) object).getName();
return label == null || label.length() == 0 ?
- getString("_UI_DiagramDefinition_type") :
- getString("_UI_DiagramDefinition_type") + " " + label;
+ getString("_UI_DiagramDefinition_type") :
+ getString("_UI_DiagramDefinition_type") + " " + label;
}
/**
@@ -265,6 +277,7 @@ public class DiagramDefinitionItemProvider
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -272,16 +285,16 @@ public class DiagramDefinitionItemProvider
updateChildren(notification);
switch (notification.getFeatureID(DiagramDefinition.class)) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -291,6 +304,7 @@ public class DiagramDefinitionItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -298,15 +312,16 @@ public class DiagramDefinitionItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(DiagramTemplatePackage.Literals.DIAGRAM_DEFINITION__SELECTION,
- DiagramTemplateFactory.eINSTANCE.createSelection()));
+ DiagramTemplateFactory.eINSTANCE.createSelection()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateEditPlugin.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateEditPlugin.java
index 0bb6c166afa..e9f00a78c11 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateEditPlugin.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateEditPlugin.java
@@ -13,6 +13,7 @@ import org.eclipse.emf.common.util.ResourceLocator;
* This is the central singleton for the DiagramTemplate edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public final class DiagramTemplateEditPlugin extends EMFPlugin {
@@ -20,6 +21,7 @@ public final class DiagramTemplateEditPlugin extends EMFPlugin {
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static final DiagramTemplateEditPlugin INSTANCE = new DiagramTemplateEditPlugin();
@@ -28,6 +30,7 @@ public final class DiagramTemplateEditPlugin extends EMFPlugin {
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static Implementation plugin;
@@ -36,18 +39,19 @@ public final class DiagramTemplateEditPlugin extends EMFPlugin {
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplateEditPlugin() {
- super
- (new ResourceLocator [] {
- });
+ super(new ResourceLocator[] {
+ });
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the singleton instance.
* @generated
*/
@@ -60,6 +64,7 @@ public final class DiagramTemplateEditPlugin extends EMFPlugin {
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the singleton instance.
* @generated
*/
@@ -71,6 +76,7 @@ public final class DiagramTemplateEditPlugin extends EMFPlugin {
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static class Implementation extends EclipsePlugin {
@@ -78,6 +84,7 @@ public final class DiagramTemplateEditPlugin extends EMFPlugin {
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public Implementation() {
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateItemProviderAdapterFactory.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateItemProviderAdapterFactory.java
index ff088c0c889..d5811d551d4 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateItemProviderAdapterFactory.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/DiagramTemplateItemProviderAdapterFactory.java
@@ -32,6 +32,7 @@ import org.eclipse.papyrus.diagramtemplate.util.DiagramTemplateAdapterFactory;
* Note that most of the adapters are shared among multiple instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
@@ -39,6 +40,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected ComposedAdapterFactory parentAdapterFactory;
@@ -47,6 +49,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected IChangeNotifier changeNotifier = new ChangeNotifier();
@@ -55,6 +58,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected Collection<Object> supportedTypes = new ArrayList<Object>();
@@ -63,6 +67,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This constructs an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplateItemProviderAdapterFactory() {
@@ -77,6 +82,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.DiagramDefinition} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected DiagramDefinitionItemProvider diagramDefinitionItemProvider;
@@ -85,6 +91,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This creates an adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.DiagramDefinition}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -100,6 +107,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.Selection} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected SelectionItemProvider selectionItemProvider;
@@ -108,6 +116,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This creates an adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.Selection}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -123,6 +132,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.SelectionRef} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected SelectionRefItemProvider selectionRefItemProvider;
@@ -131,6 +141,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This creates an adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.SelectionRef}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -146,6 +157,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This keeps track of the one adapter used for all {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.Template} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TemplateItemProvider templateItemProvider;
@@ -154,6 +166,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This creates an adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.Template}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -169,6 +182,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public ComposeableAdapterFactory getRootAdapterFactory() {
@@ -179,6 +193,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This sets the composed adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
@@ -188,6 +203,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -199,6 +215,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This implementation substitutes the factory itself as the key for the adapter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -209,13 +226,14 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object adapt(Object object, Object type) {
if (isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
return adapter;
}
}
@@ -227,6 +245,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This adds a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void addListener(INotifyChangedListener notifyChangedListener) {
@@ -237,6 +256,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void removeListener(INotifyChangedListener notifyChangedListener) {
@@ -247,6 +267,7 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
* This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void fireNotifyChanged(Notification notification) {
@@ -258,16 +279,25 @@ public class DiagramTemplateItemProviderAdapterFactory extends DiagramTemplateAd
}
/**
- * This disposes all of the item providers created by this factory.
+ * This disposes all of the item providers created by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void dispose() {
- if (diagramDefinitionItemProvider != null) diagramDefinitionItemProvider.dispose();
- if (selectionItemProvider != null) selectionItemProvider.dispose();
- if (selectionRefItemProvider != null) selectionRefItemProvider.dispose();
- if (templateItemProvider != null) templateItemProvider.dispose();
+ if (diagramDefinitionItemProvider != null) {
+ diagramDefinitionItemProvider.dispose();
+ }
+ if (selectionItemProvider != null) {
+ selectionItemProvider.dispose();
+ }
+ if (selectionRefItemProvider != null) {
+ selectionRefItemProvider.dispose();
+ }
+ if (templateItemProvider != null) {
+ templateItemProvider.dispose();
+ }
}
}
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionItemProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionItemProvider.java
index b535187eccc..9675fd9b2d3 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionItemProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionItemProvider.java
@@ -29,11 +29,12 @@ import org.eclipse.papyrus.diagramtemplate.SelectionKind;
* This is the item provider adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.Selection} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class SelectionItemProvider
- extends AbstractSelectionItemProvider
- implements
+ extends AbstractSelectionItemProvider
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -43,6 +44,7 @@ public class SelectionItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public SelectionItemProvider(AdapterFactory adapterFactory) {
@@ -53,6 +55,7 @@ public class SelectionItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -69,28 +72,30 @@ public class SelectionItemProvider
* This adds a property descriptor for the Recursively feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addRecursivelyPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Selection_recursively_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Selection_recursively_feature", "_UI_Selection_type"),
- DiagramTemplatePackage.Literals.SELECTION__RECURSIVELY,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Selection_recursively_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Selection_recursively_feature", "_UI_Selection_type"),
+ DiagramTemplatePackage.Literals.SELECTION__RECURSIVELY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
}
/**
* This returns Selection.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -102,15 +107,16 @@ public class SelectionItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String getText(Object object) {
- SelectionKind labelValue = ((Selection)object).getKind();
+ SelectionKind labelValue = ((Selection) object).getKind();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
- getString("_UI_Selection_type") :
- getString("_UI_Selection_type") + " " + label;
+ getString("_UI_Selection_type") :
+ getString("_UI_Selection_type") + " " + label;
}
/**
@@ -118,6 +124,7 @@ public class SelectionItemProvider
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -125,9 +132,9 @@ public class SelectionItemProvider
updateChildren(notification);
switch (notification.getFeatureID(Selection.class)) {
- case DiagramTemplatePackage.SELECTION__RECURSIVELY:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case DiagramTemplatePackage.SELECTION__RECURSIVELY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
@@ -137,6 +144,7 @@ public class SelectionItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionRefItemProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionRefItemProvider.java
index 8003fea0ae8..5d3a4687c49 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionRefItemProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/SelectionRefItemProvider.java
@@ -27,11 +27,12 @@ import org.eclipse.papyrus.diagramtemplate.SelectionRef;
* This is the item provider adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.SelectionRef} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class SelectionRefItemProvider
- extends AbstractSelectionItemProvider
- implements
+ extends AbstractSelectionItemProvider
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -41,6 +42,7 @@ public class SelectionRefItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public SelectionRefItemProvider(AdapterFactory adapterFactory) {
@@ -51,6 +53,7 @@ public class SelectionRefItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -67,28 +70,30 @@ public class SelectionRefItemProvider
* This adds a property descriptor for the EReference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addEReferencePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_SelectionRef_eReference_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_SelectionRef_eReference_feature", "_UI_SelectionRef_type"),
- DiagramTemplatePackage.Literals.SELECTION_REF__EREFERENCE,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_SelectionRef_eReference_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_SelectionRef_eReference_feature", "_UI_SelectionRef_type"),
+ DiagramTemplatePackage.Literals.SELECTION_REF__EREFERENCE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
* This returns SelectionRef.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -100,15 +105,16 @@ public class SelectionRefItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String getText(Object object) {
- SelectionKind labelValue = ((SelectionRef)object).getKind();
+ SelectionKind labelValue = ((SelectionRef) object).getKind();
String label = labelValue == null ? null : labelValue.toString();
return label == null || label.length() == 0 ?
- getString("_UI_SelectionRef_type") :
- getString("_UI_SelectionRef_type") + " " + label;
+ getString("_UI_SelectionRef_type") :
+ getString("_UI_SelectionRef_type") + " " + label;
}
/**
@@ -116,6 +122,7 @@ public class SelectionRefItemProvider
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -129,6 +136,7 @@ public class SelectionRefItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/TemplateItemProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/TemplateItemProvider.java
index 1f7a15729f3..75c4001add5 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/TemplateItemProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit/src/org/eclipse/papyrus/diagramtemplate/provider/TemplateItemProvider.java
@@ -31,11 +31,12 @@ import org.eclipse.papyrus.diagramtemplate.Template;
* This is the item provider adapter for a {@link org.eclipse.papyrus.diagramtemplate.diagramtemplate.Template} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public class TemplateItemProvider
- extends ItemProviderAdapter
- implements
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -45,6 +46,7 @@ public class TemplateItemProvider
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public TemplateItemProvider(AdapterFactory adapterFactory) {
@@ -55,6 +57,7 @@ public class TemplateItemProvider
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -71,30 +74,31 @@ public class TemplateItemProvider
* This adds a property descriptor for the Target Root feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected void addTargetRootPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Template_targetRoot_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Template_targetRoot_feature", "_UI_Template_type"),
- DiagramTemplatePackage.Literals.TEMPLATE__TARGET_ROOT,
- true,
- false,
- true,
- null,
- null,
- null));
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Template_targetRoot_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Template_targetRoot_feature", "_UI_Template_type"),
+ DiagramTemplatePackage.Literals.TEMPLATE__TARGET_ROOT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
- * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
- * {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
+ * This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -109,6 +113,7 @@ public class TemplateItemProvider
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -123,6 +128,7 @@ public class TemplateItemProvider
* This returns Template.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -134,6 +140,7 @@ public class TemplateItemProvider
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -146,6 +153,7 @@ public class TemplateItemProvider
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -153,9 +161,9 @@ public class TemplateItemProvider
updateChildren(notification);
switch (notification.getFeatureID(Template.class)) {
- case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -165,6 +173,7 @@ public class TemplateItemProvider
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -172,15 +181,16 @@ public class TemplateItemProvider
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
- (createChildParameter
+ (createChildParameter
(DiagramTemplatePackage.Literals.TEMPLATE__DIAGRAM_DEFINITIONS,
- DiagramTemplateFactory.eINSTANCE.createDiagramDefinition()));
+ DiagramTemplateFactory.eINSTANCE.createDiagramDefinition()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/ResourceManager.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/ResourceManager.java
index 1f509369c90..2fe943912ae 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/ResourceManager.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/ResourceManager.java
@@ -21,30 +21,31 @@ import org.osgi.framework.Bundle;
/**
* Utility class for managing OS resources associated with SWT/JFace controls such as colors, fonts, images,
* etc.
- *
+ *
* !!! IMPORTANT !!! Application code must explicitly invoke the <code>dispose()</code> method to release the
* operating system resources managed by cached objects when those objects and OS resources are no longer
* needed (e.g. on application shutdown)
- *
+ *
* This class may be freely distributed as part of any application or plugin.
* <p>
* Copyright (c) 2003 - 2007, Instantiations, Inc. <br>
* All Rights Reserved
- *
+ *
* @author scheglov_ke
* @author Dan Rubel
*/
public class ResourceManager extends SWTResourceManager {
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
//
// Image
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
private static Map<ImageDescriptor, Image> m_descriptorImageMap = new HashMap<ImageDescriptor, Image>();
+
/**
* Returns an {@link ImageDescriptor} stored in the file at the specified path relative to the specified
* class.
- *
+ *
* @param clazz
* the {@link Class} relative to which to find the image descriptor.
* @param path
@@ -54,9 +55,10 @@ public class ResourceManager extends SWTResourceManager {
public static ImageDescriptor getImageDescriptor(Class<?> clazz, String path) {
return ImageDescriptor.createFromFile(clazz, path);
}
+
/**
* Returns an {@link ImageDescriptor} stored in the file at the specified path.
- *
+ *
* @param path
* the path to the image file.
* @return the {@link ImageDescriptor} stored in the file at the specified path.
@@ -68,9 +70,10 @@ public class ResourceManager extends SWTResourceManager {
return null;
}
}
+
/**
* Returns an {@link Image} based on the specified {@link ImageDescriptor}.
- *
+ *
* @param descriptor
* the {@link ImageDescriptor} for the {@link Image}.
* @return the {@link Image} based on the specified {@link ImageDescriptor}.
@@ -86,14 +89,16 @@ public class ResourceManager extends SWTResourceManager {
}
return image;
}
+
/**
* Maps images to decorated images.
*/
@SuppressWarnings("unchecked")
private static Map<Image, Map<Image, Image>>[] m_decoratedImageMap = new Map[LAST_CORNER_KEY];
+
/**
* Returns an {@link Image} composed of a base image decorated by another image.
- *
+ *
* @param baseImage
* the base {@link Image} that should be decorated.
* @param decorator
@@ -103,9 +108,10 @@ public class ResourceManager extends SWTResourceManager {
public static Image decorateImage(Image baseImage, Image decorator) {
return decorateImage(baseImage, decorator, BOTTOM_RIGHT);
}
+
/**
* Returns an {@link Image} composed of a base image decorated by another image.
- *
+ *
* @param baseImage
* the base {@link Image} that should be decorated.
* @param decorator
@@ -148,6 +154,7 @@ public class ResourceManager extends SWTResourceManager {
drawImage(decorator.getImageData(), bib.width - dib.width, bib.height - dib.height);
}
}
+
@Override
protected Point getSize() {
return baseImageSize;
@@ -159,6 +166,7 @@ public class ResourceManager extends SWTResourceManager {
}
return result;
}
+
/**
* Dispose all of the cached images.
*/
@@ -192,34 +200,38 @@ public class ResourceManager extends SWTResourceManager {
m_URLImageMap.clear();
}
}
- ////////////////////////////////////////////////////////////////////////////
+
+ // //////////////////////////////////////////////////////////////////////////
//
// Plugin images support
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
/**
* Maps URL to images.
*/
private static Map<String, Image> m_URLImageMap = new HashMap<String, Image>();
+
/**
* Provider for plugin resources, used by WindowBuilder at design time.
*/
public interface PluginResourceProvider {
URL getEntry(String symbolicName, String path);
}
+
/**
* Instance of {@link PluginResourceProvider}, used by WindowBuilder at design time.
*/
private static PluginResourceProvider m_designTimePluginResourceProvider = null;
+
/**
* Returns an {@link Image} based on a plugin and file path.
- *
+ *
* @param plugin
* the plugin {@link Object} containing the image
* @param name
* the path to the image within the plugin
* @return the {@link Image} stored in the file at the specified path
- *
+ *
* @deprecated Use {@link #getPluginImage(String, String)} instead.
*/
@Deprecated
@@ -234,9 +246,10 @@ public class ResourceManager extends SWTResourceManager {
}
return null;
}
+
/**
* Returns an {@link Image} based on a {@link Bundle} and resource entry path.
- *
+ *
* @param symbolicName
* the symbolic name of the {@link Bundle}.
* @param path
@@ -254,6 +267,7 @@ public class ResourceManager extends SWTResourceManager {
}
return null;
}
+
/**
* Returns an {@link Image} based on given {@link URL}.
*/
@@ -280,15 +294,16 @@ public class ResourceManager extends SWTResourceManager {
}
return null;
}
+
/**
* Returns an {@link ImageDescriptor} based on a plugin and file path.
- *
+ *
* @param plugin
* the plugin {@link Object} containing the image.
* @param name
* the path to th eimage within the plugin.
* @return the {@link ImageDescriptor} stored in the file at the specified path.
- *
+ *
* @deprecated Use {@link #getPluginImageDescriptor(String, String)} instead.
*/
@Deprecated
@@ -305,9 +320,10 @@ public class ResourceManager extends SWTResourceManager {
}
return null;
}
+
/**
* Returns an {@link ImageDescriptor} based on a {@link Bundle} and resource entry path.
- *
+ *
* @param symbolicName
* the symbolic name of the {@link Bundle}.
* @param path
@@ -325,6 +341,7 @@ public class ResourceManager extends SWTResourceManager {
}
return null;
}
+
/**
* Returns an {@link URL} based on a {@link Bundle} and resource entry path.
*/
@@ -343,9 +360,10 @@ public class ResourceManager extends SWTResourceManager {
// no such resource
return null;
}
+
/**
* Returns an {@link URL} based on a plugin and file path.
- *
+ *
* @param plugin
* the plugin {@link Object} containing the file path.
* @param name
@@ -363,13 +381,13 @@ public class ResourceManager extends SWTResourceManager {
Object bundle = getBundleMethod.invoke(plugin, new Object[0]);
//
Class<?> PathClass = Class.forName("org.eclipse.core.runtime.Path"); //$NON-NLS-1$
- Constructor<?> pathConstructor = PathClass.getConstructor(new Class[]{String.class});
- Object path = pathConstructor.newInstance(new Object[]{name});
+ Constructor<?> pathConstructor = PathClass.getConstructor(new Class[] { String.class });
+ Object path = pathConstructor.newInstance(new Object[] { name });
//
Class<?> IPathClass = Class.forName("org.eclipse.core.runtime.IPath"); //$NON-NLS-1$
Class<?> PlatformClass = Class.forName("org.eclipse.core.runtime.Platform"); //$NON-NLS-1$
- Method findMethod = PlatformClass.getMethod("find", new Class[]{BundleClass, IPathClass}); //$NON-NLS-1$
- return (URL) findMethod.invoke(null, new Object[]{bundle, path});
+ Method findMethod = PlatformClass.getMethod("find", new Class[] { BundleClass, IPathClass }); //$NON-NLS-1$
+ return (URL) findMethod.invoke(null, new Object[] { bundle, path });
}
} catch (Throwable e) {
// Ignore any exceptions
@@ -380,21 +398,22 @@ public class ResourceManager extends SWTResourceManager {
if (PluginClass.isAssignableFrom(plugin.getClass())) {
//
Class<?> PathClass = Class.forName("org.eclipse.core.runtime.Path"); //$NON-NLS-1$
- Constructor<?> pathConstructor = PathClass.getConstructor(new Class[]{String.class});
- Object path = pathConstructor.newInstance(new Object[]{name});
+ Constructor<?> pathConstructor = PathClass.getConstructor(new Class[] { String.class });
+ Object path = pathConstructor.newInstance(new Object[] { name });
//
Class<?> IPathClass = Class.forName("org.eclipse.core.runtime.IPath"); //$NON-NLS-1$
- Method findMethod = PluginClass.getMethod("find", new Class[]{IPathClass}); //$NON-NLS-1$
- return (URL) findMethod.invoke(plugin, new Object[]{path});
+ Method findMethod = PluginClass.getMethod("find", new Class[] { IPathClass }); //$NON-NLS-1$
+ return (URL) findMethod.invoke(plugin, new Object[] { path });
}
}
return null;
}
- ////////////////////////////////////////////////////////////////////////////
+
+ // //////////////////////////////////////////////////////////////////////////
//
// General
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
/**
* Dispose of cached objects and their underlying OS resources. This should only be called when the cached
* objects are no longer needed (e.g. on application shutdown).
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/SWTResourceManager.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/SWTResourceManager.java
index 0cf20cb0699..713370dc232 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/SWTResourceManager.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/com/swtdesigner/SWTResourceManager.java
@@ -21,28 +21,27 @@ import org.eclipse.swt.widgets.Display;
/**
* Utility class for managing OS resources associated with SWT controls such as colors, fonts, images, etc.
* <p>
- * !!! IMPORTANT !!! Application code must explicitly invoke the <code>dispose()</code> method to release the
- * operating system resources managed by cached objects when those objects and OS resources are no longer
- * needed (e.g. on application shutdown)
+ * !!! IMPORTANT !!! Application code must explicitly invoke the <code>dispose()</code> method to release the operating system resources managed by cached objects when those objects and OS resources are no longer needed (e.g. on application shutdown)
* <p>
* This class may be freely distributed as part of any application or plugin.
* <p>
* Copyright (c) 2003 - 2007, Instantiations, Inc. <br>
* All Rights Reserved
- *
+ *
* @author scheglov_ke
* @author Dan Rubel
*/
public class SWTResourceManager {
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
//
// Color
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
private static Map<RGB, Color> m_colorMap = new HashMap<RGB, Color>();
+
/**
* Returns the system {@link Color} matching the specific ID.
- *
+ *
* @param systemColorID
* the ID value for the color
* @return the system {@link Color} matching the specific ID
@@ -51,9 +50,10 @@ public class SWTResourceManager {
Display display = Display.getCurrent();
return display.getSystemColor(systemColorID);
}
+
/**
* Returns a {@link Color} given its red, green and blue component values.
- *
+ *
* @param r
* the red component of the color
* @param g
@@ -65,9 +65,10 @@ public class SWTResourceManager {
public static Color getColor(int r, int g, int b) {
return getColor(new RGB(r, g, b));
}
+
/**
* Returns a {@link Color} given its RGB value.
- *
+ *
* @param rgb
* the {@link RGB} value of the color
* @return the {@link Color} matching the RGB value
@@ -81,6 +82,7 @@ public class SWTResourceManager {
}
return color;
}
+
/**
* Dispose of all the cached {@link Color}'s.
*/
@@ -90,18 +92,20 @@ public class SWTResourceManager {
}
m_colorMap.clear();
}
- ////////////////////////////////////////////////////////////////////////////
+
+ // //////////////////////////////////////////////////////////////////////////
//
// Image
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
/**
* Maps image paths to images.
*/
private static Map<String, Image> m_imageMap = new HashMap<String, Image>();
+
/**
* Returns an {@link Image} encoded by the specified {@link InputStream}.
- *
+ *
* @param stream
* the {@link InputStream} encoding the image data
* @return the {@link Image} encoded by the specified input stream
@@ -118,9 +122,10 @@ public class SWTResourceManager {
stream.close();
}
}
+
/**
* Returns an {@link Image} stored in the file at the specified path.
- *
+ *
* @param path
* the path to the image file
* @return the {@link Image} stored in the file at the specified path
@@ -138,9 +143,10 @@ public class SWTResourceManager {
}
return image;
}
+
/**
* Returns an {@link Image} stored in the file at the specified path relative to the specified class.
- *
+ *
* @param clazz
* the {@link Class} relative to which to find the image
* @param path
@@ -161,7 +167,9 @@ public class SWTResourceManager {
}
return image;
}
+
private static final int MISSING_IMAGE_SIZE = 10;
+
/**
* @return the small {@link Image} that can be used as placeholder for missing image.
*/
@@ -175,6 +183,7 @@ public class SWTResourceManager {
//
return image;
}
+
/**
* Style constant for placing decorator image in top left corner of base image.
*/
@@ -200,9 +209,10 @@ public class SWTResourceManager {
*/
@SuppressWarnings("unchecked")
private static Map<Image, Map<Image, Image>>[] m_decoratedImageMap = new Map[LAST_CORNER_KEY];
+
/**
* Returns an {@link Image} composed of a base image decorated by another image.
- *
+ *
* @param baseImage
* the base {@link Image} that should be decorated
* @param decorator
@@ -212,9 +222,10 @@ public class SWTResourceManager {
public static Image decorateImage(Image baseImage, Image decorator) {
return decorateImage(baseImage, decorator, BOTTOM_RIGHT);
}
+
/**
* Returns an {@link Image} composed of a base image decorated by another image.
- *
+ *
* @param baseImage
* the base {@link Image} that should be decorated
* @param decorator
@@ -262,6 +273,7 @@ public class SWTResourceManager {
}
return result;
}
+
/**
* Dispose all of the cached {@link Image}'s.
*/
@@ -287,11 +299,12 @@ public class SWTResourceManager {
}
}
}
- ////////////////////////////////////////////////////////////////////////////
+
+ // //////////////////////////////////////////////////////////////////////////
//
// Font
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
/**
* Maps font names to fonts.
*/
@@ -300,9 +313,10 @@ public class SWTResourceManager {
* Maps fonts to their bold versions.
*/
private static Map<Font, Font> m_fontToBoldFontMap = new HashMap<Font, Font>();
+
/**
* Returns a {@link Font} based on its name, height and style.
- *
+ *
* @param name
* the name of the font
* @param height
@@ -314,10 +328,11 @@ public class SWTResourceManager {
public static Font getFont(String name, int height, int style) {
return getFont(name, height, style, false, false);
}
+
/**
* Returns a {@link Font} based on its name, height and style. Windows-specific strikeout and underline
* flags are also supported.
- *
+ *
* @param name
* the name of the font
* @param size
@@ -356,9 +371,10 @@ public class SWTResourceManager {
}
return font;
}
+
/**
* Returns a bold version of the given {@link Font}.
- *
+ *
* @param baseFont
* the {@link Font} for which a bold version is desired
* @return the bold version of the given {@link Font}
@@ -373,6 +389,7 @@ public class SWTResourceManager {
}
return font;
}
+
/**
* Dispose all of the cached {@link Font}'s.
*/
@@ -388,18 +405,20 @@ public class SWTResourceManager {
}
m_fontToBoldFontMap.clear();
}
- ////////////////////////////////////////////////////////////////////////////
+
+ // //////////////////////////////////////////////////////////////////////////
//
// Cursor
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
/**
* Maps IDs to cursors.
*/
private static Map<Integer, Cursor> m_idToCursorMap = new HashMap<Integer, Cursor>();
+
/**
* Returns the system cursor matching the specific ID.
- *
+ *
* @param id
* int The ID value for the cursor
* @return Cursor The system cursor matching the specific ID
@@ -413,6 +432,7 @@ public class SWTResourceManager {
}
return cursor;
}
+
/**
* Dispose all of the cached cursors.
*/
@@ -422,11 +442,12 @@ public class SWTResourceManager {
}
m_idToCursorMap.clear();
}
- ////////////////////////////////////////////////////////////////////////////
+
+ // //////////////////////////////////////////////////////////////////////////
//
// General
//
- ////////////////////////////////////////////////////////////////////////////
+ // //////////////////////////////////////////////////////////////////////////
/**
* Dispose of cached objects and their underlying OS resources. This should only be called when the cached
* objects are no longer needed (e.g. on application shutdown).
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateActionBarContributor.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateActionBarContributor.java
index 0755d1481e7..84fd50e1564 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateActionBarContributor.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateActionBarContributor.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -49,7 +49,7 @@ import org.eclipse.ui.PartInitException;
* This is the action bar contributor for the DiagramTemplate model editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public class DiagramTemplateActionBarContributor extends EditingDomainActionBarContributor implements ISelectionChangedListener {
@@ -58,7 +58,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This keeps track of the active editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IEditorPart activeEditorPart;
@@ -67,7 +67,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This keeps track of the current selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected ISelectionProvider selectionProvider;
@@ -76,7 +76,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This action opens the Properties view.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IAction showPropertiesViewAction = new Action(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
@@ -96,7 +96,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IAction refreshViewerAction = new Action(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
@@ -108,9 +108,9 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
@Override
public void run() {
- if(activeEditorPart instanceof IViewerProvider) {
- Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
- if(viewer != null) {
+ if (activeEditorPart instanceof IViewerProvider) {
+ Viewer viewer = ((IViewerProvider) activeEditorPart).getViewer();
+ if (viewer != null) {
viewer.refresh();
}
}
@@ -122,7 +122,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* generated for the current selection by the item provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Collection<IAction> createChildActions;
@@ -131,7 +131,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This is the menu manager into which menu contribution items should be added for CreateChild actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IMenuManager createChildMenuManager;
@@ -141,7 +141,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* generated for the current selection by the item provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Collection<IAction> createSiblingActions;
@@ -150,7 +150,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This is the menu manager into which menu contribution items should be added for CreateSibling actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IMenuManager createSiblingMenuManager;
@@ -159,7 +159,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This creates an instance of the contributor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public DiagramTemplateActionBarContributor() {
@@ -173,7 +173,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -187,7 +187,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* as well as the sub-menus for object creation items.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -227,7 +227,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* When the active editor changes, this remembers the change and registers with it as a selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -237,10 +237,10 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
// Switch to the new selection provider.
//
- if(selectionProvider != null) {
+ if (selectionProvider != null) {
selectionProvider.removeSelectionChangedListener(this);
}
- if(part == null) {
+ if (part == null) {
selectionProvider = null;
} else {
selectionProvider = part.getSite().getSelectionProvider();
@@ -248,7 +248,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
// Fake a selection changed event to update the menus.
//
- if(selectionProvider.getSelection() != null) {
+ if (selectionProvider.getSelection() != null) {
selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
}
}
@@ -260,16 +260,16 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* that can be added to the selected object and updating the menus accordingly.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
- if(createChildMenuManager != null) {
+ if (createChildMenuManager != null) {
depopulateManager(createChildMenuManager, createChildActions);
}
- if(createSiblingMenuManager != null) {
+ if (createSiblingMenuManager != null) {
depopulateManager(createSiblingMenuManager, createSiblingActions);
}
@@ -279,10 +279,10 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
Collection<?> newSiblingDescriptors = null;
ISelection selection = event.getSelection();
- if(selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
- Object object = ((IStructuredSelection)selection).getFirstElement();
+ if (selection instanceof IStructuredSelection && ((IStructuredSelection) selection).size() == 1) {
+ Object object = ((IStructuredSelection) selection).getFirstElement();
- EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
+ EditingDomain domain = ((IEditingDomainProvider) activeEditorPart).getEditingDomain();
newChildDescriptors = domain.getNewChildDescriptors(object, null);
newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
@@ -293,11 +293,11 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
createChildActions = generateCreateChildActions(newChildDescriptors, selection);
createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
- if(createChildMenuManager != null) {
+ if (createChildMenuManager != null) {
populateManager(createChildMenuManager, createChildActions, null);
createChildMenuManager.update(true);
}
- if(createSiblingMenuManager != null) {
+ if (createSiblingMenuManager != null) {
populateManager(createSiblingMenuManager, createSiblingActions, null);
createSiblingMenuManager.update(true);
}
@@ -308,13 +308,13 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* and returns the collection of these actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
- if(descriptors != null) {
- for(Object descriptor : descriptors) {
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
}
}
@@ -326,13 +326,13 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* and returns the collection of these actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
- if(descriptors != null) {
- for(Object descriptor : descriptors) {
+ if (descriptors != null) {
+ for (Object descriptor : descriptors) {
actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
}
}
@@ -346,13 +346,13 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* If <code>contributionID</code> is <code>null</code>, they are simply added.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
- if(actions != null) {
- for(IAction action : actions) {
- if(contributionID != null) {
+ if (actions != null) {
+ for (IAction action : actions) {
+ if (contributionID != null) {
manager.insertBefore(contributionID, action);
} else {
manager.add(action);
@@ -366,25 +366,25 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
- if(actions != null) {
+ if (actions != null) {
IContributionItem[] items = manager.getItems();
- for(int i = 0; i < items.length; i++) {
+ for (int i = 0; i < items.length; i++) {
// Look into SubContributionItems
//
IContributionItem contributionItem = items[i];
- while(contributionItem instanceof SubContributionItem) {
- contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
+ while (contributionItem instanceof SubContributionItem) {
+ contributionItem = ((SubContributionItem) contributionItem).getInnerItem();
}
// Delete the ActionContributionItems with matching action.
//
- if(contributionItem instanceof ActionContributionItem) {
- IAction action = ((ActionContributionItem)contributionItem).getAction();
- if(actions.contains(action)) {
+ if (contributionItem instanceof ActionContributionItem) {
+ IAction action = ((ActionContributionItem) contributionItem).getAction();
+ if (actions.contains(action)) {
manager.remove(contributionItem);
}
}
@@ -396,7 +396,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This populates the pop-up menu before it appears.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -417,7 +417,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This inserts global actions before the "additions-end" separator.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
@@ -435,7 +435,7 @@ public class DiagramTemplateActionBarContributor extends EditingDomainActionBarC
* This ensures that a delete action will clean up all references to deleted objects.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java
index 61ad60bd1f3..539f2f60d19 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditor.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -56,6 +56,7 @@ import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
import org.eclipse.emf.edit.ui.util.EditUIUtil;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.viewers.AbstractTreeViewer;
import org.eclipse.jface.viewers.CellEditor;
import org.eclipse.jface.viewers.CheckStateChangedEvent;
import org.eclipse.jface.viewers.CheckboxCellEditor;
@@ -134,7 +135,7 @@ import com.swtdesigner.ResourceManager;
/**
* The template model editor.
- *
+ *
*/
public class DiagramTemplateEditor extends EditorPart {
@@ -265,14 +266,14 @@ public class DiagramTemplateEditor extends EditorPart {
/**
* This keeps track of the editing domain that is used to track all changes to the model.
- *
+ *
* @generated
*/
protected AdapterFactoryEditingDomain editingDomain;
/**
* Map to store the diagnostic associated with a resource.
- *
+ *
* @generated
*/
protected Map<Resource, Diagnostic> resourceToDiagnosticMap = new LinkedHashMap<Resource, Diagnostic>();
@@ -296,9 +297,9 @@ public class DiagramTemplateEditor extends EditorPart {
/**
- *
+ *
* Constructor.
- *
+ *
*/
public DiagramTemplateEditor() {
super();
@@ -312,16 +313,16 @@ public class DiagramTemplateEditor extends EditorPart {
/**
* This looks up a string in plugin.properties, making a substitution.
- *
+ *
* @generated
*/
private static String getString(String key, Object s1) {
- return DiagramTemplateEditorPlugin.INSTANCE.getString(key, new Object[]{ s1 });
+ return DiagramTemplateEditorPlugin.INSTANCE.getString(key, new Object[] { s1 });
}
/**
* This is the method called to load a resource into the editing domain's resource set based on the editor's input.
- *
+ *
* @generated NOT
*/
protected boolean createModel() {
@@ -337,22 +338,22 @@ public class DiagramTemplateEditor extends EditorPart {
}
Diagnostic diagnostic = analyzeResourceProblems(templateResource, exception);
- if(diagnostic.getSeverity() != Diagnostic.OK) {
- //Failed to load
+ if (diagnostic.getSeverity() != Diagnostic.OK) {
+ // Failed to load
MessageDialog.openError(getSite().getShell(), Messages.DiagramTemplateEditor_2, Messages.DiagramTemplateEditor_3);
return false;
} else {
- if(templateResource.getContents().isEmpty()) {
- //Create the template
+ if (templateResource.getContents().isEmpty()) {
+ // Create the template
template = diagramtemplateFactory.createTemplate();
templateResource.getContents().add(template);
} else {
- //Load the template
- template = (Template)templateResource.getContents().get(0);
- if(template.getTargetRoot() != null) {
+ // Load the template
+ template = (Template) templateResource.getContents().get(0);
+ if (template.getTargetRoot() != null) {
Resource res = template.getTargetRoot().eResource();
- if(res != null) {
+ if (res != null) {
targetModelResource = res;
} else {
MessageDialog.openError(getSite().getShell(), Messages.DiagramTemplateEditor_4, Messages.DiagramTemplateEditor_5);
@@ -366,11 +367,11 @@ public class DiagramTemplateEditor extends EditorPart {
/**
* Helper method to load a model
- *
+ *
* @param resourceSet
- * the resourceSet to load the model in
+ * the resourceSet to load the model in
* @param file
- * the file corresponding to the model to load
+ * the file corresponding to the model to load
* @return the resource corresponding to the model
*/
protected Resource loadModel(ResourceSet resourceSet, IFile file) {
@@ -385,8 +386,8 @@ public class DiagramTemplateEditor extends EditorPart {
* Helper method to update rootText widget
*/
protected void updateRootText() {
- if(currentDiagramDefinition.getFromRoot() instanceof NamedElement) {
- rootText.setText(((NamedElement)currentDiagramDefinition.getFromRoot()).getQualifiedName());
+ if (currentDiagramDefinition.getFromRoot() instanceof NamedElement) {
+ rootText.setText(((NamedElement) currentDiagramDefinition.getFromRoot()).getQualifiedName());
} else {
rootText.setText(currentDiagramDefinition.getFromRoot().toString());
}
@@ -405,7 +406,7 @@ public class DiagramTemplateEditor extends EditorPart {
nameText.setText(currentDiagramDefinition.getName());
descriptionText.setText(currentDiagramDefinition.getDescription());
prefixText.setText(currentDiagramDefinition.getPrefix());
- if(currentDiagramDefinition.getFromRoot() != null) {
+ if (currentDiagramDefinition.getFromRoot() != null) {
updateRootText();
} else {
rootText.setText(""); //$NON-NLS-1$
@@ -416,25 +417,25 @@ public class DiagramTemplateEditor extends EditorPart {
* Helper method to initialize the diagram categories (kinds)
*/
protected void initializeDiagramCategories() {
- for(DiagramCategoryDescriptor diagramCategoryDescriptor : DiagramCategoryRegistry.getInstance().getDiagramCategories()) {
+ for (DiagramCategoryDescriptor diagramCategoryDescriptor : DiagramCategoryRegistry.getInstance().getDiagramCategories()) {
diagramCategories.add(diagramCategoryDescriptor.getLabel());
}
}
/**
* Helper method used to check if the element is already defined
- *
+ *
* @param object
- * the element to find
+ * the element to find
* @param list
- * the list to search in
+ * the list to search in
* @return
* true if found false else
*/
protected boolean containsElement(EObject object, List<?> list) {
- if(list != null) {
- for(Object selection : list) {
- if(((AbstractSelection)selection).getElement() == object) {
+ if (list != null) {
+ for (Object selection : list) {
+ if (((AbstractSelection) selection).getElement() == object) {
return true;
}
}
@@ -447,19 +448,19 @@ public class DiagramTemplateEditor extends EditorPart {
*/
protected void clearTemplate() {
TreeIterator<EObject> it = template.eAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject eObject = it.next();
- if(eObject instanceof DiagramDefinition) {
- ((DiagramDefinition)eObject).setFromRoot(null);
- } else if(eObject instanceof Selection) {
- if(((AbstractSelection)eObject).getKind() != SelectionKind.FOR_ALL) {
- RemoveCommand command = new RemoveCommand(editingDomain, ((Selection)eObject).eContainer(), ((Selection)eObject).eContainer().eClass().getEStructuralFeature("selection"), eObject); //$NON-NLS-1$
+ if (eObject instanceof DiagramDefinition) {
+ ((DiagramDefinition) eObject).setFromRoot(null);
+ } else if (eObject instanceof Selection) {
+ if (((AbstractSelection) eObject).getKind() != SelectionKind.FOR_ALL) {
+ RemoveCommand command = new RemoveCommand(editingDomain, ((Selection) eObject).eContainer(), ((Selection) eObject).eContainer().eClass().getEStructuralFeature("selection"), eObject); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
it = template.eAllContents();
}
- } else if(eObject instanceof SelectionRef) {
- if(((AbstractSelection)eObject).getKind() != SelectionKind.FOR_ALL) {
- RemoveCommand command = new RemoveCommand(editingDomain, ((SelectionRef)eObject).eContainer(), ((SelectionRef)eObject).eContainer().eClass().getEStructuralFeature("selectionRef"), eObject); //$NON-NLS-1$
+ } else if (eObject instanceof SelectionRef) {
+ if (((AbstractSelection) eObject).getKind() != SelectionKind.FOR_ALL) {
+ RemoveCommand command = new RemoveCommand(editingDomain, ((SelectionRef) eObject).eContainer(), ((SelectionRef) eObject).eContainer().eClass().getEStructuralFeature("selectionRef"), eObject); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
it = template.eAllContents();
}
@@ -495,11 +496,11 @@ public class DiagramTemplateEditor extends EditorPart {
currentDiagramDefinition.setDescription(""); //$NON-NLS-1$
currentDiagramDefinition.setPrefix(DEFAULT_PREFIX);
- if(targetModelResource != null) {
+ if (targetModelResource != null) {
currentDiagramDefinition.setFromRoot(targetModelResource.getContents().get(0));
}
- //Update UI
+ // Update UI
updateUI();
addDiagramDefinitionButton.setEnabled(true);
@@ -508,16 +509,17 @@ public class DiagramTemplateEditor extends EditorPart {
/**
* Returns a diagnostic describing the errors and warnings listed in the resource
* and the specified exception (if any).
- *
+ *
* @generated
*/
public Diagnostic analyzeResourceProblems(Resource resource, Exception exception) {
- if(!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
- BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.diagramtemplate.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[]{ exception == null ? (Object)resource : exception }); //$NON-NLS-1$ //$NON-NLS-2$
+ if (!resource.getErrors().isEmpty() || !resource.getWarnings().isEmpty()) {
+ BasicDiagnostic basicDiagnostic = new BasicDiagnostic(Diagnostic.ERROR,
+ "org.eclipse.papyrus.diagramtemplate.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception == null ? (Object) resource : exception }); //$NON-NLS-1$ //$NON-NLS-2$
basicDiagnostic.merge(EcoreUtil.computeDiagnostic(resource, true));
return basicDiagnostic;
- } else if(exception != null) {
- return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.diagramtemplate.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[]{ exception }); //$NON-NLS-1$ //$NON-NLS-2$
+ } else if (exception != null) {
+ return new BasicDiagnostic(Diagnostic.ERROR, "org.eclipse.papyrus.diagramtemplate.editor", 0, getString("_UI_CreateModelError_message", resource.getURI()), new Object[] { exception }); //$NON-NLS-1$ //$NON-NLS-2$
} else {
return Diagnostic.OK_INSTANCE;
}
@@ -526,7 +528,7 @@ public class DiagramTemplateEditor extends EditorPart {
/**
* This sets up the editing domain for the model editor.
- *
+ *
* @generated
*/
protected void initializeEditingDomain() {
@@ -560,14 +562,14 @@ public class DiagramTemplateEditor extends EditorPart {
/**
* This returns whether something has been persisted to the URI of the specified resource.
* The implementation uses the URI converter from the editor's resource set to try to open an input stream.
- *
+ *
* @generated
*/
protected boolean isPersisted(Resource resource) {
boolean result = false;
try {
InputStream stream = editingDomain.getResourceSet().getURIConverter().createInputStream(resource.getURI());
- if(stream != null) {
+ if (stream != null) {
result = true;
stream.close();
}
@@ -595,8 +597,8 @@ public class DiagramTemplateEditor extends EditorPart {
// Save the resources to the file system.
//
boolean first = true;
- for(Resource resource : editingDomain.getResourceSet().getResources()) {
- if((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
+ for (Resource resource : editingDomain.getResourceSet().getResources()) {
+ if ((first || !resource.getContents().isEmpty() || isPersisted(resource)) && !editingDomain.isReadOnly(resource)) {
try {
resource.save(saveOptions);
} catch (Exception exception) {
@@ -612,7 +614,7 @@ public class DiagramTemplateEditor extends EditorPart {
new ProgressMonitorDialog(getSite().getShell()).run(true, false, operation);
- ((BasicCommandStack)editingDomain.getCommandStack()).saveIsDone();
+ ((BasicCommandStack) editingDomain.getCommandStack()).saveIsDone();
firePropertyChange(IEditorPart.PROP_DIRTY);
} catch (Exception exception) {
// Something went wrong that shouldn't.
@@ -636,7 +638,7 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public boolean isDirty() {
- return ((BasicCommandStack)editingDomain.getCommandStack()).isSaveNeeded();
+ return ((BasicCommandStack) editingDomain.getCommandStack()).isSaveNeeded();
}
@Override
@@ -657,7 +659,7 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
- if(targetModelResource != null) {
+ if (targetModelResource != null) {
DiagramTemplateLauncher launcher = DiagramTemplateLauncher.getInstance();
launcher.execute(template);
} else {
@@ -684,13 +686,13 @@ public class DiagramTemplateEditor extends EditorPart {
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getSite().getShell(), new WorkbenchLabelProvider(), new BaseWorkbenchContentProvider());
dialog.addFilter(new ViewerFilter() {
- //Show only element with UML extension
+ // Show only element with UML extension
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(element instanceof IContainer) {
+ if (element instanceof IContainer) {
return true;
} else {
- if(((IFile)element).getFileExtension().compareToIgnoreCase("uml") == 0) { //$NON-NLS-1$
+ if (((IFile) element).getFileExtension().compareToIgnoreCase("uml") == 0) { //$NON-NLS-1$
return true;
} else {
return false;
@@ -706,8 +708,8 @@ public class DiagramTemplateEditor extends EditorPart {
dialog.open();
Object result = dialog.getFirstResult();
- if(result instanceof IFile) {
- modelFile = (IFile)dialog.getFirstResult();
+ if (result instanceof IFile) {
+ modelFile = (IFile) dialog.getFirstResult();
targetModelResourceSet = new ResourceSetImpl();
targetModelResource = loadModel(targetModelResourceSet, modelFile);
targetModelPathText.setText(targetModelResource.getURI().toString());
@@ -715,8 +717,8 @@ public class DiagramTemplateEditor extends EditorPart {
SetCommand command = new SetCommand(editingDomain, template, template.eClass().getEStructuralFeature("targetRoot"), targetModelResource.getContents().get(0)); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
- //Set fromRoots automatically
- for(DiagramDefinition diagramDefinition : template.getDiagramDefinitions()) {
+ // Set fromRoots automatically
+ for (DiagramDefinition diagramDefinition : template.getDiagramDefinitions()) {
diagramDefinition.setFromRoot(targetModelResource.getContents().get(0));
}
@@ -736,7 +738,7 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
- if(MessageDialog.openConfirm(getSite().getShell(), Messages.DiagramTemplateEditor_27, Messages.DiagramTemplateEditor_28)) {
+ if (MessageDialog.openConfirm(getSite().getShell(), Messages.DiagramTemplateEditor_27, Messages.DiagramTemplateEditor_28)) {
clearTemplate();
}
}
@@ -773,8 +775,8 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
- if(currentDiagramDefinition.getDiagramKind() != null) {
- if(template != null) {
+ if (currentDiagramDefinition.getDiagramKind() != null) {
+ if (template != null) {
AddCommand command = new AddCommand(editingDomain, template, template.eClass().getEStructuralFeature("diagramDefinitions"), currentDiagramDefinition); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
@@ -792,9 +794,9 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = diagramDefinitionTableViewer.getSelection();
- if(selection instanceof IStructuredSelection) {
- Iterator it = ((IStructuredSelection)selection).iterator();
- while(it.hasNext()) {
+ if (selection instanceof IStructuredSelection) {
+ Iterator it = ((IStructuredSelection) selection).iterator();
+ while (it.hasNext()) {
Object object = it.next();
RemoveCommand command = new RemoveCommand(editingDomain, template, template.eClass().getEStructuralFeature("diagramDefinitions"), object); //$NON-NLS-1$
@@ -815,8 +817,8 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = diagramDefinitionTableViewer.getSelection();
- if(selection instanceof IStructuredSelection) {
- DiagramDefinition diagramDefinition = (DiagramDefinition)((IStructuredSelection)selection).getFirstElement();
+ if (selection instanceof IStructuredSelection) {
+ DiagramDefinition diagramDefinition = (DiagramDefinition) ((IStructuredSelection) selection).getFirstElement();
MoveCommand command = new MoveCommand(editingDomain, template, template.eClass().getEStructuralFeature("diagramDefinitions"), diagramDefinition, template.getDiagramDefinitions().indexOf(diagramDefinition) - 1); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
@@ -832,8 +834,8 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = diagramDefinitionTableViewer.getSelection();
- if(selection instanceof IStructuredSelection) {
- DiagramDefinition diagramDefinition = (DiagramDefinition)((IStructuredSelection)selection).getFirstElement();
+ if (selection instanceof IStructuredSelection) {
+ DiagramDefinition diagramDefinition = (DiagramDefinition) ((IStructuredSelection) selection).getFirstElement();
MoveCommand command = new MoveCommand(editingDomain, template, template.eClass().getEStructuralFeature("diagramDefinitions"), diagramDefinition, template.getDiagramDefinitions().indexOf(diagramDefinition) + 1); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
@@ -850,17 +852,17 @@ public class DiagramTemplateEditor extends EditorPart {
public void mouseUp(MouseEvent e) {
ISelection selection = diagramDefinitionTableViewer.getSelection();
- if(selection != null && !selection.isEmpty()) {
- if(selection instanceof IStructuredSelection) {
- DiagramDefinition diagramDefinition = (DiagramDefinition)((IStructuredSelection)selection).getFirstElement();
+ if (selection != null && !selection.isEmpty()) {
+ if (selection instanceof IStructuredSelection) {
+ DiagramDefinition diagramDefinition = (DiagramDefinition) ((IStructuredSelection) selection).getFirstElement();
Copier copier = new Copier();
- DiagramDefinition diagramDefinitionCopy = (DiagramDefinition)copier.copy(diagramDefinition);
+ DiagramDefinition diagramDefinitionCopy = (DiagramDefinition) copier.copy(diagramDefinition);
copier.copyReferences();
diagramDefinitionCopy.setName(Messages.DiagramTemplateEditor_47 + diagramDefinitionCopy.getName());
- if(template != null) {
+ if (template != null) {
AddCommand command = new AddCommand(editingDomain, template, template.eClass().getEStructuralFeature("diagramDefinitions"), diagramDefinitionCopy); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
@@ -882,14 +884,14 @@ public class DiagramTemplateEditor extends EditorPart {
* {@inheritDoc}
*/
public void selectionChanged(SelectionChangedEvent event) {
- if(event.getSelection() instanceof IStructuredSelection && !event.getSelection().isEmpty()) {
+ if (event.getSelection() instanceof IStructuredSelection && !event.getSelection().isEmpty()) {
- currentDiagramDefinition = (DiagramDefinition)((IStructuredSelection)event.getSelection()).getFirstElement();
+ currentDiagramDefinition = (DiagramDefinition) ((IStructuredSelection) event.getSelection()).getFirstElement();
- //Update UI
+ // Update UI
updateUI();
- //We are under edition of an existing diagram definition: we cannot add
+ // We are under edition of an existing diagram definition: we cannot add
addDiagramDefinitionButton.setEnabled(false);
}
}
@@ -963,10 +965,10 @@ public class DiagramTemplateEditor extends EditorPart {
ElementTreeSelectionDialog dlg = new ElementTreeSelectionDialog(getSite().getShell(), new AdapterFactoryLabelProvider(adapterFactory), new AdapterFactoryContentProvider(adapterFactory));
dlg.addFilter(new ViewerFilter() {
- //Show only eObject element
+ // Show only eObject element
@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
- if(element instanceof EObject) {
+ if (element instanceof EObject) {
return true;
} else {
return false;
@@ -980,7 +982,7 @@ public class DiagramTemplateEditor extends EditorPart {
dlg.open();
Object result = dlg.getFirstResult();
- if(result instanceof EObject) {
+ if (result instanceof EObject) {
SetCommand command = new SetCommand(editingDomain, currentDiagramDefinition, currentDiagramDefinition.eClass().getEStructuralFeature("fromRoot"), result); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
@@ -1002,8 +1004,8 @@ public class DiagramTemplateEditor extends EditorPart {
public void checkStateChanged(CheckStateChangedEvent event) {
Object element = event.getElement();
- if(element instanceof CreationCommandDescriptor) {
- SetCommand command = new SetCommand(editingDomain, currentDiagramDefinition, currentDiagramDefinition.eClass().getEStructuralFeature("diagramKind"), ((CreationCommandDescriptor)element).getCommandId()); //$NON-NLS-1$
+ if (element instanceof CreationCommandDescriptor) {
+ SetCommand command = new SetCommand(editingDomain, currentDiagramDefinition, currentDiagramDefinition.eClass().getEStructuralFeature("diagramKind"), ((CreationCommandDescriptor) element).getCommandId()); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
@@ -1022,9 +1024,9 @@ public class DiagramTemplateEditor extends EditorPart {
}
public boolean isChecked(Object element) {
- if(currentDiagramDefinition != null) {
- if(element instanceof CreationCommandDescriptor && currentDiagramDefinition.getDiagramKind() != null) {
- return ((CreationCommandDescriptor)element).getCommandId().equals(currentDiagramDefinition.getDiagramKind());
+ if (currentDiagramDefinition != null) {
+ if (element instanceof CreationCommandDescriptor && currentDiagramDefinition.getDiagramKind() != null) {
+ return ((CreationCommandDescriptor) element).getCommandId().equals(currentDiagramDefinition.getDiagramKind());
}
}
return false;
@@ -1061,17 +1063,17 @@ public class DiagramTemplateEditor extends EditorPart {
List<EObject> listOfTypes = new ArrayList<EObject>();
UMLPackage umlPackage = UMLPackage.eINSTANCE;
TreeIterator<EObject> it = umlPackage.eAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject typeInUML = it.next();
- if(typeInUML instanceof EClass) {
- if(targetModelResource != null) {
- if(!targetModelResource.getContents().isEmpty()) {
- //If the element is a type available in the model
+ if (typeInUML instanceof EClass) {
+ if (targetModelResource != null) {
+ if (!targetModelResource.getContents().isEmpty()) {
+ // If the element is a type available in the model
TreeIterator<EObject> itTarget = targetModelResource.getAllContents();
- while(itTarget.hasNext()) {
+ while (itTarget.hasNext()) {
EObject elementInTargetModel = itTarget.next();
- if(typeInUML == elementInTargetModel.eClass() && !listOfTypes.contains(typeInUML)) {
+ if (typeInUML == elementInTargetModel.eClass() && !listOfTypes.contains(typeInUML)) {
listOfTypes.add(typeInUML);
}
}
@@ -1087,18 +1089,18 @@ public class DiagramTemplateEditor extends EditorPart {
dlg.open();
Object[] results = dlg.getResult();
- if(results != null) {
- for(Object object : results) {
- if(object instanceof EClass) {
+ if (results != null) {
+ for (Object object : results) {
+ if (object instanceof EClass) {
- if(!containsElement((EClass)object, currentDiagramDefinition.getSelection())) {
+ if (!containsElement((EClass) object, currentDiagramDefinition.getSelection())) {
Selection selection = diagramtemplateFactory.createSelection();
selection.setKind(SelectionKind.FOR_ALL);
selection.setRecursively(false);
selection.setSubTypes(false);
selection.setStereotypedBy(""); //$NON-NLS-1$
- selection.setElement((EClass)object);
+ selection.setElement((EClass) object);
AddCommand command = new AddCommand(editingDomain, currentDiagramDefinition, currentDiagramDefinition.eClass().getEStructuralFeature("selection"), selection); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
@@ -1120,26 +1122,26 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
- if(targetModelResource != null) {
+ if (targetModelResource != null) {
CheckedTreeSelectionDialog dlg = new CheckedTreeSelectionDialog(getSite().getShell(), new AdapterFactoryLabelProvider(adapterFactory), new AdapterFactoryContentProvider(adapterFactory));
dlg.setInput(targetModelResource);
dlg.setTitle(Messages.DiagramTemplateEditor_74);
dlg.open();
Object[] results = dlg.getResult();
- if(results != null) {
- for(Object object : results) {
- if(object instanceof EObject) {
+ if (results != null) {
+ for (Object object : results) {
+ if (object instanceof EObject) {
- if(!containsElement((EObject)object, currentDiagramDefinition.getSelection())) {
+ if (!containsElement((EObject) object, currentDiagramDefinition.getSelection())) {
Selection selection = diagramtemplateFactory.createSelection();
selection.setKind(SelectionKind.SPECIFIC);
selection.setRecursively(false);
selection.setSubTypes(false);
selection.setStereotypedBy(""); //$NON-NLS-1$
- selection.setElement((EObject)object);
+ selection.setElement((EObject) object);
- // currentDiagramDefinition.getSelection().add(selection);
+ // currentDiagramDefinition.getSelection().add(selection);
AddCommand command = new AddCommand(editingDomain, currentDiagramDefinition, currentDiagramDefinition.eClass().getEStructuralFeature("selection"), selection); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
@@ -1160,16 +1162,16 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = forTreeViewer.getSelection();
- if(selection != null && selection instanceof ITreeSelection) {
- Iterator it = ((ITreeSelection)selection).iterator();
- while(it.hasNext()) {
+ if (selection != null && selection instanceof ITreeSelection) {
+ Iterator it = ((ITreeSelection) selection).iterator();
+ while (it.hasNext()) {
Object object = it.next();
- // removeSelection((AbstractSelection)object);
- if(object instanceof Selection) {
- RemoveCommand command = new RemoveCommand(editingDomain, ((Selection)object).eContainer(), ((Selection)object).eContainer().eClass().getEStructuralFeature("selection"), object); //$NON-NLS-1$
+ // removeSelection((AbstractSelection)object);
+ if (object instanceof Selection) {
+ RemoveCommand command = new RemoveCommand(editingDomain, ((Selection) object).eContainer(), ((Selection) object).eContainer().eClass().getEStructuralFeature("selection"), object); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
- } else if(object instanceof SelectionRef) {
- RemoveCommand command = new RemoveCommand(editingDomain, ((SelectionRef)object).eContainer(), ((SelectionRef)object).eContainer().eClass().getEStructuralFeature("selectionRef"), object); //$NON-NLS-1$
+ } else if (object instanceof SelectionRef) {
+ RemoveCommand command = new RemoveCommand(editingDomain, ((SelectionRef) object).eContainer(), ((SelectionRef) object).eContainer().eClass().getEStructuralFeature("selectionRef"), object); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
}
@@ -1186,13 +1188,15 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = forTreeViewer.getSelection();
- if(selection instanceof IStructuredSelection) {
- AbstractSelection abstractSelection = (AbstractSelection)((IStructuredSelection)selection).getFirstElement();
- if(abstractSelection instanceof Selection) {
- MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(), abstractSelection.eContainer().eClass().getEStructuralFeature("selection"), abstractSelection, ((DiagramDefinition)abstractSelection.eContainer()).getSelection().indexOf(abstractSelection) - 1); //$NON-NLS-1$
+ if (selection instanceof IStructuredSelection) {
+ AbstractSelection abstractSelection = (AbstractSelection) ((IStructuredSelection) selection).getFirstElement();
+ if (abstractSelection instanceof Selection) {
+ MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(),
+ abstractSelection.eContainer().eClass().getEStructuralFeature("selection"), abstractSelection, ((DiagramDefinition) abstractSelection.eContainer()).getSelection().indexOf(abstractSelection) - 1); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
- } else if(abstractSelection instanceof SelectionRef) {
- MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(), abstractSelection.eContainer().eClass().getEStructuralFeature("selectionRef"), abstractSelection, ((AbstractSelection)abstractSelection.eContainer()).getSelectionRef().indexOf(abstractSelection) - 1); //$NON-NLS-1$
+ } else if (abstractSelection instanceof SelectionRef) {
+ MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(),
+ abstractSelection.eContainer().eClass().getEStructuralFeature("selectionRef"), abstractSelection, ((AbstractSelection) abstractSelection.eContainer()).getSelectionRef().indexOf(abstractSelection) - 1); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
forTreeViewer.refresh();
@@ -1207,13 +1211,15 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = forTreeViewer.getSelection();
- if(selection instanceof IStructuredSelection) {
- AbstractSelection abstractSelection = (AbstractSelection)((IStructuredSelection)selection).getFirstElement();
- if(abstractSelection instanceof Selection) {
- MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(), abstractSelection.eContainer().eClass().getEStructuralFeature("selection"), abstractSelection, ((DiagramDefinition)abstractSelection.eContainer()).getSelection().indexOf(abstractSelection) + 1); //$NON-NLS-1$
+ if (selection instanceof IStructuredSelection) {
+ AbstractSelection abstractSelection = (AbstractSelection) ((IStructuredSelection) selection).getFirstElement();
+ if (abstractSelection instanceof Selection) {
+ MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(),
+ abstractSelection.eContainer().eClass().getEStructuralFeature("selection"), abstractSelection, ((DiagramDefinition) abstractSelection.eContainer()).getSelection().indexOf(abstractSelection) + 1); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
- } else if(abstractSelection instanceof SelectionRef) {
- MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(), abstractSelection.eContainer().eClass().getEStructuralFeature("selectionRef"), abstractSelection, ((AbstractSelection)abstractSelection.eContainer()).getSelectionRef().indexOf(abstractSelection) + 1); //$NON-NLS-1$
+ } else if (abstractSelection instanceof SelectionRef) {
+ MoveCommand command = new MoveCommand(editingDomain, abstractSelection.eContainer(),
+ abstractSelection.eContainer().eClass().getEStructuralFeature("selectionRef"), abstractSelection, ((AbstractSelection) abstractSelection.eContainer()).getSelectionRef().indexOf(abstractSelection) + 1); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
}
forTreeViewer.refresh();
@@ -1225,7 +1231,7 @@ public class DiagramTemplateEditor extends EditorPart {
forTreeViewer = new TreeViewer(forPartComposite, SWT.BORDER | SWT.FULL_SELECTION);
forTree = forTreeViewer.getTree();
forTree.setHeaderVisible(true);
- forTreeViewer.setAutoExpandLevel(TreeViewer.ALL_LEVELS);
+ forTreeViewer.setAutoExpandLevel(AbstractTreeViewer.ALL_LEVELS);
forTree.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
TreeViewerColumn selectionTreeViewerColumn = new TreeViewerColumn(forTreeViewer, SWT.NONE);
@@ -1241,26 +1247,26 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
protected void setValue(Object element, Object value) {
- if(element instanceof Selection) {
- SetCommand command = new SetCommand(editingDomain, (Selection)element, ((Selection)element).eClass().getEStructuralFeature("recursively"), (Boolean)value); //$NON-NLS-1$
+ if (element instanceof Selection) {
+ SetCommand command = new SetCommand(editingDomain, (Selection) element, ((Selection) element).eClass().getEStructuralFeature("recursively"), (Boolean) value); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
- // ((AbstractSelection)element).setRecursively((Boolean)value);
+ // ((AbstractSelection)element).setRecursively((Boolean)value);
getViewer().update(element, null);
}
}
@Override
protected Object getValue(Object element) {
- if(element instanceof Selection) {
- return Boolean.valueOf(((Selection)element).isRecursively());
+ if (element instanceof Selection) {
+ return Boolean.valueOf(((Selection) element).isRecursively());
}
return null;
}
@Override
protected CellEditor getCellEditor(Object element) {
- if(element instanceof Selection) {
- if(((Selection)element).getKind() == SelectionKind.FOR_ALL) {
+ if (element instanceof Selection) {
+ if (((Selection) element).getKind() == SelectionKind.FOR_ALL) {
return new CheckboxCellEditor(forTree);
}
}
@@ -1282,26 +1288,26 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
protected void setValue(Object element, Object value) {
- if(element instanceof AbstractSelection) {
- SetCommand command = new SetCommand(editingDomain, (AbstractSelection)element, ((AbstractSelection)element).eClass().getEStructuralFeature("subTypes"), (Boolean)value); //$NON-NLS-1$
+ if (element instanceof AbstractSelection) {
+ SetCommand command = new SetCommand(editingDomain, (AbstractSelection) element, ((AbstractSelection) element).eClass().getEStructuralFeature("subTypes"), (Boolean) value); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
- // ((AbstractSelection)element).setSubTypes((Boolean)value);
+ // ((AbstractSelection)element).setSubTypes((Boolean)value);
getViewer().update(element, null);
}
}
@Override
protected Object getValue(Object element) {
- if(element instanceof AbstractSelection) {
- return Boolean.valueOf(((AbstractSelection)element).isSubTypes());
+ if (element instanceof AbstractSelection) {
+ return Boolean.valueOf(((AbstractSelection) element).isSubTypes());
}
return null;
}
@Override
protected CellEditor getCellEditor(Object element) {
- if(element instanceof AbstractSelection) {
- if(((AbstractSelection)element).getKind() == SelectionKind.FOR_ALL) {
+ if (element instanceof AbstractSelection) {
+ if (((AbstractSelection) element).getKind() == SelectionKind.FOR_ALL) {
return new CheckboxCellEditor(forTree);
}
}
@@ -1324,8 +1330,8 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
protected void setValue(Object element, Object value) {
- if(element instanceof AbstractSelection) {
- SetCommand command = new SetCommand(editingDomain, (AbstractSelection)element, ((AbstractSelection)element).eClass().getEStructuralFeature("stereotypedBy"), (String)value); //$NON-NLS-1$
+ if (element instanceof AbstractSelection) {
+ SetCommand command = new SetCommand(editingDomain, (AbstractSelection) element, ((AbstractSelection) element).eClass().getEStructuralFeature("stereotypedBy"), (String) value); //$NON-NLS-1$
editingDomain.getCommandStack().execute(command);
getViewer().update(element, null);
}
@@ -1333,11 +1339,11 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
protected Object getValue(Object element) {
- if(element instanceof AbstractSelection) {
- if(((AbstractSelection)element).getStereotypedBy() == null) {
+ if (element instanceof AbstractSelection) {
+ if (((AbstractSelection) element).getStereotypedBy() == null) {
return ""; //$NON-NLS-1$
} else {
- return ((AbstractSelection)element).getStereotypedBy();
+ return ((AbstractSelection) element).getStereotypedBy();
}
}
return null;
@@ -1345,8 +1351,8 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
protected CellEditor getCellEditor(Object element) {
- if(element instanceof AbstractSelection) {
- if(((AbstractSelection)element).getKind() == SelectionKind.FOR_ALL) {
+ if (element instanceof AbstractSelection) {
+ if (((AbstractSelection) element).getKind() == SelectionKind.FOR_ALL) {
return new TextCellEditor(forTree);
}
}
@@ -1365,16 +1371,16 @@ public class DiagramTemplateEditor extends EditorPart {
public void selectionChanged(SelectionChangedEvent event) {
ISelection selection = event.getSelection();
- if(selection != null && !selection.isEmpty()) {
+ if (selection != null && !selection.isEmpty()) {
whatTableViewer.setInput(selection);
whatTableViewer.refresh();
- if(selection instanceof IStructuredSelection) {
- Object selectionItem = ((IStructuredSelection)selection).getFirstElement();
- if(selectionItem instanceof AbstractSelection) {
- if(((AbstractSelection)selectionItem).getKind() == SelectionKind.FOR_ALL) {
+ if (selection instanceof IStructuredSelection) {
+ Object selectionItem = ((IStructuredSelection) selection).getFirstElement();
+ if (selectionItem instanceof AbstractSelection) {
+ if (((AbstractSelection) selectionItem).getKind() == SelectionKind.FOR_ALL) {
specificWhatButton.setEnabled(false);
- } else if(((AbstractSelection)selectionItem).getKind() == SelectionKind.SPECIFIC) {
+ } else if (((AbstractSelection) selectionItem).getKind() == SelectionKind.SPECIFIC) {
specificWhatButton.setEnabled(true);
}
}
@@ -1406,33 +1412,33 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = whatTableViewer.getSelection();
- if(selection != null) {
- if(selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ if (selection != null) {
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
- EReference eReference = (EReference)((IStructuredSelection)selection).getFirstElement();
+ EReference eReference = (EReference) ((IStructuredSelection) selection).getFirstElement();
ListSelectionDialog dlg = new ListSelectionDialog(getSite().getShell(), eReference, new TypesAvailableFromEReferenceContentProvider(), new AdapterFactoryLabelProvider(adapterFactory), Messages.DiagramTemplateEditor_99);
dlg.setTitle(Messages.DiagramTemplateEditor_100);
dlg.open();
ISelection forSelection = forTreeViewer.getSelection();
- if(forSelection != null) {
- if(forSelection instanceof ITreeSelection) {
+ if (forSelection != null) {
+ if (forSelection instanceof ITreeSelection) {
- AbstractSelection selectionItem = (AbstractSelection)((ITreeSelection)forSelection).getFirstElement();
- if(selectionItem != null) {
+ AbstractSelection selectionItem = (AbstractSelection) ((ITreeSelection) forSelection).getFirstElement();
+ if (selectionItem != null) {
Object[] results = dlg.getResult();
- if(results != null) {
+ if (results != null) {
- for(Object object : results) {
- if(object instanceof EClass) {
+ for (Object object : results) {
+ if (object instanceof EClass) {
- if(!containsElement((EClass)object, selectionItem.getSelectionRef())) {
+ if (!containsElement((EClass) object, selectionItem.getSelectionRef())) {
SelectionRef selectionRef = diagramtemplateFactory.createSelectionRef();
selectionRef.setKind(SelectionKind.FOR_ALL);
- selectionRef.setElement((EClass)object);
+ selectionRef.setElement((EClass) object);
selectionRef.setSubTypes(false);
selectionRef.setStereotypedBy(""); //$NON-NLS-1$
selectionRef.setEReference(eReference);
@@ -1466,25 +1472,25 @@ public class DiagramTemplateEditor extends EditorPart {
@Override
public void mouseUp(MouseEvent e) {
ISelection selection = whatTableViewer.getSelection();
- if(selection != null) {
- if(selection instanceof IStructuredSelection && !selection.isEmpty()) {
+ if (selection != null) {
+ if (selection instanceof IStructuredSelection && !selection.isEmpty()) {
ISelection forSelection = forTreeViewer.getSelection();
- if(forSelection != null) {
- if(forSelection instanceof ITreeSelection) {
+ if (forSelection != null) {
+ if (forSelection instanceof ITreeSelection) {
- AbstractSelection selectionItem = (AbstractSelection)((ITreeSelection)forSelection).getFirstElement();
- if(selectionItem != null) {
+ AbstractSelection selectionItem = (AbstractSelection) ((ITreeSelection) forSelection).getFirstElement();
+ if (selectionItem != null) {
- EReference eReference = (EReference)((IStructuredSelection)selection).getFirstElement();
+ EReference eReference = (EReference) ((IStructuredSelection) selection).getFirstElement();
Object value = selectionItem.getElement().eGet(eReference);
List<EObject> valueToShow = new ArrayList<EObject>();
- if(value instanceof List) {
- valueToShow.addAll((Collection<? extends EObject>)value);
- } else if(value instanceof EObject) {
- valueToShow.add((EObject)value);
+ if (value instanceof List) {
+ valueToShow.addAll((Collection<? extends EObject>) value);
+ } else if (value instanceof EObject) {
+ valueToShow.add((EObject) value);
}
ListSelectionDialog dlg = new ListSelectionDialog(getSite().getShell(), valueToShow, new ElementsAvailableContentProvider(), new AdapterFactoryLabelProvider(adapterFactory), Messages.DiagramTemplateEditor_108);
@@ -1492,16 +1498,16 @@ public class DiagramTemplateEditor extends EditorPart {
dlg.open();
Object[] results = dlg.getResult();
- if(results != null) {
+ if (results != null) {
- for(Object object : results) {
- if(object instanceof EObject) {
+ for (Object object : results) {
+ if (object instanceof EObject) {
- if(!containsElement((EObject)object, selectionItem.getSelectionRef())) {
+ if (!containsElement((EObject) object, selectionItem.getSelectionRef())) {
SelectionRef selectionRef = diagramtemplateFactory.createSelectionRef();
selectionRef.setKind(SelectionKind.SPECIFIC);
- selectionRef.setElement((EObject)object);
+ selectionRef.setElement((EObject) object);
selectionRef.setEReference(eReference);
selectionRef.setStereotypedBy(""); //$NON-NLS-1$
selectionRef.setSubTypes(false);
@@ -1533,8 +1539,8 @@ public class DiagramTemplateEditor extends EditorPart {
whatTableViewer.setLabelProvider(new AdapterFactoryLabelProvider(adapterFactory));
whatTable.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1));
- //Balance the sashForm
- selectionPartSashForm.setWeights(new int[]{ 1, 1 });
+ // Balance the sashForm
+ selectionPartSashForm.setWeights(new int[] { 1, 1 });
}
private void createEditionPart(Composite parent) {
@@ -1543,8 +1549,8 @@ public class DiagramTemplateEditor extends EditorPart {
createDiagramInformationPart(editionPartSashForm);
createSelectionPart(editionPartSashForm);
- //Balance the sashForm
- editionPartSashForm.setWeights(new int[]{ 1, 1 });
+ // Balance the sashForm
+ editionPartSashForm.setWeights(new int[] { 1, 1 });
}
private void createTemplatePart(Composite parent) {
@@ -1554,24 +1560,24 @@ public class DiagramTemplateEditor extends EditorPart {
createDiagramDefinitionPart(templatePartSashForm);
createEditionPart(templatePartSashForm);
- //Balance the sashForm
- templatePartSashForm.setWeights(new int[]{ 140, 808 });
+ // Balance the sashForm
+ templatePartSashForm.setWeights(new int[] { 140, 808 });
}
@Override
public void createPartControl(Composite parent) {
- if(createModel()) {
+ if (createModel()) {
parent.setLayout(new GridLayout(1, false));
createloadPart(parent);
createTemplatePart(parent);
- //Create the initial diagram definition
+ // Create the initial diagram definition
createNewDiagramDefinition();
- if(targetModelResource != null) {
+ if (targetModelResource != null) {
targetModelPathText.setText(targetModelResource.getURI().toString());
selectRootButton.setEnabled(true);
loadModelButton.setEnabled(false);
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditorPlugin.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditorPlugin.java
index 8816a182d7b..f3b008b595e 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditorPlugin.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateEditorPlugin.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -21,7 +21,7 @@ import org.eclipse.emf.common.util.ResourceLocator;
* This is the central singleton for the DiagramTemplate editor plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public final class DiagramTemplateEditorPlugin extends EMFPlugin {
@@ -30,7 +30,7 @@ public final class DiagramTemplateEditorPlugin extends EMFPlugin {
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public static final DiagramTemplateEditorPlugin INSTANCE = new DiagramTemplateEditorPlugin();
@@ -39,7 +39,7 @@ public final class DiagramTemplateEditorPlugin extends EMFPlugin {
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
private static Implementation plugin;
@@ -48,18 +48,18 @@ public final class DiagramTemplateEditorPlugin extends EMFPlugin {
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public DiagramTemplateEditorPlugin() {
- super(new ResourceLocator[]{});
+ super(new ResourceLocator[] {});
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the singleton instance.
* @generated
*/
@@ -72,7 +72,7 @@ public final class DiagramTemplateEditorPlugin extends EMFPlugin {
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @return the singleton instance.
* @generated
*/
@@ -84,7 +84,7 @@ public final class DiagramTemplateEditorPlugin extends EMFPlugin {
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public static class Implementation extends EclipseUIPlugin {
@@ -93,7 +93,7 @@ public final class DiagramTemplateEditorPlugin extends EMFPlugin {
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public Implementation() {
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateModelWizard.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateModelWizard.java
index 4bb55ed7d2d..313344fab90 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateModelWizard.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/DiagramTemplateModelWizard.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -63,7 +63,7 @@ import org.eclipse.ui.part.ISetSelectionTarget;
* This is a simple wizard for creating a new model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
@@ -72,7 +72,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* The supported extensions for created files.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public static final List<String> FILE_EXTENSIONS = Collections.unmodifiableList(Arrays.asList(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_DiagramTemplateEditorFilenameExtensions").split("\\s*,\\s*")));
@@ -81,7 +81,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* A formatted list of supported file extensions, suitable for display.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public static final String FORMATTED_FILE_EXTENSIONS = DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_DiagramTemplateEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
@@ -90,7 +90,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* This caches an instance of the model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected DiagramTemplatePackage diagramtemplatePackage = DiagramTemplatePackage.eINSTANCE;
@@ -99,7 +99,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* This caches an instance of the model factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected DiagramTemplateFactory diagramtemplateFactory = diagramtemplatePackage.getDiagramTemplateFactory();
@@ -108,25 +108,25 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* This is the file creation page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected DiagramTemplateModelWizardNewFileCreationPage newFileCreationPage;
- // /**
- // * This is the initial object creation page.
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected DiagramTemplateModelWizardInitialObjectCreationPage initialObjectCreationPage;
+ // /**
+ // * This is the initial object creation page.
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected DiagramTemplateModelWizardInitialObjectCreationPage initialObjectCreationPage;
/**
* Remember the selection during initialization for populating the default container.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IStructuredSelection selection;
@@ -135,7 +135,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* Remember the workbench during initialization.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected IWorkbench workbench;
@@ -144,7 +144,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* Caches the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected List<String> initialObjectNames;
@@ -153,7 +153,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
@@ -167,16 +167,16 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* Returns the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
protected Collection<String> getInitialObjectNames() {
- if(initialObjectNames == null) {
+ if (initialObjectNames == null) {
initialObjectNames = new ArrayList<String>();
- for(EClassifier eClassifier : diagramtemplatePackage.getEClassifiers()) {
- if(eClassifier instanceof EClass) {
- EClass eClass = (EClass)eClassifier;
- if(!eClass.isAbstract()) {
+ for (EClassifier eClassifier : diagramtemplatePackage.getEClassifiers()) {
+ if (eClassifier instanceof EClass) {
+ EClass eClass = (EClass) eClassifier;
+ if (!eClass.isAbstract()) {
initialObjectNames.add(eClass.getName());
}
}
@@ -190,11 +190,11 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* Create a new model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated NOT
*/
protected EObject createInitialModel() {
- EClass eClass = (EClass)diagramtemplatePackage.getTemplate();
+ EClass eClass = diagramtemplatePackage.getTemplate();
EObject rootObject = diagramtemplateFactory.create(eClass);
return rootObject;
}
@@ -203,7 +203,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* Do the work after everything is specified.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated NOT
*/
@Override
@@ -235,7 +235,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
// Add the initial model object to the contents.
//
EObject rootObject = createInitialModel();
- if(rootObject != null) {
+ if (rootObject != null) {
resource.getContents().add(rootObject);
}
@@ -259,12 +259,12 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
final IWorkbenchPart activePart = page.getActivePart();
- if(activePart instanceof ISetSelectionTarget) {
+ if (activePart instanceof ISetSelectionTarget) {
final ISelection targetSelection = new StructuredSelection(modelFile);
getShell().getDisplay().asyncExec(new Runnable() {
public void run() {
- ((ISetSelectionTarget)activePart).selectReveal(targetSelection);
+ ((ISetSelectionTarget) activePart).selectReveal(targetSelection);
}
});
}
@@ -289,7 +289,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* This is the one page of the wizard.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public class DiagramTemplateModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
@@ -298,7 +298,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* Pass in the selection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public DiagramTemplateModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
@@ -309,16 +309,16 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
* The framework calls this to see if the file is correct.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
@Override
protected boolean validatePage() {
- if(super.validatePage()) {
+ if (super.validatePage()) {
String extension = new Path(getFileName()).getFileExtension();
- if(extension == null || !FILE_EXTENSIONS.contains(extension)) {
+ if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
- setErrorMessage(DiagramTemplateEditorPlugin.INSTANCE.getString(key, new Object[]{ FORMATTED_FILE_EXTENSIONS }));
+ setErrorMessage(DiagramTemplateEditorPlugin.INSTANCE.getString(key, new Object[] { FORMATTED_FILE_EXTENSIONS }));
return false;
}
return true;
@@ -329,7 +329,7 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public IFile getModelFile() {
@@ -337,231 +337,231 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
}
}
- // /**
- // * This is the page where the type of object to create is selected.
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // public class DiagramTemplateModelWizardInitialObjectCreationPage extends WizardPage {
+ // /**
+ // * This is the page where the type of object to create is selected.
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // public class DiagramTemplateModelWizardInitialObjectCreationPage extends WizardPage {
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected Combo initialObjectField;
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected Combo initialObjectField;
//
- // /**
- // * @generated
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // */
- // protected List<String> encodings;
+ // /**
+ // * @generated
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // */
+ // protected List<String> encodings;
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected Combo encodingField;
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected Combo encodingField;
//
- // /**
- // * Pass in the selection.
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // public DiagramTemplateModelWizardInitialObjectCreationPage(String pageId) {
- // super(pageId);
- // }
+ // /**
+ // * Pass in the selection.
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // public DiagramTemplateModelWizardInitialObjectCreationPage(String pageId) {
+ // super(pageId);
+ // }
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // public void createControl(Composite parent) {
- // Composite composite = new Composite(parent, SWT.NONE);
- // {
- // GridLayout layout = new GridLayout();
- // layout.numColumns = 1;
- // layout.verticalSpacing = 12;
- // composite.setLayout(layout);
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // public void createControl(Composite parent) {
+ // Composite composite = new Composite(parent, SWT.NONE);
+ // {
+ // GridLayout layout = new GridLayout();
+ // layout.numColumns = 1;
+ // layout.verticalSpacing = 12;
+ // composite.setLayout(layout);
//
- // GridData data = new GridData();
- // data.verticalAlignment = GridData.FILL;
- // data.grabExcessVerticalSpace = true;
- // data.horizontalAlignment = GridData.FILL;
- // composite.setLayoutData(data);
- // }
+ // GridData data = new GridData();
+ // data.verticalAlignment = GridData.FILL;
+ // data.grabExcessVerticalSpace = true;
+ // data.horizontalAlignment = GridData.FILL;
+ // composite.setLayoutData(data);
+ // }
//
- // Label containerLabel = new Label(composite, SWT.LEFT);
- // {
- // containerLabel.setText(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
+ // Label containerLabel = new Label(composite, SWT.LEFT);
+ // {
+ // containerLabel.setText(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
//
- // GridData data = new GridData();
- // data.horizontalAlignment = GridData.FILL;
- // containerLabel.setLayoutData(data);
- // }
+ // GridData data = new GridData();
+ // data.horizontalAlignment = GridData.FILL;
+ // containerLabel.setLayoutData(data);
+ // }
//
- // initialObjectField = new Combo(composite, SWT.BORDER);
- // {
- // GridData data = new GridData();
- // data.horizontalAlignment = GridData.FILL;
- // data.grabExcessHorizontalSpace = true;
- // initialObjectField.setLayoutData(data);
- // }
+ // initialObjectField = new Combo(composite, SWT.BORDER);
+ // {
+ // GridData data = new GridData();
+ // data.horizontalAlignment = GridData.FILL;
+ // data.grabExcessHorizontalSpace = true;
+ // initialObjectField.setLayoutData(data);
+ // }
//
- // for(String objectName : getInitialObjectNames()) {
- // initialObjectField.add(getLabel(objectName));
- // }
+ // for(String objectName : getInitialObjectNames()) {
+ // initialObjectField.add(getLabel(objectName));
+ // }
//
- // if(initialObjectField.getItemCount() == 1) {
- // initialObjectField.select(0);
- // }
- // initialObjectField.addModifyListener(validator);
+ // if(initialObjectField.getItemCount() == 1) {
+ // initialObjectField.select(0);
+ // }
+ // initialObjectField.addModifyListener(validator);
//
- // Label encodingLabel = new Label(composite, SWT.LEFT);
- // {
- // encodingLabel.setText(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
+ // Label encodingLabel = new Label(composite, SWT.LEFT);
+ // {
+ // encodingLabel.setText(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
//
- // GridData data = new GridData();
- // data.horizontalAlignment = GridData.FILL;
- // encodingLabel.setLayoutData(data);
- // }
- // encodingField = new Combo(composite, SWT.BORDER);
- // {
- // GridData data = new GridData();
- // data.horizontalAlignment = GridData.FILL;
- // data.grabExcessHorizontalSpace = true;
- // encodingField.setLayoutData(data);
- // }
+ // GridData data = new GridData();
+ // data.horizontalAlignment = GridData.FILL;
+ // encodingLabel.setLayoutData(data);
+ // }
+ // encodingField = new Combo(composite, SWT.BORDER);
+ // {
+ // GridData data = new GridData();
+ // data.horizontalAlignment = GridData.FILL;
+ // data.grabExcessHorizontalSpace = true;
+ // encodingField.setLayoutData(data);
+ // }
//
- // for(String encoding : getEncodings()) {
- // encodingField.add(encoding);
- // }
+ // for(String encoding : getEncodings()) {
+ // encodingField.add(encoding);
+ // }
//
- // encodingField.select(0);
- // encodingField.addModifyListener(validator);
+ // encodingField.select(0);
+ // encodingField.addModifyListener(validator);
//
- // setPageComplete(validatePage());
- // setControl(composite);
- // }
+ // setPageComplete(validatePage());
+ // setControl(composite);
+ // }
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected ModifyListener validator = new ModifyListener() {
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected ModifyListener validator = new ModifyListener() {
//
- // public void modifyText(ModifyEvent e) {
- // setPageComplete(validatePage());
- // }
- // };
+ // public void modifyText(ModifyEvent e) {
+ // setPageComplete(validatePage());
+ // }
+ // };
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected boolean validatePage() {
- // return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
- // }
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected boolean validatePage() {
+ // return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
+ // }
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // @Override
- // public void setVisible(boolean visible) {
- // super.setVisible(visible);
- // if(visible) {
- // if(initialObjectField.getItemCount() == 1) {
- // initialObjectField.clearSelection();
- // encodingField.setFocus();
- // } else {
- // encodingField.clearSelection();
- // initialObjectField.setFocus();
- // }
- // }
- // }
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // @Override
+ // public void setVisible(boolean visible) {
+ // super.setVisible(visible);
+ // if(visible) {
+ // if(initialObjectField.getItemCount() == 1) {
+ // initialObjectField.clearSelection();
+ // encodingField.setFocus();
+ // } else {
+ // encodingField.clearSelection();
+ // initialObjectField.setFocus();
+ // }
+ // }
+ // }
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // public String getInitialObjectName() {
- // String label = initialObjectField.getText();
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // public String getInitialObjectName() {
+ // String label = initialObjectField.getText();
//
- // for(String name : getInitialObjectNames()) {
- // if(getLabel(name).equals(label)) {
- // return name;
- // }
- // }
- // return null;
- // }
+ // for(String name : getInitialObjectNames()) {
+ // if(getLabel(name).equals(label)) {
+ // return name;
+ // }
+ // }
+ // return null;
+ // }
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // public String getEncoding() {
- // return encodingField.getText();
- // }
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // public String getEncoding() {
+ // return encodingField.getText();
+ // }
//
- // /**
- // * Returns the label for the specified type name.
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected String getLabel(String typeName) {
- // try {
- // return DiagramTemplateEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
- // } catch (MissingResourceException mre) {
- // DiagramTemplateEditorPlugin.INSTANCE.log(mre);
- // }
- // return typeName;
- // }
+ // /**
+ // * Returns the label for the specified type name.
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected String getLabel(String typeName) {
+ // try {
+ // return DiagramTemplateEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
+ // } catch (MissingResourceException mre) {
+ // DiagramTemplateEditorPlugin.INSTANCE.log(mre);
+ // }
+ // return typeName;
+ // }
//
- // /**
- // * <!-- begin-user-doc -->
- // * <!-- end-user-doc -->
- // *
- // * @generated
- // */
- // protected Collection<String> getEncodings() {
- // if(encodings == null) {
- // encodings = new ArrayList<String>();
- // for(StringTokenizer stringTokenizer = new StringTokenizer(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens();) {
- // encodings.add(stringTokenizer.nextToken());
- // }
- // }
- // return encodings;
- // }
- // }
+ // /**
+ // * <!-- begin-user-doc -->
+ // * <!-- end-user-doc -->
+ // *
+ // * @generated
+ // */
+ // protected Collection<String> getEncodings() {
+ // if(encodings == null) {
+ // encodings = new ArrayList<String>();
+ // for(StringTokenizer stringTokenizer = new StringTokenizer(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens();) {
+ // encodings.add(stringTokenizer.nextToken());
+ // }
+ // }
+ // return encodings;
+ // }
+ // }
/**
* The framework calls this to create the contents of the wizard.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated NOT
*/
@Override
@@ -576,21 +576,21 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
// Try and get the resource selection to determine a current directory for the file dialog.
//
- if(selection != null && !selection.isEmpty()) {
+ if (selection != null && !selection.isEmpty()) {
// Get the resource...
//
Object selectedElement = selection.iterator().next();
- if(selectedElement instanceof IResource) {
+ if (selectedElement instanceof IResource) {
// Get the resource parent, if its a file.
//
- IResource selectedResource = (IResource)selectedElement;
- if(selectedResource.getType() == IResource.FILE) {
+ IResource selectedResource = (IResource) selectedElement;
+ if (selectedResource.getType() == IResource.FILE) {
selectedResource = selectedResource.getParent();
}
// This gives us a directory...
//
- if(selectedResource instanceof IFolder || selectedResource instanceof IProject) {
+ if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
// Set this for the container.
//
newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
@@ -600,24 +600,24 @@ public class DiagramTemplateModelWizard extends Wizard implements INewWizard {
String defaultModelBaseFilename = DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_DiagramTemplateEditorFilenameDefaultBase");
String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
- for(int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
+ for (int i = 1; ((IContainer) selectedResource).findMember(modelFilename) != null; ++i) {
modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
}
newFileCreationPage.setFileName(modelFilename);
}
}
}
- // initialObjectCreationPage = new DiagramTemplateModelWizardInitialObjectCreationPage("Whatever2");
- // initialObjectCreationPage.setTitle(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_DiagramTemplateModelWizard_label"));
- // initialObjectCreationPage.setDescription(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
- // addPage(initialObjectCreationPage);
+ // initialObjectCreationPage = new DiagramTemplateModelWizardInitialObjectCreationPage("Whatever2");
+ // initialObjectCreationPage.setTitle(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_DiagramTemplateModelWizard_label"));
+ // initialObjectCreationPage.setDescription(DiagramTemplateEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
+ // addPage(initialObjectCreationPage);
}
/**
* Get the file from the page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- *
+ *
* @generated
*/
public IFile getModelFile() {
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionContentProvider.java
index 37d92dd795b..7256837be16 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -19,9 +19,9 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
/**
- *
+ *
* Content provider for the diagram definition
- *
+ *
*/
public class DiagramDefinitionContentProvider implements IStructuredContentProvider {
@@ -37,8 +37,8 @@ public class DiagramDefinitionContentProvider implements IStructuredContentProvi
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof List<?>) {
- return ((List)inputElement).toArray();
+ if (inputElement instanceof List<?>) {
+ return ((List) inputElement).toArray();
}
return null;
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java
index 82936252503..4d46d6cd274 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramDefinitionLabelProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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,9 +22,9 @@ import org.eclipse.papyrus.diagramtemplate.DiagramDefinition;
import org.eclipse.swt.graphics.Image;
/**
- *
+ *
* Label provider for the diagram definition
- *
+ *
*/
public class DiagramDefinitionLabelProvider implements ILabelProvider {
@@ -64,11 +64,11 @@ public class DiagramDefinitionLabelProvider implements ILabelProvider {
* {@inheritDoc}
*/
public Image getImage(Object element) {
- if(element instanceof DiagramDefinition) {
- DiagramDefinition diagramDefinition = (DiagramDefinition)element;
+ if (element instanceof DiagramDefinition) {
+ DiagramDefinition diagramDefinition = (DiagramDefinition) element;
- for(CreationCommandDescriptor desc : getCreationCommandRegistry().getCommandDescriptors()) {
- if(diagramDefinition != null && diagramDefinition.getDiagramKind().equalsIgnoreCase(desc.getCommandId())) {
+ for (CreationCommandDescriptor desc : getCreationCommandRegistry().getCommandDescriptors()) {
+ if (diagramDefinition != null && diagramDefinition.getDiagramKind().equalsIgnoreCase(desc.getCommandId())) {
return desc.getIcon().createImage();
}
}
@@ -80,15 +80,15 @@ public class DiagramDefinitionLabelProvider implements ILabelProvider {
* {@inheritDoc}
*/
public String getText(Object element) {
- if(element instanceof DiagramDefinition) {
- return ((DiagramDefinition)element).getName();
+ if (element instanceof DiagramDefinition) {
+ return ((DiagramDefinition) element).getName();
}
return null;
}
/**
* Gets the creation command registry.
- *
+ *
* @return the creation command registry
*/
private ICreationCommandRegistry getCreationCommandRegistry() {
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java
index 16ae3abbd7d..cb9939e5500 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/DiagramKindContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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,22 +23,22 @@ import org.eclipse.papyrus.commands.CreationCommandRegistry;
import org.eclipse.papyrus.commands.ICreationCommandRegistry;
/**
- *
+ *
* Content provider for the diagram kinds
- *
+ *
*/
public class DiagramKindContentProvider implements IStructuredContentProvider {
/**
* @see org.eclipse.jface.viewers.IContentProvider#dispose()
- *
+ *
*/
public void dispose() {
}
/**
* @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
- *
+ *
* @param viewer
* @param oldInput
* @param newInput
@@ -48,17 +48,17 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
/**
* @see org.eclipse.jface.viewers.IStructuredContentProvider#getElements(java.lang.Object)
- *
+ *
* @param inputElement
*/
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof List) {
- List<String> categories = (List<String>)inputElement;
+ if (inputElement instanceof List) {
+ List<String> categories = (List<String>) inputElement;
List<CreationCommandDescriptor> result = new ArrayList<CreationCommandDescriptor>();
- for(CreationCommandDescriptor desc : getCreationCommandRegistry().getCommandDescriptors()) {
- for(String category : categories) {
- if(category.equalsIgnoreCase(desc.getLanguage())) {
+ for (CreationCommandDescriptor desc : getCreationCommandRegistry().getCommandDescriptors()) {
+ for (String category : categories) {
+ if (category.equalsIgnoreCase(desc.getLanguage())) {
result.add(desc);
break;
}
@@ -72,7 +72,7 @@ public class DiagramKindContentProvider implements IStructuredContentProvider {
/**
* Gets the creation command registry.
- *
+ *
* @return the creation command registry
*/
private ICreationCommandRegistry getCreationCommandRegistry() {
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ElementsAvailableContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ElementsAvailableContentProvider.java
index 73764677f42..62513bf7438 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ElementsAvailableContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ElementsAvailableContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -19,9 +19,9 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
/**
- *
+ *
* Content provider for the elements available
- *
+ *
*/
public class ElementsAvailableContentProvider implements IStructuredContentProvider {
@@ -36,8 +36,8 @@ public class ElementsAvailableContentProvider implements IStructuredContentProvi
}
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof List<?>) {
- return ((List)inputElement).toArray();
+ if (inputElement instanceof List<?>) {
+ return ((List) inputElement).toArray();
}
return null;
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForContentProvider.java
index 1a1c587b072..0936e81395f 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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,9 +22,9 @@ import org.eclipse.papyrus.diagramtemplate.Selection;
import org.eclipse.papyrus.diagramtemplate.SelectionRef;
/**
- *
+ *
* Content provider for the For selection
- *
+ *
*/
public class ForContentProvider implements ITreeContentProvider {
@@ -39,17 +39,17 @@ public class ForContentProvider implements ITreeContentProvider {
}
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof List<?>) {
- return ((List<Selection>)inputElement).toArray();
+ if (inputElement instanceof List<?>) {
+ return ((List<Selection>) inputElement).toArray();
}
return null;
}
public Object[] getChildren(Object parentElement) {
- if(parentElement instanceof AbstractSelection) {
- List<SelectionRef> itemRefList = ((AbstractSelection)parentElement).getSelectionRef();
- if(!itemRefList.isEmpty()) {
+ if (parentElement instanceof AbstractSelection) {
+ List<SelectionRef> itemRefList = ((AbstractSelection) parentElement).getSelectionRef();
+ if (!itemRefList.isEmpty()) {
return itemRefList.toArray();
}
}
@@ -63,8 +63,8 @@ public class ForContentProvider implements ITreeContentProvider {
}
public boolean hasChildren(Object element) {
- if(element instanceof AbstractSelection) {
- List<SelectionRef> itemRefList = ((AbstractSelection)element).getSelectionRef();
+ if (element instanceof AbstractSelection) {
+ List<SelectionRef> itemRefList = ((AbstractSelection) element).getSelectionRef();
return !itemRefList.isEmpty();
}
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForLabelProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForLabelProvider.java
index 0861ea91141..639d01047dc 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForLabelProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/ForLabelProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -28,9 +28,9 @@ import org.eclipse.uml2.uml.NamedElement;
import com.swtdesigner.ResourceManager;
/**
- *
+ *
* Label provider for the For selection
- *
+ *
*/
public class ForLabelProvider implements ITableLabelProvider {
@@ -38,28 +38,28 @@ public class ForLabelProvider implements ITableLabelProvider {
* {@inheritDoc}
*/
public Image getColumnImage(Object element, int columnIndex) {
- switch(columnIndex) {
+ switch (columnIndex) {
case 0:
- if(element instanceof SelectionRef) {
+ if (element instanceof SelectionRef) {
- if(((SelectionRef)element).getKind() == SelectionKind.FOR_ALL) {
+ if (((SelectionRef) element).getKind() == SelectionKind.FOR_ALL) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/forAllRef.png");
- } else if(((SelectionRef)element).getKind() == SelectionKind.SPECIFIC) {
+ } else if (((SelectionRef) element).getKind() == SelectionKind.SPECIFIC) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/specificRef.gif");
}
} else {
- if(((Selection)element).getKind() == SelectionKind.FOR_ALL) {
+ if (((Selection) element).getKind() == SelectionKind.FOR_ALL) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/forAll.png");
- } else if(((Selection)element).getKind() == SelectionKind.SPECIFIC) {
+ } else if (((Selection) element).getKind() == SelectionKind.SPECIFIC) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/specific.gif");
}
}
break;
case 1:
- if(element instanceof Selection) {
- if(((Selection)element).getKind() == SelectionKind.FOR_ALL) {
- if(((Selection)element).isRecursively()) {
+ if (element instanceof Selection) {
+ if (((Selection) element).getKind() == SelectionKind.FOR_ALL) {
+ if (((Selection) element).isRecursively()) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/checked.gif");
} else {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/unchecked.gif");
@@ -69,9 +69,9 @@ public class ForLabelProvider implements ITableLabelProvider {
break;
case 2:
- if(element instanceof AbstractSelection) {
- if(((AbstractSelection)element).getKind() == SelectionKind.FOR_ALL) {
- if(((AbstractSelection)element).isSubTypes()) {
+ if (element instanceof AbstractSelection) {
+ if (((AbstractSelection) element).getKind() == SelectionKind.FOR_ALL) {
+ if (((AbstractSelection) element).isSubTypes()) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/checked.gif");
} else {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/unchecked.gif");
@@ -95,21 +95,21 @@ public class ForLabelProvider implements ITableLabelProvider {
* {@inheritDoc}
*/
public String getColumnText(Object element, int columnIndex) {
- switch(columnIndex) {
+ switch (columnIndex) {
case 0:
- if(element instanceof SelectionRef) {
- EObject rootType = ((SelectionRef)element).getElement();
- if(rootType instanceof EClass) {
- return ((EClass)rootType).getName() + " - " + ((EReference)((SelectionRef)element).getEReference()).getName();
- } else if(rootType instanceof NamedElement) {
- return ((NamedElement)rootType).getName() + " (" + rootType.eClass().getName() + ") - " + ((EReference)((SelectionRef)element).getEReference()).getName();
+ if (element instanceof SelectionRef) {
+ EObject rootType = ((SelectionRef) element).getElement();
+ if (rootType instanceof EClass) {
+ return ((EClass) rootType).getName() + " - " + ((EReference) ((SelectionRef) element).getEReference()).getName();
+ } else if (rootType instanceof NamedElement) {
+ return ((NamedElement) rootType).getName() + " (" + rootType.eClass().getName() + ") - " + ((EReference) ((SelectionRef) element).getEReference()).getName();
}
- } else if(element instanceof Selection) {
- EObject rootType = ((Selection)element).getElement();
- if(rootType instanceof EClass) {
- return ((EClass)rootType).getName();
- } else if(rootType instanceof NamedElement) {
- return ((NamedElement)rootType).getName() + " (" + rootType.eClass().getName() + ")";
+ } else if (element instanceof Selection) {
+ EObject rootType = ((Selection) element).getElement();
+ if (rootType instanceof EClass) {
+ return ((EClass) rootType).getName();
+ } else if (rootType instanceof NamedElement) {
+ return ((NamedElement) rootType).getName() + " (" + rootType.eClass().getName() + ")";
}
}
@@ -121,9 +121,9 @@ public class ForLabelProvider implements ITableLabelProvider {
break;
case 3:
- if(element instanceof AbstractSelection) {
- if(((AbstractSelection)element).getKind() == SelectionKind.FOR_ALL) {
- return ((AbstractSelection)element).getStereotypedBy();
+ if (element instanceof AbstractSelection) {
+ if (((AbstractSelection) element).getKind() == SelectionKind.FOR_ALL) {
+ return ((AbstractSelection) element).getStereotypedBy();
}
}
break;
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java
index 8a6cb154128..a8f70221611 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesAvailableFromEReferenceContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -24,9 +24,9 @@ import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
/**
- *
+ *
* Content provider for the types available from a EReference
- *
+ *
*/
public class TypesAvailableFromEReferenceContentProvider implements IStructuredContentProvider {
@@ -41,18 +41,18 @@ public class TypesAvailableFromEReferenceContentProvider implements IStructuredC
}
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof EReference) {
+ if (inputElement instanceof EReference) {
List<EObject> results = new ArrayList<EObject>();
- results.add(((EReference)inputElement).getEReferenceType());
+ results.add(((EReference) inputElement).getEReferenceType());
- TreeIterator<EObject> it = ((EReference)inputElement).eResource().getAllContents();
- while(it.hasNext()) {
- EObject eObject = (EObject)it.next();
- if(eObject instanceof EClass) {
- List<EClass> superTypes = ((EClass)eObject).getEAllSuperTypes();
- if(superTypes.contains(((EReference)inputElement).getEReferenceType())) {
+ TreeIterator<EObject> it = ((EReference) inputElement).eResource().getAllContents();
+ while (it.hasNext()) {
+ EObject eObject = it.next();
+ if (eObject instanceof EClass) {
+ List<EClass> superTypes = ((EClass) eObject).getEAllSuperTypes();
+ if (superTypes.contains(((EReference) inputElement).getEReferenceType())) {
results.add(eObject);
}
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesContentProvider.java
index b2e328783ad..270adb7b45a 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/TypesContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -20,16 +20,16 @@ import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;
/**
- *
+ *
* Content provider for the types available
- *
+ *
*/
public class TypesContentProvider implements ITreeContentProvider {
public Object[] getElements(Object inputElement) {
- if(inputElement instanceof List) {
- return ((List<EObject>)inputElement).toArray();
+ if (inputElement instanceof List) {
+ return ((List<EObject>) inputElement).toArray();
}
return null;
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/WhatContentProvider.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/WhatContentProvider.java
index 5677e62876f..142501bd7f3 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/WhatContentProvider.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/editor/provider/WhatContentProvider.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -25,9 +25,9 @@ import org.eclipse.papyrus.diagramtemplate.AbstractSelection;
import org.eclipse.papyrus.diagramtemplate.SelectionKind;
/**
- *
+ *
* Content provider for the What selection
- *
+ *
*/
public class WhatContentProvider implements IStructuredContentProvider {
@@ -43,23 +43,23 @@ public class WhatContentProvider implements IStructuredContentProvider {
public Object[] getElements(Object inputElement) {
List<EReference> refsToShow = new ArrayList<EReference>();
- if(inputElement instanceof ITreeSelection) {
+ if (inputElement instanceof ITreeSelection) {
- Object firstElement = ((ITreeSelection)inputElement).getFirstElement();
+ Object firstElement = ((ITreeSelection) inputElement).getFirstElement();
- if(firstElement instanceof AbstractSelection) {
+ if (firstElement instanceof AbstractSelection) {
List<EReference> refs = null;
- if(((AbstractSelection)firstElement).getKind() == SelectionKind.FOR_ALL) {
- refs = ((EClass)((AbstractSelection)firstElement).getElement()).getEAllReferences();
- } else if(((AbstractSelection)firstElement).getKind() == SelectionKind.SPECIFIC) {
- refs = ((AbstractSelection)firstElement).getElement().eClass().getEAllReferences();
+ if (((AbstractSelection) firstElement).getKind() == SelectionKind.FOR_ALL) {
+ refs = ((EClass) ((AbstractSelection) firstElement).getElement()).getEAllReferences();
+ } else if (((AbstractSelection) firstElement).getKind() == SelectionKind.SPECIFIC) {
+ refs = ((AbstractSelection) firstElement).getElement().eClass().getEAllReferences();
}
- if(refs != null) {
- for(EReference eReference : refs) {
- if(!eReference.isDerived() && eReference.isContainment()) {
+ if (refs != null) {
+ for (EReference eReference : refs) {
+ if (!eReference.isDerived() && eReference.isContainment()) {
refsToShow.add(eReference);
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java
index 7c911454ea3..3593bdb87b4 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncher.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -79,7 +79,7 @@ import org.eclipse.uml2.uml.NamedElement;
/**
* The template launcher class
- *
+ *
*/
public class DiagramTemplateLauncher {
@@ -90,7 +90,7 @@ public class DiagramTemplateLauncher {
/**
* Enum used to report on diagram creation
- *
+ *
*/
public enum CreationReportKind {
SUCCESS, FAIL
@@ -125,12 +125,12 @@ public class DiagramTemplateLauncher {
/**
* Get the singleton
- *
+ *
* @return
* the DiagramTemplateLauncher singleton
*/
public final synchronized static DiagramTemplateLauncher getInstance() {
- if(instance == null) {
+ if (instance == null) {
instance = new DiagramTemplateLauncher();
}
return instance;
@@ -143,16 +143,16 @@ public class DiagramTemplateLauncher {
protected void initializeDiagramCategories() {
diagramCategories = new ArrayList<String>();
- for(DiagramCategoryDescriptor diagramCategoryDescriptor : DiagramCategoryRegistry.getInstance().getDiagramCategories()) {
+ for (DiagramCategoryDescriptor diagramCategoryDescriptor : DiagramCategoryRegistry.getInstance().getDiagramCategories()) {
diagramCategories.add(diagramCategoryDescriptor.getLabel());
}
}
/**
* Util method to get the CreationCommandDescriptor corresponding to a commandID
- *
+ *
* @param commandID
- * the commandID to find
+ * the commandID to find
* @return
* the corresponding CreationCommandDescriptor
*/
@@ -160,10 +160,10 @@ public class DiagramTemplateLauncher {
DiagramKindContentProvider provider = new DiagramKindContentProvider();
List<Object> diagramsKindlist = Arrays.asList(provider.getElements(diagramCategories));
- for(Object object : diagramsKindlist) {
- CreationCommandDescriptor command = (CreationCommandDescriptor)object;
+ for (Object object : diagramsKindlist) {
+ CreationCommandDescriptor command = (CreationCommandDescriptor) object;
- if(command.getCommandId().compareTo(commandID) == 0) {
+ if (command.getCommandId().compareTo(commandID) == 0) {
return command;
}
}
@@ -173,50 +173,50 @@ public class DiagramTemplateLauncher {
/**
* Used to recursively process the template definition. It identifies the newly create editpart and recurses on it
- *
+ *
* @param actualEditPart
- * the editpart elements was added to. It is used to find the newly create editpart
+ * the editpart elements was added to. It is used to find the newly create editpart
* @param elementToShow
- * the semantic element added
+ * the semantic element added
* @param selectionRef
- * the corresponding selectionRed
+ * the corresponding selectionRed
* @param activeEditor
- * the editor used
+ * the editor used
*/
protected void processRecursively(EditPart actualEditPart, EObject elementToShow, SelectionRef selectionRef, DiagramEditor activeEditor) {
- //Guess which of the View is the new one
+ // Guess which of the View is the new one
EditPartViewer viewer = actualEditPart.getViewer();
Map<?, ?> map = viewer.getEditPartRegistry();
- //We must have a copy since map may change during the loop
+ // We must have a copy since map may change during the loop
Map<?, ?> mapCopy = new HashMap<Object, Object>(map);
Iterator<?> it = mapCopy.keySet().iterator();
boolean found = false;
- while(it.hasNext() && !found) {
+ while (it.hasNext() && !found) {
Object view = it.next();
Object value = mapCopy.get(view);
- if(value instanceof GraphicalEditPart) {
+ if (value instanceof GraphicalEditPart) {
- GraphicalEditPart editPart = (GraphicalEditPart)value;
+ GraphicalEditPart editPart = (GraphicalEditPart) value;
// The element of the editPart and the element we just added must match
String editPartSemanticElementID = editPart.resolveSemanticElement().eResource().getURIFragment(editPart.resolveSemanticElement());
String elementToShowID = elementToShow.eResource().getURIFragment(elementToShow);
- if(editPartSemanticElementID.equals(elementToShowID)) {
+ if (editPartSemanticElementID.equals(elementToShowID)) {
- //The view should be the editpart whose parent's element is not the elementToShow
+ // The view should be the editpart whose parent's element is not the elementToShow
boolean foundParentWithElementToShowAsElement = false;
EditPart elementToProcess = editPart.getParent();
- while(elementToProcess != null && !foundParentWithElementToShowAsElement) {
+ while (elementToProcess != null && !foundParentWithElementToShowAsElement) {
- if(elementToProcess instanceof GraphicalEditPart) {
- String elementToProcessSemanticElementID = ((GraphicalEditPart)elementToProcess).resolveSemanticElement().eResource().getURIFragment(((GraphicalEditPart)elementToProcess).resolveSemanticElement());
- if(elementToProcessSemanticElementID.equals(elementToShowID)) {
+ if (elementToProcess instanceof GraphicalEditPart) {
+ String elementToProcessSemanticElementID = ((GraphicalEditPart) elementToProcess).resolveSemanticElement().eResource().getURIFragment(((GraphicalEditPart) elementToProcess).resolveSemanticElement());
+ if (elementToProcessSemanticElementID.equals(elementToShowID)) {
foundParentWithElementToShowAsElement = true;
}
}
@@ -224,15 +224,15 @@ public class DiagramTemplateLauncher {
elementToProcess = elementToProcess.getParent();
}
- if(!foundParentWithElementToShowAsElement) {
- //Last we must be sure that it is really new one
- if(!elementProcessed.contains(view)) {
- //We can process it
+ if (!foundParentWithElementToShowAsElement) {
+ // Last we must be sure that it is really new one
+ if (!elementProcessed.contains(view)) {
+ // We can process it
addElementsFor(selectionRef.getSelectionRef(), elementToShow, activeEditor, editPart);
// FIXME we may need to add all new elements as processed
- //Record that it is processed
- elementProcessed.add((View)view);
+ // Record that it is processed
+ elementProcessed.add((View) view);
found = true;
}
@@ -244,47 +244,47 @@ public class DiagramTemplateLauncher {
/**
* Find the element to show depending on a list and try to add them to a specific editPart
- *
+ *
* @param selectionList
- * The selection list of elements to add to the editPart
+ * The selection list of elements to add to the editPart
* @param root
- * The root to search the elements from
+ * The root to search the elements from
* @param activeEditor
- * the editor corresponding to the editPart
+ * the editor corresponding to the editPart
* @param editPartToShowIn
- * the editPart to show elements in
+ * the editPart to show elements in
*/
protected void addElementsFor(List<?> selectionList, EObject root, DiagramEditor activeEditor, EditPart editPartToShowIn) {
// Go through the SelectionRef
- for(Object object : selectionList) {
- if(object instanceof SelectionRef) {
- SelectionRef selectionRef = (SelectionRef)object;
+ for (Object object : selectionList) {
+ if (object instanceof SelectionRef) {
+ SelectionRef selectionRef = (SelectionRef) object;
// Retrieve the values
- Object result = root.eGet((EStructuralFeature)selectionRef.getEReference());
+ Object result = root.eGet((EStructuralFeature) selectionRef.getEReference());
List<EObject> resultsToProcess = new ArrayList<EObject>();
- if(result instanceof List) {
- resultsToProcess.addAll((Collection<? extends EObject>)result);
+ if (result instanceof List) {
+ resultsToProcess.addAll((Collection<? extends EObject>) result);
} else {
- resultsToProcess.add((EObject)result);
+ resultsToProcess.add((EObject) result);
}
- if(selectionRef.getKind() == SelectionKind.FOR_ALL) {
+ if (selectionRef.getKind() == SelectionKind.FOR_ALL) {
List<EObject> resultsToShow = new ArrayList<EObject>();
- //Try to match constraints
- for(EObject elementToMatch : resultsToProcess) {
- if(matchStereotypedBy(elementToMatch, selectionRef.getStereotypedBy())) {
- if(selectionRef.isSubTypes()) {
- //Consider all subtypes
- if(elementToMatch.eClass().getEAllSuperTypes().contains(selectionRef.getElement()) || elementToMatch.eClass() == selectionRef.getElement()) {
+ // Try to match constraints
+ for (EObject elementToMatch : resultsToProcess) {
+ if (matchStereotypedBy(elementToMatch, selectionRef.getStereotypedBy())) {
+ if (selectionRef.isSubTypes()) {
+ // Consider all subtypes
+ if (elementToMatch.eClass().getEAllSuperTypes().contains(selectionRef.getElement()) || elementToMatch.eClass() == selectionRef.getElement()) {
// It matches
resultsToShow.add(elementToMatch);
}
} else {
- if(elementToMatch.eClass() == selectionRef.getElement()) {
+ if (elementToMatch.eClass() == selectionRef.getElement()) {
// It matches
resultsToShow.add(elementToMatch);
}
@@ -294,7 +294,7 @@ public class DiagramTemplateLauncher {
// Process them all
int i = 0;
- for(EObject elementToShow : resultsToShow) {
+ for (EObject elementToShow : resultsToShow) {
EditPart actualEditPart = showElementIn(elementToShow, activeEditor, editPartToShowIn, i);
processRecursively(actualEditPart, elementToShow, selectionRef, activeEditor);
@@ -303,11 +303,11 @@ public class DiagramTemplateLauncher {
} else {
// FIXME Kind of very dirty
- for(EObject eObject : resultsToProcess) {
+ for (EObject eObject : resultsToProcess) {
String eObjectID = eObject.eResource().getURIFragment(eObject);
String elementID = selectionRef.getElement().eResource().getURIFragment(selectionRef.getElement());
- if(eObjectID.equals(elementID)) {
- // if(eObject == selectionRef.getElement()) {
+ if (eObjectID.equals(elementID)) {
+ // if(eObject == selectionRef.getElement()) {
EditPart actualEditPart = showElementIn(eObject, activeEditor, editPartToShowIn, 0);
processRecursively(actualEditPart, eObject, selectionRef, activeEditor);
}
@@ -319,32 +319,32 @@ public class DiagramTemplateLauncher {
/**
* Util method used to find all the children of a certain editpart
- *
+ *
* @param list
- * the children found recursively
+ * the children found recursively
* @param root
- * the root editpart to start the search from
+ * the root editpart to start the search from
*/
protected void findAllChildren(List<EditPart> list, EditPart root) {
list.addAll(root.getChildren());
- for(Object editPart : root.getChildren()) {
- if(editPart instanceof EditPart) {
- findAllChildren(list, (EditPart)editPart);
+ for (Object editPart : root.getChildren()) {
+ if (editPart instanceof EditPart) {
+ findAllChildren(list, (EditPart) editPart);
}
}
}
/**
* Try to show an element in an editPart (or its children)
- *
+ *
* @param elementToShow
- * the element to show
+ * the element to show
* @param activeEditor
- * the editor corresponding to the editPart
+ * the editor corresponding to the editPart
* @param editPart
- * the editPart to show the element in
+ * the editPart to show the element in
* @param position
- * position is used to try to distribute the drop
+ * position is used to try to distribute the drop
* @return
* the editPart in which the element has been actually added
*/
@@ -353,20 +353,20 @@ public class DiagramTemplateLauncher {
EditPart returnEditPart = null;
- if(elementToShow instanceof Element) {
+ if (elementToShow instanceof Element) {
DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
ArrayList<Element> list = new ArrayList<Element>();
- list.add((Element)elementToShow);
+ list.add((Element) elementToShow);
dropObjectsRequest.setObjects(list);
dropObjectsRequest.setLocation(new Point(20, 100 * position));
Command commandDrop = editPart.getCommand(dropObjectsRequest);
boolean processChildren = false;
- if(commandDrop == null) {
+ if (commandDrop == null) {
processChildren = true;
} else {
- if(commandDrop.canExecute()) {
+ if (commandDrop.canExecute()) {
activeEditor.getDiagramEditDomain().getDiagramCommandStack().execute(commandDrop);
returnEditPart = editPart;
creationReport.put(elementToShow, CreationReportKind.SUCCESS);
@@ -375,27 +375,27 @@ public class DiagramTemplateLauncher {
}
}
- if(processChildren) {
- //try to add to one of its children
+ if (processChildren) {
+ // try to add to one of its children
boolean found = false;
ArrayList<EditPart> childrenList = new ArrayList<EditPart>();
findAllChildren(childrenList, editPart);
- for(Object child : childrenList) {
- if(child instanceof EditPart) {
- Command commandDropChild = ((EditPart)child).getCommand(dropObjectsRequest);
- if(commandDropChild != null) {
- if(commandDropChild.canExecute()) {
+ for (Object child : childrenList) {
+ if (child instanceof EditPart) {
+ Command commandDropChild = ((EditPart) child).getCommand(dropObjectsRequest);
+ if (commandDropChild != null) {
+ if (commandDropChild.canExecute()) {
activeEditor.getDiagramEditDomain().getDiagramCommandStack().execute(commandDropChild);
found = true;
- returnEditPart = (EditPart)child;
+ returnEditPart = (EditPart) child;
creationReport.put(elementToShow, CreationReportKind.SUCCESS);
break;
}
}
}
}
- if(!found) {
+ if (!found) {
creationReport.put(elementToShow, CreationReportKind.FAIL);
returnEditPart = editPart;
}
@@ -407,24 +407,24 @@ public class DiagramTemplateLauncher {
/**
* Utils method that determine whether an element is stereotypedBy a certain stereotype qualiedName
- *
+ *
* @param element
- * the element to test
+ * the element to test
* @param stereotypedBy
- * the qulifiedName of the stereotype to match
+ * the qulifiedName of the stereotype to match
* @return
* true if matches false else.
*/
protected boolean matchStereotypedBy(EObject element, String stereotypedBy) {
- if(element instanceof Element) {
- //Read stereotypedBy
+ if (element instanceof Element) {
+ // Read stereotypedBy
stereotypedBy = stereotypedBy.replaceAll(" ", ""); //$NON-NLS-1$ //$NON-NLS-2$
String[] stereotypes = stereotypedBy.split(","); //$NON-NLS-1$
boolean matchStereotypes = true;
- for(String stereo : stereotypes) {
- if(stereo != null && stereo.length() > 0) {
- if(((Element)element).getAppliedStereotype(stereo) != null) {
+ for (String stereo : stereotypes) {
+ if (stereo != null && stereo.length() > 0) {
+ if (((Element) element).getAppliedStereotype(stereo) != null) {
matchStereotypes = true;
} else {
matchStereotypes = false;
@@ -441,43 +441,43 @@ public class DiagramTemplateLauncher {
/**
* Creates the diagrams in a specified Papyrus resource
- *
+ *
* @param selectionList
- * The selection for which we must create diagrams corresponding to the diagram definition
+ * The selection for which we must create diagrams corresponding to the diagram definition
* @param diagramDefinition
- * The diagram definition to create
+ * The diagram definition to create
* @param diResourceSet
- * The Papyrus resource to create the diagrams in
+ * The Papyrus resource to create the diagrams in
*/
protected void createDiagramFor(List<?> selectionList, DiagramDefinition diagramDefinition, ModelSet modelSet) {
- //Go through the selection and try to find elements in the target model that match
- for(Object object : selectionList) {
+ // Go through the selection and try to find elements in the target model that match
+ for (Object object : selectionList) {
- if(object instanceof AbstractSelection) {
- AbstractSelection selection = (AbstractSelection)object;
+ if (object instanceof AbstractSelection) {
+ AbstractSelection selection = (AbstractSelection) object;
CreationCommandDescriptor creationCommandDescriptor = getCreation(diagramDefinition.getDiagramKind());
- if(creationCommandDescriptor != null) {
+ if (creationCommandDescriptor != null) {
EObject root;
- //If the template is under specified, try to guess
- if(diagramDefinition.getFromRoot() == null) {
- root = ((Template)diagramDefinition.eContainer()).getTargetRoot();
+ // If the template is under specified, try to guess
+ if (diagramDefinition.getFromRoot() == null) {
+ root = ((Template) diagramDefinition.eContainer()).getTargetRoot();
} else {
root = diagramDefinition.getFromRoot();
}
- if(root != null) {
- if(selection.getKind() == SelectionKind.FOR_ALL) {
+ if (root != null) {
+ if (selection.getKind() == SelectionKind.FOR_ALL) {
// Find elements that match
List<EObject> content = new ArrayList<EObject>();
- if(selection instanceof Selection) {
- if(((Selection)selection).isRecursively()) {
- //Go through all recursively
+ if (selection instanceof Selection) {
+ if (((Selection) selection).isRecursively()) {
+ // Go through all recursively
TreeIterator<EObject> it = root.eAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject eObject = it.next();
content.add(eObject);
}
@@ -490,30 +490,30 @@ public class DiagramTemplateLauncher {
}
- for(EObject eObject : content) {
- if(matchStereotypedBy(eObject, selection.getStereotypedBy())) {
+ for (EObject eObject : content) {
+ if (matchStereotypedBy(eObject, selection.getStereotypedBy())) {
String name = diagramDefinition.getPrefix();
- if(eObject instanceof NamedElement) {
- name += ((NamedElement)eObject).getName();
+ if (eObject instanceof NamedElement) {
+ name += ((NamedElement) eObject).getName();
} else {
name += eObject.toString();
}
- if(selection.isSubTypes()) {
- //Consider all subtypes
- if(eObject.eClass().getEAllSuperTypes().contains(selection.getElement()) || eObject.eClass() == selection.getElement()) {
+ if (selection.isSubTypes()) {
+ // Consider all subtypes
+ if (eObject.eClass().getEAllSuperTypes().contains(selection.getElement()) || eObject.eClass() == selection.getElement()) {
// System.err.println("FoundForAll Sub: " + diagramDefinition.getName());
// It matches: create a diagram
try {
creationCommandDescriptor.getCommand().createDiagram(modelSet, eObject, name);
- //Identify the new diagram
+ // Identify the new diagram
TreeIterator<EObject> it = NotationUtils.getNotationResource(modelSet).getAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject diagram = it.next();
- if(diagram instanceof Diagram) {
- if(!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
+ if (diagram instanceof Diagram) {
+ if (!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
diagramsCreated.put(diagram.eResource().getURIFragment(diagram), selection);
diagramsInResource.add(diagram.eResource().getURIFragment(diagram));
@@ -528,19 +528,19 @@ public class DiagramTemplateLauncher {
}
}
} else {
- if(eObject.eClass() == selection.getElement()) {
+ if (eObject.eClass() == selection.getElement()) {
// System.err.println("FoundForAll Strict: " + diagramDefinition.getName());
// It matches: create a diagram
try {
creationCommandDescriptor.getCommand().createDiagram(modelSet, eObject, name);
- //Identify the new diagram
+ // Identify the new diagram
TreeIterator<EObject> it = NotationUtils.getNotationResource(modelSet).getAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject diagram = it.next();
- if(diagram instanceof Diagram) {
- if(!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
+ if (diagram instanceof Diagram) {
+ if (!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
diagramsCreated.put(diagram.eResource().getURIFragment(diagram), selection);
diagramsInResource.add(diagram.eResource().getURIFragment(diagram));
@@ -557,12 +557,12 @@ public class DiagramTemplateLauncher {
}
}
}
- } else if(selection.getKind() == SelectionKind.SPECIFIC) {
+ } else if (selection.getKind() == SelectionKind.SPECIFIC) {
// System.err.println("FoundSpecific");
String name = diagramDefinition.getPrefix();
- if(selection.getElement() instanceof NamedElement) {
- name += ((NamedElement)selection.getElement()).getName();
+ if (selection.getElement() instanceof NamedElement) {
+ name += ((NamedElement) selection.getElement()).getName();
} else {
name += selection.getElement().toString();
}
@@ -570,12 +570,12 @@ public class DiagramTemplateLauncher {
try {
creationCommandDescriptor.getCommand().createDiagram(modelSet, selection.getElement(), name);
- //Identify the new diagram
+ // Identify the new diagram
TreeIterator<EObject> it = NotationUtils.getNotationResource(modelSet).getAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject diagram = it.next();
- if(diagram instanceof Diagram) {
- if(!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
+ if (diagram instanceof Diagram) {
+ if (!diagramsInResource.contains(diagram.eResource().getURIFragment(diagram))) {
diagramsCreated.put(diagram.eResource().getURIFragment(diagram), selection);
diagramsInResource.add(diagram.eResource().getURIFragment(diagram));
@@ -596,20 +596,20 @@ public class DiagramTemplateLauncher {
/**
* Helper method used to arrange recursively editparts
- *
+ *
* @param editpart
- * the editpart to process
+ * the editpart to process
*/
protected void arrangeRecursively(EditPart editpart) {
- //ArrangeRequest request = new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL, LayoutType.DEFAULT);
+ // ArrangeRequest request = new ArrangeRequest(ActionIds.ACTION_ARRANGE_ALL, LayoutType.DEFAULT);
ArrangeRequest request = new ArrangeRequest(RequestConstants.REQ_ARRANGE_DEFERRED);
List<EditPart> listToArrange = new ArrayList<EditPart>();
listToArrange.addAll(editpart.getChildren());
- if(!listToArrange.isEmpty()) {
- for(Object element : editpart.getChildren()) {
- if(element instanceof EditPart) {
- arrangeRecursively((EditPart)element);
+ if (!listToArrange.isEmpty()) {
+ for (Object element : editpart.getChildren()) {
+ if (element instanceof EditPart) {
+ arrangeRecursively((EditPart) element);
}
}
@@ -622,9 +622,9 @@ public class DiagramTemplateLauncher {
/**
* This is the main method for the template launcher. Executes the template
- *
+ *
* @param template
- * The template to execute
+ * The template to execute
*/
public void execute(Template template) {
initializeDiagramCategories();
@@ -632,16 +632,16 @@ public class DiagramTemplateLauncher {
diagramsCreated = new HashMap<String, AbstractSelection>();
creationReport = new HashMap<EObject, CreationReportKind>();
- if(template != null) {
+ if (template != null) {
ModelSet modelSet = new DiResourceSet();
- if(template.getTargetRoot().eResource() != null) {
+ if (template.getTargetRoot().eResource() != null) {
String targetModelLocation = template.getTargetRoot().eResource().getURI().toPlatformString(false);
IFile targetModelfile = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(targetModelLocation));
IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(targetModelfile.getFullPath().removeFileExtension().toString() + ".di")); //$NON-NLS-1$
- if(file.exists()) {
+ if (file.exists()) {
try {
modelSet.loadModels(file);
@@ -655,26 +655,26 @@ public class DiagramTemplateLauncher {
try {
registry.startRegistry();
} catch (ServiceException ex) {
- //Ignore
+ // Ignore
}
- //Identify already available diagrams
+ // Identify already available diagrams
TreeIterator<EObject> it = NotationUtils.getNotationResource(modelSet).getAllContents();
- while(it.hasNext()) {
+ while (it.hasNext()) {
EObject diagram = it.next();
- if(diagram instanceof Diagram) {
+ if (diagram instanceof Diagram) {
diagramsInResource.add(diagram.eResource().getURIFragment(diagram));
}
}
// Create diagrams
- if(!template.getDiagramDefinitions().isEmpty()) {
- for(DiagramDefinition diagramDefinition : template.getDiagramDefinitions()) {
+ if (!template.getDiagramDefinitions().isEmpty()) {
+ for (DiagramDefinition diagramDefinition : template.getDiagramDefinitions()) {
createDiagramFor(diagramDefinition.getSelection(), diagramDefinition, modelSet);
}
} else {
// Create empty diagrams
- //EditorUtils.getTransactionalIPageMngr(DiModelUtils.getDiResource(modelSet), modelSet.getTransactionalEditingDomain());
+ // EditorUtils.getTransactionalIPageMngr(DiModelUtils.getDiResource(modelSet), modelSet.getTransactionalEditingDomain());
}
// Save the resource
@@ -688,7 +688,7 @@ public class DiagramTemplateLauncher {
try {
registry.disposeRegistry();
} catch (ServiceException ex) {
- //Ignore
+ // Ignore
}
} catch (ServiceException ex) {
@@ -698,12 +698,12 @@ public class DiagramTemplateLauncher {
// Open the editor
IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
- if(page != null) {
+ if (page != null) {
try {
final IEditorPart editor = IDE.openEditor(page, file, true);
- if(editor instanceof IMultiDiagramEditor) {
- final ServicesRegistry services = ((IMultiDiagramEditor)editor).getServicesRegistry();
+ if (editor instanceof IMultiDiagramEditor) {
+ final ServicesRegistry services = ((IMultiDiagramEditor) editor).getServicesRegistry();
TransactionalEditingDomain editingDomain = services.getService(TransactionalEditingDomain.class);
org.eclipse.emf.common.command.Command openPagesCommand = new RecordingCommand(editingDomain, "Open created pages") {
@@ -717,27 +717,27 @@ public class DiagramTemplateLauncher {
pageManager.closeAllOpenedPages();
// Go through the diagrams available in the resource
- for(Object pageDiagram : pageManager.allPages()) {
+ for (Object pageDiagram : pageManager.allPages()) {
- if(pageDiagram instanceof Diagram) {
- String pageID = ((Diagram)pageDiagram).eResource().getURIFragment((Diagram)pageDiagram);
+ if (pageDiagram instanceof Diagram) {
+ String pageID = ((Diagram) pageDiagram).eResource().getURIFragment((Diagram) pageDiagram);
- if(diagramsCreated.containsKey(pageID)) {
+ if (diagramsCreated.containsKey(pageID)) {
System.out.println("Open page");
pageManager.openPage(pageDiagram);
- IEditorPart activeEditor = ((PapyrusMultiDiagramEditor)editor).getActiveEditor();
+ IEditorPart activeEditor = ((PapyrusMultiDiagramEditor) editor).getActiveEditor();
- if(activeEditor instanceof DiagramEditor) {
+ if (activeEditor instanceof DiagramEditor) {
// Get the GraphicalViewer for this diagram
Object result = activeEditor.getAdapter(GraphicalViewer.class);
- if(result != null && result instanceof GraphicalViewer) {
- DiagramEditPart diagramEditPart = (DiagramEditPart)((GraphicalViewer)result).getEditPartRegistry().get(pageDiagram);
+ if (result != null && result instanceof GraphicalViewer) {
+ DiagramEditPart diagramEditPart = (DiagramEditPart) ((GraphicalViewer) result).getEditPartRegistry().get(pageDiagram);
// Retrieve the selection to show for this diagram
AbstractSelection selection = diagramsCreated.get(pageID);
- addElementsFor(selection.getSelectionRef(), ((Diagram)pageDiagram).getElement(), (DiagramEditor)activeEditor, diagramEditPart);
+ addElementsFor(selection.getSelectionRef(), ((Diagram) pageDiagram).getElement(), (DiagramEditor) activeEditor, diagramEditPart);
- //Arrange all recursively
+ // Arrange all recursively
arrangeRecursively(diagramEditPart);
}
@@ -756,7 +756,7 @@ public class DiagramTemplateLauncher {
editingDomain.getCommandStack().execute(openPagesCommand);
}
- //Report
+ // Report
DiagramTemplateLauncherReport.getInstance().showReport(creationReport);
} catch (PartInitException e) {
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncherReport.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncherReport.java
index 5132b46cb68..47dc59947ad 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncherReport.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor/src/org/eclipse/papyrus/diagramtemplate/launcher/DiagramTemplateLauncherReport.java
@@ -1,7 +1,7 @@
/*****************************************************************************
* 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
@@ -64,10 +64,10 @@ public class DiagramTemplateLauncherReport {
* {@inheritDoc}
*/
public Image getImage(Object element) {
- if(element instanceof Entry) {
- if(((Entry)element).getValue() == CreationReportKind.SUCCESS) {
+ if (element instanceof Entry) {
+ if (((Entry) element).getValue() == CreationReportKind.SUCCESS) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/add.gif"); //$NON-NLS-1$ //$NON-NLS-2$
- } else if(((Entry)element).getValue() == CreationReportKind.FAIL) {
+ } else if (((Entry) element).getValue() == CreationReportKind.FAIL) {
return ResourceManager.getPluginImage("org.eclipse.papyrus.diagramtemplate.editor", "icons/full/obj16/delete.gif"); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -78,11 +78,11 @@ public class DiagramTemplateLauncherReport {
* {@inheritDoc}
*/
public String getText(Object element) {
- if(element instanceof Entry) {
- Object key = ((Entry)element).getKey();
- String result = ((EObject)key).eResource().getURIFragment((EObject)key);
- if(key instanceof NamedElement) {
- result = ((NamedElement)key).getQualifiedName() + " (" + result + ")"; //$NON-NLS-1$ //$NON-NLS-2$
+ if (element instanceof Entry) {
+ Object key = ((Entry) element).getKey();
+ String result = ((EObject) key).eResource().getURIFragment((EObject) key);
+ if (key instanceof NamedElement) {
+ result = ((NamedElement) key).getQualifiedName() + " (" + result + ")"; //$NON-NLS-1$ //$NON-NLS-2$
}
return result;
}
@@ -97,17 +97,18 @@ public class DiagramTemplateLauncherReport {
}
public static final synchronized DiagramTemplateLauncherReport getInstance() {
- if(instance == null) {
+ if (instance == null) {
instance = new DiagramTemplateLauncherReport();
}
return instance;
- // return null;
+ // return null;
}
public void showReport(HashMap<EObject, CreationReportKind> report) {
- // ListSelectionDialog dlg = new ListSelectionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getSite().getShell(), report, new DiagramTemplateLauncherReportContentProvider(), new DiagramTemplateLauncherReportLabelProvider(), "Report");
- // dlg.open();
+ // ListSelectionDialog dlg = new ListSelectionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getSite().getShell(), report, new DiagramTemplateLauncherReportContentProvider(), new
+ // DiagramTemplateLauncherReportLabelProvider(), "Report");
+ // dlg.open();
ElementListSelectionDialog dlg = new ElementListSelectionDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor().getSite().getShell(), new DiagramTemplateLauncherReportLabelProvider());
dlg.setElements(report.entrySet().toArray());
dlg.setTitle(Messages.DiagramTemplateLauncherReport_6);
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/AbstractSelection.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/AbstractSelection.java
index b79c522e4b7..f8c8f71ab40 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/AbstractSelection.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/AbstractSelection.java
@@ -17,11 +17,11 @@ import org.eclipse.emf.ecore.EObject;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getElement <em>Element</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getSelectionRef <em>Selection Ref</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#isSubTypes <em>Sub Types</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getStereotypedBy <em>Stereotyped By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getSelectionRef <em>Selection Ref</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#isSubTypes <em>Sub Types</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getStereotypedBy <em>Stereotyped By</em>}</li>
* </ul>
* </p>
*
@@ -34,10 +34,10 @@ public interface AbstractSelection extends EObject {
* Returns the value of the '<em><b>Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Element</em>' reference isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Element</em>' reference isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Element</em>' reference.
* @see #setElement(EObject)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getAbstractSelection_Element()
@@ -50,7 +50,9 @@ public interface AbstractSelection extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getElement <em>Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Element</em>' reference.
+ *
+ * @param value
+ * the new value of the '<em>Element</em>' reference.
* @see #getElement()
* @generated
*/
@@ -61,10 +63,10 @@ public interface AbstractSelection extends EObject {
* The literals are from the enumeration {@link org.eclipse.papyrus.diagramtemplate.SelectionKind}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Kind</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Kind</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Kind</em>' attribute.
* @see org.eclipse.papyrus.diagramtemplate.SelectionKind
* @see #setKind(SelectionKind)
@@ -78,7 +80,9 @@ public interface AbstractSelection extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getKind <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Kind</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Kind</em>' attribute.
* @see org.eclipse.papyrus.diagramtemplate.SelectionKind
* @see #getKind()
* @generated
@@ -90,10 +94,10 @@ public interface AbstractSelection extends EObject {
* The list contents are of type {@link org.eclipse.papyrus.diagramtemplate.SelectionRef}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Selection Ref</em>' containment reference list isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Selection Ref</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>Selection Ref</em>' containment reference list.
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getAbstractSelection_SelectionRef()
* @model containment="true"
@@ -105,10 +109,10 @@ public interface AbstractSelection extends EObject {
* Returns the value of the '<em><b>Sub Types</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Sub Types</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Sub Types</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Sub Types</em>' attribute.
* @see #setSubTypes(boolean)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getAbstractSelection_SubTypes()
@@ -121,7 +125,9 @@ public interface AbstractSelection extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#isSubTypes <em>Sub Types</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Sub Types</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Sub Types</em>' attribute.
* @see #isSubTypes()
* @generated
*/
@@ -131,10 +137,10 @@ public interface AbstractSelection extends EObject {
* Returns the value of the '<em><b>Stereotyped By</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Stereotyped By</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Stereotyped By</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Stereotyped By</em>' attribute.
* @see #setStereotypedBy(String)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getAbstractSelection_StereotypedBy()
@@ -147,7 +153,9 @@ public interface AbstractSelection extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getStereotypedBy <em>Stereotyped By</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Stereotyped By</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Stereotyped By</em>' attribute.
* @see #getStereotypedBy()
* @generated
*/
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramDefinition.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramDefinition.java
index a3cb21d2a5d..e1aa5e76112 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramDefinition.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramDefinition.java
@@ -17,13 +17,13 @@ import org.eclipse.emf.ecore.EObject;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getFromRoot <em>From Root</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getSelection <em>Selection</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDiagramKind <em>Diagram Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getLayoutToApply <em>Layout To Apply</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getPrefix <em>Prefix</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getFromRoot <em>From Root</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getSelection <em>Selection</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDiagramKind <em>Diagram Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getLayoutToApply <em>Layout To Apply</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getPrefix <em>Prefix</em>}</li>
* </ul>
* </p>
*
@@ -36,10 +36,10 @@ public interface DiagramDefinition extends EObject {
* Returns the value of the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Description</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Description</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Description</em>' attribute.
* @see #setDescription(String)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_Description()
@@ -52,7 +52,9 @@ public interface DiagramDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDescription <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Description</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Description</em>' attribute.
* @see #getDescription()
* @generated
*/
@@ -62,10 +64,10 @@ public interface DiagramDefinition extends EObject {
* Returns the value of the '<em><b>From Root</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>From Root</em>' reference isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>From Root</em>' reference isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>From Root</em>' reference.
* @see #setFromRoot(EObject)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_FromRoot()
@@ -78,7 +80,9 @@ public interface DiagramDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getFromRoot <em>From Root</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>From Root</em>' reference.
+ *
+ * @param value
+ * the new value of the '<em>From Root</em>' reference.
* @see #getFromRoot()
* @generated
*/
@@ -89,10 +93,10 @@ public interface DiagramDefinition extends EObject {
* The list contents are of type {@link org.eclipse.papyrus.diagramtemplate.Selection}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Selection</em>' containment reference list isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Selection</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>Selection</em>' containment reference list.
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_Selection()
* @model containment="true"
@@ -104,10 +108,10 @@ public interface DiagramDefinition extends EObject {
* Returns the value of the '<em><b>Diagram Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Diagram Kind</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Diagram Kind</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Diagram Kind</em>' attribute.
* @see #setDiagramKind(String)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_DiagramKind()
@@ -120,7 +124,9 @@ public interface DiagramDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDiagramKind <em>Diagram Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Diagram Kind</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Diagram Kind</em>' attribute.
* @see #getDiagramKind()
* @generated
*/
@@ -130,10 +136,10 @@ public interface DiagramDefinition extends EObject {
* Returns the value of the '<em><b>Layout To Apply</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Layout To Apply</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Layout To Apply</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Layout To Apply</em>' attribute.
* @see #setLayoutToApply(String)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_LayoutToApply()
@@ -146,7 +152,9 @@ public interface DiagramDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getLayoutToApply <em>Layout To Apply</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Layout To Apply</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Layout To Apply</em>' attribute.
* @see #getLayoutToApply()
* @generated
*/
@@ -156,10 +164,10 @@ public interface DiagramDefinition extends EObject {
* Returns the value of the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Name</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * 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.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_Name()
@@ -172,7 +180,9 @@ public interface DiagramDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#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
*/
@@ -182,10 +192,10 @@ public interface DiagramDefinition extends EObject {
* Returns the value of the '<em><b>Prefix</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Prefix</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Prefix</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Prefix</em>' attribute.
* @see #setPrefix(String)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getDiagramDefinition_Prefix()
@@ -198,7 +208,9 @@ public interface DiagramDefinition extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getPrefix <em>Prefix</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Prefix</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Prefix</em>' attribute.
* @see #getPrefix()
* @generated
*/
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplateFactory.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplateFactory.java
index 34d5f702eeb..4821001018a 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplateFactory.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplateFactory.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.diagramtemplate.DiagramTemplatePackage
* @generated
*/
@@ -21,6 +22,7 @@ public interface DiagramTemplateFactory extends EFactory {
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
DiagramTemplateFactory eINSTANCE = org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplateFactoryImpl.init();
@@ -29,6 +31,7 @@ public interface DiagramTemplateFactory extends EFactory {
* Returns a new object of class '<em>Diagram Definition</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Diagram Definition</em>'.
* @generated
*/
@@ -38,6 +41,7 @@ public interface DiagramTemplateFactory extends EFactory {
* Returns a new object of class '<em>Selection</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Selection</em>'.
* @generated
*/
@@ -47,6 +51,7 @@ public interface DiagramTemplateFactory extends EFactory {
* Returns a new object of class '<em>Selection Ref</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Selection Ref</em>'.
* @generated
*/
@@ -56,6 +61,7 @@ public interface DiagramTemplateFactory extends EFactory {
* Returns a new object of class '<em>Template</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return a new object of class '<em>Template</em>'.
* @generated
*/
@@ -65,9 +71,10 @@ public interface DiagramTemplateFactory extends EFactory {
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the package supported by this factory.
* @generated
*/
DiagramTemplatePackage getDiagramTemplatePackage();
-} //DiagramTemplateFactory
+} // DiagramTemplateFactory
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplatePackage.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplatePackage.java
index 0530e201a61..204b8b93865 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplatePackage.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/DiagramTemplatePackage.java
@@ -17,12 +17,13 @@ import org.eclipse.emf.ecore.EReference;
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplateFactory
* @model kind="package"
* @generated
@@ -32,6 +33,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
String eNAME = "diagramtemplate";
@@ -40,6 +42,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_URI = "http://www.eclipse.org/papyrus/diagramtemplate";
@@ -48,6 +51,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
String eNS_PREFIX = "diagramtemplate";
@@ -56,6 +60,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
DiagramTemplatePackage eINSTANCE = org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl.init();
@@ -64,6 +69,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl <em>Diagram Definition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getDiagramDefinition()
* @generated
@@ -74,6 +80,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Description</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -83,6 +90,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>From Root</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -92,6 +100,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Selection</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -101,6 +110,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Diagram Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -110,6 +120,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Layout To Apply</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -119,6 +130,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Name</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -128,6 +140,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Prefix</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -137,6 +150,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The number of structural features of the '<em>Diagram Definition</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -146,6 +160,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl <em>Abstract Selection</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getAbstractSelection()
* @generated
@@ -156,6 +171,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Element</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -165,6 +181,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -174,6 +191,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Selection Ref</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -183,6 +201,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Sub Types</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -192,6 +211,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Stereotyped By</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -201,6 +221,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The number of structural features of the '<em>Abstract Selection</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -210,6 +231,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionImpl <em>Selection</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.SelectionImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getSelection()
* @generated
@@ -220,6 +242,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Element</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -229,6 +252,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -238,6 +262,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Selection Ref</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -247,6 +272,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Sub Types</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -256,6 +282,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Stereotyped By</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -265,6 +292,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Recursively</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -274,6 +302,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The number of structural features of the '<em>Selection</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -283,6 +312,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionRefImpl <em>Selection Ref</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.SelectionRefImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getSelectionRef()
* @generated
@@ -293,6 +323,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Element</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -302,6 +333,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Kind</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -311,6 +343,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Selection Ref</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -320,6 +353,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Sub Types</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -329,6 +363,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Stereotyped By</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -338,6 +373,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>EReference</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -347,6 +383,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The number of structural features of the '<em>Selection Ref</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -356,6 +393,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl <em>Template</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getTemplate()
* @generated
@@ -366,6 +404,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Diagram Definitions</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -375,6 +414,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The feature id for the '<em><b>Target Root</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -384,6 +424,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The number of structural features of the '<em>Template</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
* @ordered
*/
@@ -393,6 +434,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object id for the '{@link org.eclipse.papyrus.diagramtemplate.SelectionKind <em>Selection Kind</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.SelectionKind
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getSelectionKind()
* @generated
@@ -404,6 +446,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition <em>Diagram Definition</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Diagram Definition</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition
* @generated
@@ -414,6 +457,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDescription <em>Description</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Description</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDescription()
* @see #getDiagramDefinition()
@@ -425,6 +469,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the reference '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getFromRoot <em>From Root</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>From Root</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getFromRoot()
* @see #getDiagramDefinition()
@@ -436,6 +481,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getSelection <em>Selection</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Selection</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getSelection()
* @see #getDiagramDefinition()
@@ -447,6 +493,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDiagramKind <em>Diagram Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Diagram Kind</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getDiagramKind()
* @see #getDiagramDefinition()
@@ -458,6 +505,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getLayoutToApply <em>Layout To Apply</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Layout To Apply</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getLayoutToApply()
* @see #getDiagramDefinition()
@@ -469,6 +517,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getName <em>Name</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Name</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getName()
* @see #getDiagramDefinition()
@@ -480,6 +529,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getPrefix <em>Prefix</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Prefix</em>'.
* @see org.eclipse.papyrus.diagramtemplate.DiagramDefinition#getPrefix()
* @see #getDiagramDefinition()
@@ -491,6 +541,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.diagramtemplate.Selection <em>Selection</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Selection</em>'.
* @see org.eclipse.papyrus.diagramtemplate.Selection
* @generated
@@ -501,6 +552,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.Selection#isRecursively <em>Recursively</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Recursively</em>'.
* @see org.eclipse.papyrus.diagramtemplate.Selection#isRecursively()
* @see #getSelection()
@@ -512,6 +564,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.diagramtemplate.SelectionRef <em>Selection Ref</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Selection Ref</em>'.
* @see org.eclipse.papyrus.diagramtemplate.SelectionRef
* @generated
@@ -522,6 +575,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the reference '{@link org.eclipse.papyrus.diagramtemplate.SelectionRef#getEReference <em>EReference</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>EReference</em>'.
* @see org.eclipse.papyrus.diagramtemplate.SelectionRef#getEReference()
* @see #getSelectionRef()
@@ -533,6 +587,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.diagramtemplate.Template <em>Template</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Template</em>'.
* @see org.eclipse.papyrus.diagramtemplate.Template
* @generated
@@ -543,6 +598,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.diagramtemplate.Template#getDiagramDefinitions <em>Diagram Definitions</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Diagram Definitions</em>'.
* @see org.eclipse.papyrus.diagramtemplate.Template#getDiagramDefinitions()
* @see #getTemplate()
@@ -554,6 +610,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the reference '{@link org.eclipse.papyrus.diagramtemplate.Template#getTargetRoot <em>Target Root</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>Target Root</em>'.
* @see org.eclipse.papyrus.diagramtemplate.Template#getTargetRoot()
* @see #getTemplate()
@@ -565,6 +622,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for class '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection <em>Abstract Selection</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for class '<em>Abstract Selection</em>'.
* @see org.eclipse.papyrus.diagramtemplate.AbstractSelection
* @generated
@@ -575,6 +633,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the reference '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getElement <em>Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the reference '<em>Element</em>'.
* @see org.eclipse.papyrus.diagramtemplate.AbstractSelection#getElement()
* @see #getAbstractSelection()
@@ -586,6 +645,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getKind <em>Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Kind</em>'.
* @see org.eclipse.papyrus.diagramtemplate.AbstractSelection#getKind()
* @see #getAbstractSelection()
@@ -597,6 +657,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getSelectionRef <em>Selection Ref</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the containment reference list '<em>Selection Ref</em>'.
* @see org.eclipse.papyrus.diagramtemplate.AbstractSelection#getSelectionRef()
* @see #getAbstractSelection()
@@ -608,6 +669,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#isSubTypes <em>Sub Types</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Sub Types</em>'.
* @see org.eclipse.papyrus.diagramtemplate.AbstractSelection#isSubTypes()
* @see #getAbstractSelection()
@@ -619,6 +681,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for the attribute '{@link org.eclipse.papyrus.diagramtemplate.AbstractSelection#getStereotypedBy <em>Stereotyped By</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for the attribute '<em>Stereotyped By</em>'.
* @see org.eclipse.papyrus.diagramtemplate.AbstractSelection#getStereotypedBy()
* @see #getAbstractSelection()
@@ -630,6 +693,7 @@ public interface DiagramTemplatePackage extends EPackage {
* Returns the meta object for enum '{@link org.eclipse.papyrus.diagramtemplate.SelectionKind <em>Selection Kind</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @return the meta object for enum '<em>Selection Kind</em>'.
* @see org.eclipse.papyrus.diagramtemplate.SelectionKind
* @generated
@@ -640,6 +704,7 @@ public interface DiagramTemplatePackage 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
*/
@@ -649,12 +714,13 @@ public interface DiagramTemplatePackage extends EPackage {
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
- * <li>each class,</li>
- * <li>each feature of each class,</li>
- * <li>each enum,</li>
- * <li>and each data type</li>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
+ *
* @generated
*/
interface Literals {
@@ -662,6 +728,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl <em>Diagram Definition</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getDiagramDefinition()
* @generated
@@ -672,6 +739,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Description</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute DIAGRAM_DEFINITION__DESCRIPTION = eINSTANCE.getDiagramDefinition_Description();
@@ -680,6 +748,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>From Root</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference DIAGRAM_DEFINITION__FROM_ROOT = eINSTANCE.getDiagramDefinition_FromRoot();
@@ -688,6 +757,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Selection</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference DIAGRAM_DEFINITION__SELECTION = eINSTANCE.getDiagramDefinition_Selection();
@@ -696,6 +766,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Diagram Kind</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute DIAGRAM_DEFINITION__DIAGRAM_KIND = eINSTANCE.getDiagramDefinition_DiagramKind();
@@ -704,6 +775,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Layout To Apply</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute DIAGRAM_DEFINITION__LAYOUT_TO_APPLY = eINSTANCE.getDiagramDefinition_LayoutToApply();
@@ -712,6 +784,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Name</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute DIAGRAM_DEFINITION__NAME = eINSTANCE.getDiagramDefinition_Name();
@@ -720,6 +793,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Prefix</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute DIAGRAM_DEFINITION__PREFIX = eINSTANCE.getDiagramDefinition_Prefix();
@@ -728,6 +802,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionImpl <em>Selection</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.SelectionImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getSelection()
* @generated
@@ -738,6 +813,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Recursively</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute SELECTION__RECURSIVELY = eINSTANCE.getSelection_Recursively();
@@ -746,6 +822,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionRefImpl <em>Selection Ref</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.SelectionRefImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getSelectionRef()
* @generated
@@ -756,6 +833,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>EReference</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference SELECTION_REF__EREFERENCE = eINSTANCE.getSelectionRef_EReference();
@@ -764,6 +842,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl <em>Template</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getTemplate()
* @generated
@@ -774,6 +853,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Diagram Definitions</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference TEMPLATE__DIAGRAM_DEFINITIONS = eINSTANCE.getTemplate_DiagramDefinitions();
@@ -782,6 +862,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Target Root</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference TEMPLATE__TARGET_ROOT = eINSTANCE.getTemplate_TargetRoot();
@@ -790,6 +871,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl <em>Abstract Selection</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getAbstractSelection()
* @generated
@@ -800,6 +882,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Element</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference ABSTRACT_SELECTION__ELEMENT = eINSTANCE.getAbstractSelection_Element();
@@ -808,6 +891,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Kind</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute ABSTRACT_SELECTION__KIND = eINSTANCE.getAbstractSelection_Kind();
@@ -816,6 +900,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Selection Ref</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EReference ABSTRACT_SELECTION__SELECTION_REF = eINSTANCE.getAbstractSelection_SelectionRef();
@@ -824,6 +909,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Sub Types</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute ABSTRACT_SELECTION__SUB_TYPES = eINSTANCE.getAbstractSelection_SubTypes();
@@ -832,6 +918,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '<em><b>Stereotyped By</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
EAttribute ABSTRACT_SELECTION__STEREOTYPED_BY = eINSTANCE.getAbstractSelection_StereotypedBy();
@@ -840,6 +927,7 @@ public interface DiagramTemplatePackage extends EPackage {
* The meta object literal for the '{@link org.eclipse.papyrus.diagramtemplate.SelectionKind <em>Selection Kind</em>}' enum.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.SelectionKind
* @see org.eclipse.papyrus.diagramtemplate.impl.DiagramTemplatePackageImpl#getSelectionKind()
* @generated
@@ -848,4 +936,4 @@ public interface DiagramTemplatePackage extends EPackage {
}
-} //DiagramTemplatePackage
+} // DiagramTemplatePackage
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Selection.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Selection.java
index fa1b6286f4b..6e9753d1fcd 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Selection.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Selection.java
@@ -15,7 +15,7 @@ package org.eclipse.papyrus.diagramtemplate;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.Selection#isRecursively <em>Recursively</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.Selection#isRecursively <em>Recursively</em>}</li>
* </ul>
* </p>
*
@@ -28,10 +28,10 @@ public interface Selection extends AbstractSelection {
* Returns the value of the '<em><b>Recursively</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Recursively</em>' attribute isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Recursively</em>' attribute isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Recursively</em>' attribute.
* @see #setRecursively(boolean)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getSelection_Recursively()
@@ -44,7 +44,9 @@ public interface Selection extends AbstractSelection {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.Selection#isRecursively <em>Recursively</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Recursively</em>' attribute.
+ *
+ * @param value
+ * the new value of the '<em>Recursively</em>' attribute.
* @see #isRecursively()
* @generated
*/
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionKind.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionKind.java
index be902715263..cd7239e3712 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionKind.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionKind.java
@@ -17,6 +17,7 @@ import org.eclipse.emf.common.util.Enumerator;
* A representation of the literals of the enumeration '<em><b>Selection Kind</b></em>',
* and utility methods for working with them.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getSelectionKind()
* @model
* @generated
@@ -26,6 +27,7 @@ public enum SelectionKind implements Enumerator {
* The '<em><b>For All</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #FOR_ALL_VALUE
* @generated
* @ordered
@@ -36,6 +38,7 @@ public enum SelectionKind implements Enumerator {
* The '<em><b>Specific</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #SPECIFIC_VALUE
* @generated
* @ordered
@@ -46,6 +49,7 @@ public enum SelectionKind implements Enumerator {
* The '<em><b>Query</b></em>' literal object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #QUERY_VALUE
* @generated
* @ordered
@@ -56,10 +60,10 @@ public enum SelectionKind implements Enumerator {
* The '<em><b>For All</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>For All</b></em>' literal object isn't clear,
- * there really should be more of a description here...
+ * If the meaning of '<em><b>For All</b></em>' literal object isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @see #FOR_ALL
* @model name="ForAll"
* @generated
@@ -71,10 +75,10 @@ public enum SelectionKind implements Enumerator {
* The '<em><b>Specific</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Specific</b></em>' literal object isn't clear,
- * there really should be more of a description here...
+ * If the meaning of '<em><b>Specific</b></em>' literal object isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @see #SPECIFIC
* @model name="Specific"
* @generated
@@ -86,10 +90,10 @@ public enum SelectionKind implements Enumerator {
* The '<em><b>Query</b></em>' literal value.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of '<em><b>Query</b></em>' literal object isn't clear,
- * there really should be more of a description here...
+ * If the meaning of '<em><b>Query</b></em>' literal object isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @see #QUERY
* @model name="Query"
* @generated
@@ -101,19 +105,21 @@ public enum SelectionKind implements Enumerator {
* An array of all the '<em><b>Selection Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private static final SelectionKind[] VALUES_ARRAY =
- new SelectionKind[] {
- FOR_ALL,
- SPECIFIC,
- QUERY,
- };
+ new SelectionKind[] {
+ FOR_ALL,
+ SPECIFIC,
+ QUERY,
+ };
/**
* A public read-only list of all the '<em><b>Selection Kind</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static final List<SelectionKind> VALUES = Collections.unmodifiableList(Arrays.asList(VALUES_ARRAY));
@@ -122,6 +128,7 @@ public enum SelectionKind implements Enumerator {
* Returns the '<em><b>Selection Kind</b></em>' literal with the specified literal value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static SelectionKind get(String literal) {
@@ -138,6 +145,7 @@ public enum SelectionKind implements Enumerator {
* Returns the '<em><b>Selection Kind</b></em>' literal with the specified name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static SelectionKind getByName(String name) {
@@ -154,13 +162,17 @@ public enum SelectionKind implements Enumerator {
* Returns the '<em><b>Selection Kind</b></em>' literal with the specified integer value.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static SelectionKind get(int value) {
switch (value) {
- case FOR_ALL_VALUE: return FOR_ALL;
- case SPECIFIC_VALUE: return SPECIFIC;
- case QUERY_VALUE: return QUERY;
+ case FOR_ALL_VALUE:
+ return FOR_ALL;
+ case SPECIFIC_VALUE:
+ return SPECIFIC;
+ case QUERY_VALUE:
+ return QUERY;
}
return null;
}
@@ -168,6 +180,7 @@ public enum SelectionKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private final int value;
@@ -175,6 +188,7 @@ public enum SelectionKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private final String name;
@@ -182,6 +196,7 @@ public enum SelectionKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private final String literal;
@@ -190,6 +205,7 @@ public enum SelectionKind implements Enumerator {
* Only this class can construct instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private SelectionKind(int value, String name, String literal) {
@@ -201,39 +217,43 @@ public enum SelectionKind implements Enumerator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public int getValue() {
- return value;
+ return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getName() {
- return name;
+ return name;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getLiteral() {
- return literal;
+ return literal;
}
/**
* Returns the literal value of the enumerator, which is its string representation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public String toString() {
return literal;
}
-
-} //SelectionKind
+
+} // SelectionKind
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionRef.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionRef.java
index 49f20832620..f0a7424e270 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionRef.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/SelectionRef.java
@@ -16,7 +16,7 @@ import org.eclipse.emf.ecore.EObject;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.SelectionRef#getEReference <em>EReference</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.SelectionRef#getEReference <em>EReference</em>}</li>
* </ul>
* </p>
*
@@ -29,10 +29,10 @@ public interface SelectionRef extends AbstractSelection {
* Returns the value of the '<em><b>EReference</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>EReference</em>' reference isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>EReference</em>' reference isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>EReference</em>' reference.
* @see #setEReference(EObject)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getSelectionRef_EReference()
@@ -45,7 +45,9 @@ public interface SelectionRef extends AbstractSelection {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.SelectionRef#getEReference <em>EReference</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>EReference</em>' reference.
+ *
+ * @param value
+ * the new value of the '<em>EReference</em>' reference.
* @see #getEReference()
* @generated
*/
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Template.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Template.java
index ee440dc0c8f..8bb6047d8bf 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Template.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/Template.java
@@ -17,8 +17,8 @@ import org.eclipse.emf.ecore.EObject;
* <p>
* The following features are supported:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.Template#getDiagramDefinitions <em>Diagram Definitions</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.Template#getTargetRoot <em>Target Root</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.Template#getDiagramDefinitions <em>Diagram Definitions</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.Template#getTargetRoot <em>Target Root</em>}</li>
* </ul>
* </p>
*
@@ -32,10 +32,10 @@ public interface Template extends EObject {
* The list contents are of type {@link org.eclipse.papyrus.diagramtemplate.DiagramDefinition}.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Diagram Definitions</em>' containment reference list isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Diagram Definitions</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>Diagram Definitions</em>' containment reference list.
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getTemplate_DiagramDefinitions()
* @model containment="true"
@@ -47,10 +47,10 @@ public interface Template extends EObject {
* Returns the value of the '<em><b>Target Root</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
- * If the meaning of the '<em>Target Root</em>' reference isn't clear,
- * there really should be more of a description here...
+ * If the meaning of the '<em>Target Root</em>' reference isn't clear, there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
+ *
* @return the value of the '<em>Target Root</em>' reference.
* @see #setTargetRoot(EObject)
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage#getTemplate_TargetRoot()
@@ -63,7 +63,9 @@ public interface Template extends EObject {
* Sets the value of the '{@link org.eclipse.papyrus.diagramtemplate.Template#getTargetRoot <em>Target Root</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param value the new value of the '<em>Target Root</em>' reference.
+ *
+ * @param value
+ * the new value of the '<em>Target Root</em>' reference.
* @see #getTargetRoot()
* @generated
*/
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/AbstractSelectionImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/AbstractSelectionImpl.java
index 442b3adc42b..115b261cc2c 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/AbstractSelectionImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/AbstractSelectionImpl.java
@@ -30,11 +30,11 @@ import org.eclipse.papyrus.diagramtemplate.SelectionRef;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getElement <em>Element</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getKind <em>Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getSelectionRef <em>Selection Ref</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#isSubTypes <em>Sub Types</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getStereotypedBy <em>Stereotyped By</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getElement <em>Element</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getKind <em>Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getSelectionRef <em>Selection Ref</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#isSubTypes <em>Sub Types</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.AbstractSelectionImpl#getStereotypedBy <em>Stereotyped By</em>}</li>
* </ul>
* </p>
*
@@ -45,6 +45,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The cached value of the '{@link #getElement() <em>Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getElement()
* @generated
* @ordered
@@ -55,6 +56,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The default value of the '{@link #getKind() <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getKind()
* @generated
* @ordered
@@ -65,6 +67,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The cached value of the '{@link #getKind() <em>Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getKind()
* @generated
* @ordered
@@ -75,6 +78,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The cached value of the '{@link #getSelectionRef() <em>Selection Ref</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getSelectionRef()
* @generated
* @ordered
@@ -85,6 +89,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The default value of the '{@link #isSubTypes() <em>Sub Types</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #isSubTypes()
* @generated
* @ordered
@@ -95,6 +100,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The cached value of the '{@link #isSubTypes() <em>Sub Types</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #isSubTypes()
* @generated
* @ordered
@@ -105,6 +111,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The default value of the '{@link #getStereotypedBy() <em>Stereotyped By</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getStereotypedBy()
* @generated
* @ordered
@@ -115,6 +122,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
* The cached value of the '{@link #getStereotypedBy() <em>Stereotyped By</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getStereotypedBy()
* @generated
* @ordered
@@ -124,6 +132,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected AbstractSelectionImpl() {
@@ -133,6 +142,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -143,15 +153,17 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject getElement() {
if (element != null && element.eIsProxy()) {
- InternalEObject oldElement = (InternalEObject)element;
+ InternalEObject oldElement = (InternalEObject) element;
element = eResolveProxy(oldElement);
if (element != oldElement) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT, oldElement, element));
+ }
}
}
return element;
@@ -160,6 +172,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject basicGetElement() {
@@ -169,18 +182,21 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setElement(EObject newElement) {
EObject oldElement = element;
element = newElement;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT, oldElement, element));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public SelectionKind getKind() {
@@ -190,18 +206,21 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setKind(SelectionKind newKind) {
SelectionKind oldKind = kind;
kind = newKind == null ? KIND_EDEFAULT : newKind;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.ABSTRACT_SELECTION__KIND, oldKind, kind));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<SelectionRef> getSelectionRef() {
@@ -214,6 +233,7 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public boolean isSubTypes() {
@@ -223,18 +243,21 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setSubTypes(boolean newSubTypes) {
boolean oldSubTypes = subTypes;
subTypes = newSubTypes;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES, oldSubTypes, subTypes));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getStereotypedBy() {
@@ -244,25 +267,28 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setStereotypedBy(String newStereotypedBy) {
String oldStereotypedBy = stereotypedBy;
stereotypedBy = newStereotypedBy;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY, oldStereotypedBy, stereotypedBy));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
- return ((InternalEList<?>)getSelectionRef()).basicRemove(otherEnd, msgs);
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
+ return ((InternalEList<?>) getSelectionRef()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -270,22 +296,25 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
- if (resolve) return getElement();
- return basicGetElement();
- case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
- return getKind();
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
- return getSelectionRef();
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
- return isSubTypes();
- case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
- return getStereotypedBy();
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
+ if (resolve) {
+ return getElement();
+ }
+ return basicGetElement();
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
+ return getKind();
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
+ return getSelectionRef();
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
+ return isSubTypes();
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
+ return getStereotypedBy();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -293,28 +322,29 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
- setElement((EObject)newValue);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
- setKind((SelectionKind)newValue);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
- getSelectionRef().clear();
- getSelectionRef().addAll((Collection<? extends SelectionRef>)newValue);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
- setSubTypes((Boolean)newValue);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
- setStereotypedBy((String)newValue);
- return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
+ setElement((EObject) newValue);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
+ setKind((SelectionKind) newValue);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
+ getSelectionRef().clear();
+ getSelectionRef().addAll((Collection<? extends SelectionRef>) newValue);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
+ setSubTypes((Boolean) newValue);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
+ setStereotypedBy((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -322,26 +352,27 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
- setElement((EObject)null);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
- setKind(KIND_EDEFAULT);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
- getSelectionRef().clear();
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
- setSubTypes(SUB_TYPES_EDEFAULT);
- return;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
- setStereotypedBy(STEREOTYPED_BY_EDEFAULT);
- return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
+ setElement((EObject) null);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
+ setKind(KIND_EDEFAULT);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
+ getSelectionRef().clear();
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
+ setSubTypes(SUB_TYPES_EDEFAULT);
+ return;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
+ setStereotypedBy(STEREOTYPED_BY_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -349,21 +380,22 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
- return element != null;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
- return kind != KIND_EDEFAULT;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
- return selectionRef != null && !selectionRef.isEmpty();
- case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
- return subTypes != SUB_TYPES_EDEFAULT;
- case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
- return STEREOTYPED_BY_EDEFAULT == null ? stereotypedBy != null : !STEREOTYPED_BY_EDEFAULT.equals(stereotypedBy);
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__ELEMENT:
+ return element != null;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__KIND:
+ return kind != KIND_EDEFAULT;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SELECTION_REF:
+ return selectionRef != null && !selectionRef.isEmpty();
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__SUB_TYPES:
+ return subTypes != SUB_TYPES_EDEFAULT;
+ case DiagramTemplatePackage.ABSTRACT_SELECTION__STEREOTYPED_BY:
+ return STEREOTYPED_BY_EDEFAULT == null ? stereotypedBy != null : !STEREOTYPED_BY_EDEFAULT.equals(stereotypedBy);
}
return super.eIsSet(featureID);
}
@@ -371,11 +403,14 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
/**
* <!-- 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(" (kind: ");
@@ -388,4 +423,4 @@ public abstract class AbstractSelectionImpl extends EObjectImpl implements Abstr
return result.toString();
}
-} //AbstractSelectionImpl
+} // AbstractSelectionImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramDefinitionImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramDefinitionImpl.java
index 872f9e224e9..72178350913 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramDefinitionImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramDefinitionImpl.java
@@ -29,13 +29,13 @@ import org.eclipse.papyrus.diagramtemplate.Selection;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getDescription <em>Description</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getFromRoot <em>From Root</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getSelection <em>Selection</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getDiagramKind <em>Diagram Kind</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getLayoutToApply <em>Layout To Apply</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getName <em>Name</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getPrefix <em>Prefix</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getDescription <em>Description</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getFromRoot <em>From Root</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getSelection <em>Selection</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getDiagramKind <em>Diagram Kind</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getLayoutToApply <em>Layout To Apply</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getName <em>Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.DiagramDefinitionImpl#getPrefix <em>Prefix</em>}</li>
* </ul>
* </p>
*
@@ -46,6 +46,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The default value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getDescription()
* @generated
* @ordered
@@ -56,6 +57,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getDescription() <em>Description</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getDescription()
* @generated
* @ordered
@@ -66,6 +68,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getFromRoot() <em>From Root</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getFromRoot()
* @generated
* @ordered
@@ -76,6 +79,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getSelection() <em>Selection</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getSelection()
* @generated
* @ordered
@@ -86,6 +90,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The default value of the '{@link #getDiagramKind() <em>Diagram Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getDiagramKind()
* @generated
* @ordered
@@ -96,6 +101,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getDiagramKind() <em>Diagram Kind</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getDiagramKind()
* @generated
* @ordered
@@ -106,6 +112,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The default value of the '{@link #getLayoutToApply() <em>Layout To Apply</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getLayoutToApply()
* @generated
* @ordered
@@ -116,6 +123,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getLayoutToApply() <em>Layout To Apply</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getLayoutToApply()
* @generated
* @ordered
@@ -126,6 +134,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The default value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getName()
* @generated
* @ordered
@@ -136,6 +145,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getName() <em>Name</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getName()
* @generated
* @ordered
@@ -146,6 +156,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The default value of the '{@link #getPrefix() <em>Prefix</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getPrefix()
* @generated
* @ordered
@@ -156,6 +167,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
* The cached value of the '{@link #getPrefix() <em>Prefix</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getPrefix()
* @generated
* @ordered
@@ -165,6 +177,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected DiagramDefinitionImpl() {
@@ -174,6 +187,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -184,6 +198,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getDescription() {
@@ -193,27 +208,31 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setDescription(String newDescription) {
String oldDescription = description;
description = newDescription;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION, oldDescription, description));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject getFromRoot() {
if (fromRoot != null && fromRoot.eIsProxy()) {
- InternalEObject oldFromRoot = (InternalEObject)fromRoot;
+ InternalEObject oldFromRoot = (InternalEObject) fromRoot;
fromRoot = eResolveProxy(oldFromRoot);
if (fromRoot != oldFromRoot) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT, oldFromRoot, fromRoot));
+ }
}
}
return fromRoot;
@@ -222,6 +241,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject basicGetFromRoot() {
@@ -231,18 +251,21 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setFromRoot(EObject newFromRoot) {
EObject oldFromRoot = fromRoot;
fromRoot = newFromRoot;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT, oldFromRoot, fromRoot));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<Selection> getSelection() {
@@ -255,6 +278,7 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getDiagramKind() {
@@ -264,18 +288,21 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setDiagramKind(String newDiagramKind) {
String oldDiagramKind = diagramKind;
diagramKind = newDiagramKind;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND, oldDiagramKind, diagramKind));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getLayoutToApply() {
@@ -285,18 +312,21 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setLayoutToApply(String newLayoutToApply) {
String oldLayoutToApply = layoutToApply;
layoutToApply = newLayoutToApply;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY, oldLayoutToApply, layoutToApply));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getName() {
@@ -306,18 +336,21 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- 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, DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME, oldName, name));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String getPrefix() {
@@ -327,25 +360,28 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setPrefix(String newPrefix) {
String oldPrefix = prefix;
prefix = newPrefix;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX, oldPrefix, prefix));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
- return ((InternalEList<?>)getSelection()).basicRemove(otherEnd, msgs);
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
+ return ((InternalEList<?>) getSelection()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -353,26 +389,29 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
- return getDescription();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
- if (resolve) return getFromRoot();
- return basicGetFromRoot();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
- return getSelection();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
- return getDiagramKind();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
- return getLayoutToApply();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
- return getName();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
- return getPrefix();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
+ return getDescription();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
+ if (resolve) {
+ return getFromRoot();
+ }
+ return basicGetFromRoot();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
+ return getSelection();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
+ return getDiagramKind();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
+ return getLayoutToApply();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
+ return getName();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
+ return getPrefix();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -380,34 +419,35 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
- setDescription((String)newValue);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
- setFromRoot((EObject)newValue);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
- getSelection().clear();
- getSelection().addAll((Collection<? extends Selection>)newValue);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
- setDiagramKind((String)newValue);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
- setLayoutToApply((String)newValue);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
- setName((String)newValue);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
- setPrefix((String)newValue);
- return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
+ setDescription((String) newValue);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
+ setFromRoot((EObject) newValue);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
+ getSelection().clear();
+ getSelection().addAll((Collection<? extends Selection>) newValue);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
+ setDiagramKind((String) newValue);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
+ setLayoutToApply((String) newValue);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
+ setName((String) newValue);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
+ setPrefix((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -415,32 +455,33 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
- setDescription(DESCRIPTION_EDEFAULT);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
- setFromRoot((EObject)null);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
- getSelection().clear();
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
- setDiagramKind(DIAGRAM_KIND_EDEFAULT);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
- setLayoutToApply(LAYOUT_TO_APPLY_EDEFAULT);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
- setName(NAME_EDEFAULT);
- return;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
- setPrefix(PREFIX_EDEFAULT);
- return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
+ setDescription(DESCRIPTION_EDEFAULT);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
+ setFromRoot((EObject) null);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
+ getSelection().clear();
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
+ setDiagramKind(DIAGRAM_KIND_EDEFAULT);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
+ setLayoutToApply(LAYOUT_TO_APPLY_EDEFAULT);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
+ setName(NAME_EDEFAULT);
+ return;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
+ setPrefix(PREFIX_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -448,25 +489,26 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
- return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
- return fromRoot != null;
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
- return selection != null && !selection.isEmpty();
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
- return DIAGRAM_KIND_EDEFAULT == null ? diagramKind != null : !DIAGRAM_KIND_EDEFAULT.equals(diagramKind);
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
- return LAYOUT_TO_APPLY_EDEFAULT == null ? layoutToApply != null : !LAYOUT_TO_APPLY_EDEFAULT.equals(layoutToApply);
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
- case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
- return PREFIX_EDEFAULT == null ? prefix != null : !PREFIX_EDEFAULT.equals(prefix);
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DESCRIPTION:
+ return DESCRIPTION_EDEFAULT == null ? description != null : !DESCRIPTION_EDEFAULT.equals(description);
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__FROM_ROOT:
+ return fromRoot != null;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__SELECTION:
+ return selection != null && !selection.isEmpty();
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__DIAGRAM_KIND:
+ return DIAGRAM_KIND_EDEFAULT == null ? diagramKind != null : !DIAGRAM_KIND_EDEFAULT.equals(diagramKind);
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__LAYOUT_TO_APPLY:
+ return LAYOUT_TO_APPLY_EDEFAULT == null ? layoutToApply != null : !LAYOUT_TO_APPLY_EDEFAULT.equals(layoutToApply);
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION__PREFIX:
+ return PREFIX_EDEFAULT == null ? prefix != null : !PREFIX_EDEFAULT.equals(prefix);
}
return super.eIsSet(featureID);
}
@@ -474,11 +516,14 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
/**
* <!-- 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(" (description: ");
@@ -495,4 +540,4 @@ public class DiagramDefinitionImpl extends EObjectImpl implements DiagramDefinit
return result.toString();
}
-} //DiagramDefinitionImpl
+} // DiagramDefinitionImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplateFactoryImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplateFactoryImpl.java
index 4a6bfec6a0a..6ee4427754d 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplateFactoryImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplateFactoryImpl.java
@@ -24,6 +24,7 @@ import org.eclipse.papyrus.diagramtemplate.Template;
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
+ *
* @generated
*/
public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramTemplateFactory {
@@ -31,16 +32,16 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public static DiagramTemplateFactory init() {
try {
- DiagramTemplateFactory theDiagramTemplateFactory = (DiagramTemplateFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/diagramtemplate");
+ DiagramTemplateFactory theDiagramTemplateFactory = (DiagramTemplateFactory) EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/diagramtemplate");
if (theDiagramTemplateFactory != null) {
return theDiagramTemplateFactory;
}
- }
- catch (Exception exception) {
+ } catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new DiagramTemplateFactoryImpl();
@@ -50,6 +51,7 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplateFactoryImpl() {
@@ -59,53 +61,61 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION: return createDiagramDefinition();
- case DiagramTemplatePackage.SELECTION: return createSelection();
- case DiagramTemplatePackage.SELECTION_REF: return createSelectionRef();
- case DiagramTemplatePackage.TEMPLATE: return createTemplate();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION:
+ return createDiagramDefinition();
+ case DiagramTemplatePackage.SELECTION:
+ return createSelection();
+ case DiagramTemplatePackage.SELECTION_REF:
+ return createSelectionRef();
+ case DiagramTemplatePackage.TEMPLATE:
+ return createTemplate();
+ 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 DiagramTemplatePackage.SELECTION_KIND:
- return createSelectionKindFromString(eDataType, initialValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case DiagramTemplatePackage.SELECTION_KIND:
+ return createSelectionKindFromString(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 DiagramTemplatePackage.SELECTION_KIND:
- return convertSelectionKindToString(eDataType, instanceValue);
- default:
- throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ case DiagramTemplatePackage.SELECTION_KIND:
+ return convertSelectionKindToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramDefinition createDiagramDefinition() {
@@ -116,6 +126,7 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public Selection createSelection() {
@@ -126,6 +137,7 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public SelectionRef createSelectionRef() {
@@ -136,6 +148,7 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public Template createTemplate() {
@@ -146,17 +159,21 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public SelectionKind createSelectionKindFromString(EDataType eDataType, String initialValue) {
SelectionKind result = SelectionKind.get(initialValue);
- if (result == null) throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ if (result == null) {
+ throw new IllegalArgumentException("The value '" + initialValue + "' is not a valid enumerator of '" + eDataType.getName() + "'");
+ }
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public String convertSelectionKindToString(EDataType eDataType, Object instanceValue) {
@@ -166,15 +183,17 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplatePackage getDiagramTemplatePackage() {
- return (DiagramTemplatePackage)getEPackage();
+ return (DiagramTemplatePackage) getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @deprecated
* @generated
*/
@@ -183,4 +202,4 @@ public class DiagramTemplateFactoryImpl extends EFactoryImpl implements DiagramT
return DiagramTemplatePackage.eINSTANCE;
}
-} //DiagramTemplateFactoryImpl
+} // DiagramTemplateFactoryImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplatePackageImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplatePackageImpl.java
index 95900e7b7fc..537e292e51a 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplatePackageImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/DiagramTemplatePackageImpl.java
@@ -25,12 +25,14 @@ import org.eclipse.papyrus.diagramtemplate.Template;
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
+ *
* @generated
*/
public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramTemplatePackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass diagramDefinitionEClass = null;
@@ -38,6 +40,7 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass selectionEClass = null;
@@ -45,6 +48,7 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass selectionRefEClass = null;
@@ -52,6 +56,7 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass templateEClass = null;
@@ -59,6 +64,7 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EClass abstractSelectionEClass = null;
@@ -66,20 +72,17 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
private EEnum selectionKindEEnum = 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.diagramtemplate.DiagramTemplatePackage#eNS_URI
* @see #init()
@@ -92,27 +95,30 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- 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 DiagramTemplatePackage#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 DiagramTemplatePackage#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 DiagramTemplatePackage init() {
- if (isInited) return (DiagramTemplatePackage)EPackage.Registry.INSTANCE.getEPackage(DiagramTemplatePackage.eNS_URI);
+ if (isInited) {
+ return (DiagramTemplatePackage) EPackage.Registry.INSTANCE.getEPackage(DiagramTemplatePackage.eNS_URI);
+ }
// Obtain or create and register package
- DiagramTemplatePackageImpl theDiagramTemplatePackage = (DiagramTemplatePackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DiagramTemplatePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DiagramTemplatePackageImpl());
+ DiagramTemplatePackageImpl theDiagramTemplatePackage = (DiagramTemplatePackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof DiagramTemplatePackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new DiagramTemplatePackageImpl());
isInited = true;
@@ -125,7 +131,7 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
// Mark meta-data to indicate it can't be changed
theDiagramTemplatePackage.freeze();
-
+
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(DiagramTemplatePackage.eNS_URI, theDiagramTemplatePackage);
return theDiagramTemplatePackage;
@@ -134,6 +140,7 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getDiagramDefinition() {
@@ -143,69 +150,77 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getDiagramDefinition_Description() {
- return (EAttribute)diagramDefinitionEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) diagramDefinitionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getDiagramDefinition_FromRoot() {
- return (EReference)diagramDefinitionEClass.getEStructuralFeatures().get(1);
+ return (EReference) diagramDefinitionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getDiagramDefinition_Selection() {
- return (EReference)diagramDefinitionEClass.getEStructuralFeatures().get(2);
+ return (EReference) diagramDefinitionEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getDiagramDefinition_DiagramKind() {
- return (EAttribute)diagramDefinitionEClass.getEStructuralFeatures().get(3);
+ return (EAttribute) diagramDefinitionEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getDiagramDefinition_LayoutToApply() {
- return (EAttribute)diagramDefinitionEClass.getEStructuralFeatures().get(4);
+ return (EAttribute) diagramDefinitionEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getDiagramDefinition_Name() {
- return (EAttribute)diagramDefinitionEClass.getEStructuralFeatures().get(5);
+ return (EAttribute) diagramDefinitionEClass.getEStructuralFeatures().get(5);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getDiagramDefinition_Prefix() {
- return (EAttribute)diagramDefinitionEClass.getEStructuralFeatures().get(6);
+ return (EAttribute) diagramDefinitionEClass.getEStructuralFeatures().get(6);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getSelection() {
@@ -215,15 +230,17 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getSelection_Recursively() {
- return (EAttribute)selectionEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) selectionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getSelectionRef() {
@@ -233,15 +250,17 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getSelectionRef_EReference() {
- return (EReference)selectionRefEClass.getEStructuralFeatures().get(0);
+ return (EReference) selectionRefEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getTemplate() {
@@ -251,24 +270,27 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getTemplate_DiagramDefinitions() {
- return (EReference)templateEClass.getEStructuralFeatures().get(0);
+ return (EReference) templateEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getTemplate_TargetRoot() {
- return (EReference)templateEClass.getEStructuralFeatures().get(1);
+ return (EReference) templateEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EClass getAbstractSelection() {
@@ -278,51 +300,57 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getAbstractSelection_Element() {
- return (EReference)abstractSelectionEClass.getEStructuralFeatures().get(0);
+ return (EReference) abstractSelectionEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getAbstractSelection_Kind() {
- return (EAttribute)abstractSelectionEClass.getEStructuralFeatures().get(1);
+ return (EAttribute) abstractSelectionEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EReference getAbstractSelection_SelectionRef() {
- return (EReference)abstractSelectionEClass.getEStructuralFeatures().get(2);
+ return (EReference) abstractSelectionEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getAbstractSelection_SubTypes() {
- return (EAttribute)abstractSelectionEClass.getEStructuralFeatures().get(3);
+ return (EAttribute) abstractSelectionEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EAttribute getAbstractSelection_StereotypedBy() {
- return (EAttribute)abstractSelectionEClass.getEStructuralFeatures().get(4);
+ return (EAttribute) abstractSelectionEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EEnum getSelectionKind() {
@@ -332,28 +360,33 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplateFactory getDiagramTemplateFactory() {
- return (DiagramTemplateFactory)getEFactoryInstance();
+ return (DiagramTemplateFactory) 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
@@ -390,19 +423,23 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
/**
* <!-- 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
@@ -421,8 +458,10 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
// Initialize classes and features; add operations and parameters
initEClass(diagramDefinitionEClass, DiagramDefinition.class, "DiagramDefinition", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getDiagramDefinition_Description(), ecorePackage.getEString(), "description", null, 1, 1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getDiagramDefinition_FromRoot(), ecorePackage.getEObject(), null, "fromRoot", null, 0, 1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getDiagramDefinition_Selection(), this.getSelection(), null, "selection", null, 0, -1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getDiagramDefinition_FromRoot(), ecorePackage.getEObject(), null, "fromRoot", null, 0, 1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+ initEReference(getDiagramDefinition_Selection(), this.getSelection(), null, "selection", null, 0, -1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEAttribute(getDiagramDefinition_DiagramKind(), ecorePackage.getEString(), "diagramKind", null, 0, 1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getDiagramDefinition_LayoutToApply(), ecorePackage.getEString(), "layoutToApply", null, 0, 1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getDiagramDefinition_Name(), ecorePackage.getEString(), "name", null, 1, 1, DiagramDefinition.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -432,16 +471,20 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
initEAttribute(getSelection_Recursively(), ecorePackage.getEBoolean(), "recursively", null, 1, 1, Selection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(selectionRefEClass, SelectionRef.class, "SelectionRef", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getSelectionRef_EReference(), ecorePackage.getEObject(), null, "eReference", null, 0, 1, SelectionRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getSelectionRef_EReference(), ecorePackage.getEObject(), null, "eReference", null, 0, 1, SelectionRef.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEClass(templateEClass, Template.class, "Template", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getTemplate_DiagramDefinitions(), this.getDiagramDefinition(), null, "diagramDefinitions", null, 0, -1, Template.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getTemplate_DiagramDefinitions(), this.getDiagramDefinition(), null, "diagramDefinitions", null, 0, -1, Template.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
initEReference(getTemplate_TargetRoot(), ecorePackage.getEObject(), null, "targetRoot", null, 0, 1, Template.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(abstractSelectionEClass, AbstractSelection.class, "AbstractSelection", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getAbstractSelection_Element(), ecorePackage.getEObject(), null, "element", null, 0, 1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAbstractSelection_Element(), ecorePackage.getEObject(), null, "element", null, 0, 1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEAttribute(getAbstractSelection_Kind(), this.getSelectionKind(), "kind", null, 1, 1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getAbstractSelection_SelectionRef(), this.getSelectionRef(), null, "selectionRef", null, 0, -1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getAbstractSelection_SelectionRef(), this.getSelectionRef(), null, "selectionRef", null, 0, -1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
initEAttribute(getAbstractSelection_SubTypes(), ecorePackage.getEBoolean(), "subTypes", null, 1, 1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getAbstractSelection_StereotypedBy(), ecorePackage.getEString(), "stereotypedBy", null, 1, 1, AbstractSelection.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -455,4 +498,4 @@ public class DiagramTemplatePackageImpl extends EPackageImpl implements DiagramT
createResource(eNS_URI);
}
-} //DiagramTemplatePackageImpl
+} // DiagramTemplatePackageImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionImpl.java
index 5a92456ddb4..91be5261689 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionImpl.java
@@ -19,7 +19,7 @@ import org.eclipse.papyrus.diagramtemplate.Selection;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionImpl#isRecursively <em>Recursively</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionImpl#isRecursively <em>Recursively</em>}</li>
* </ul>
* </p>
*
@@ -30,6 +30,7 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
* The default value of the '{@link #isRecursively() <em>Recursively</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #isRecursively()
* @generated
* @ordered
@@ -40,6 +41,7 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
* The cached value of the '{@link #isRecursively() <em>Recursively</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #isRecursively()
* @generated
* @ordered
@@ -49,6 +51,7 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected SelectionImpl() {
@@ -58,6 +61,7 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -68,6 +72,7 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public boolean isRecursively() {
@@ -77,25 +82,28 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setRecursively(boolean newRecursively) {
boolean oldRecursively = recursively;
recursively = newRecursively;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.SELECTION__RECURSIVELY, oldRecursively, recursively));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION__RECURSIVELY:
- return isRecursively();
+ case DiagramTemplatePackage.SELECTION__RECURSIVELY:
+ return isRecursively();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -103,14 +111,15 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION__RECURSIVELY:
- setRecursively((Boolean)newValue);
- return;
+ case DiagramTemplatePackage.SELECTION__RECURSIVELY:
+ setRecursively((Boolean) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -118,14 +127,15 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION__RECURSIVELY:
- setRecursively(RECURSIVELY_EDEFAULT);
- return;
+ case DiagramTemplatePackage.SELECTION__RECURSIVELY:
+ setRecursively(RECURSIVELY_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -133,13 +143,14 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION__RECURSIVELY:
- return recursively != RECURSIVELY_EDEFAULT;
+ case DiagramTemplatePackage.SELECTION__RECURSIVELY:
+ return recursively != RECURSIVELY_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -147,11 +158,14 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
/**
* <!-- 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(" (recursively: ");
@@ -160,4 +174,4 @@ public class SelectionImpl extends AbstractSelectionImpl implements Selection {
return result.toString();
}
-} //SelectionImpl
+} // SelectionImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionRefImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionRefImpl.java
index ecf334a5f69..986ef50a48f 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionRefImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/SelectionRefImpl.java
@@ -21,7 +21,7 @@ import org.eclipse.papyrus.diagramtemplate.SelectionRef;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionRefImpl#getEReference <em>EReference</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.SelectionRefImpl#getEReference <em>EReference</em>}</li>
* </ul>
* </p>
*
@@ -32,6 +32,7 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
* The cached value of the '{@link #getEReference() <em>EReference</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getEReference()
* @generated
* @ordered
@@ -41,6 +42,7 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected SelectionRefImpl() {
@@ -50,6 +52,7 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -60,15 +63,17 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject getEReference() {
if (eReference != null && eReference.eIsProxy()) {
- InternalEObject oldEReference = (InternalEObject)eReference;
+ InternalEObject oldEReference = (InternalEObject) eReference;
eReference = eResolveProxy(oldEReference);
if (eReference != oldEReference) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DiagramTemplatePackage.SELECTION_REF__EREFERENCE, oldEReference, eReference));
+ }
}
}
return eReference;
@@ -77,6 +82,7 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject basicGetEReference() {
@@ -86,26 +92,31 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setEReference(EObject newEReference) {
EObject oldEReference = eReference;
eReference = newEReference;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.SELECTION_REF__EREFERENCE, oldEReference, eReference));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
- if (resolve) return getEReference();
- return basicGetEReference();
+ case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
+ if (resolve) {
+ return getEReference();
+ }
+ return basicGetEReference();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -113,14 +124,15 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
- setEReference((EObject)newValue);
- return;
+ case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
+ setEReference((EObject) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -128,14 +140,15 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
- setEReference((EObject)null);
- return;
+ case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
+ setEReference((EObject) null);
+ return;
}
super.eUnset(featureID);
}
@@ -143,15 +156,16 @@ public class SelectionRefImpl extends AbstractSelectionImpl implements Selection
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
- return eReference != null;
+ case DiagramTemplatePackage.SELECTION_REF__EREFERENCE:
+ return eReference != null;
}
return super.eIsSet(featureID);
}
-} //SelectionRefImpl
+} // SelectionRefImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/TemplateImpl.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/TemplateImpl.java
index bbcaf63012b..363833081ad 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/TemplateImpl.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/impl/TemplateImpl.java
@@ -29,8 +29,8 @@ import org.eclipse.papyrus.diagramtemplate.Template;
* <p>
* The following features are implemented:
* <ul>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl#getDiagramDefinitions <em>Diagram Definitions</em>}</li>
- * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl#getTargetRoot <em>Target Root</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl#getDiagramDefinitions <em>Diagram Definitions</em>}</li>
+ * <li>{@link org.eclipse.papyrus.diagramtemplate.impl.TemplateImpl#getTargetRoot <em>Target Root</em>}</li>
* </ul>
* </p>
*
@@ -41,6 +41,7 @@ public class TemplateImpl extends EObjectImpl implements Template {
* The cached value of the '{@link #getDiagramDefinitions() <em>Diagram Definitions</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getDiagramDefinitions()
* @generated
* @ordered
@@ -51,6 +52,7 @@ public class TemplateImpl extends EObjectImpl implements Template {
* The cached value of the '{@link #getTargetRoot() <em>Target Root</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @see #getTargetRoot()
* @generated
* @ordered
@@ -60,6 +62,7 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected TemplateImpl() {
@@ -69,6 +72,7 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -79,6 +83,7 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EList<DiagramDefinition> getDiagramDefinitions() {
@@ -91,15 +96,17 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject getTargetRoot() {
if (targetRoot != null && targetRoot.eIsProxy()) {
- InternalEObject oldTargetRoot = (InternalEObject)targetRoot;
+ InternalEObject oldTargetRoot = (InternalEObject) targetRoot;
targetRoot = eResolveProxy(oldTargetRoot);
if (targetRoot != oldTargetRoot) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, DiagramTemplatePackage.TEMPLATE__TARGET_ROOT, oldTargetRoot, targetRoot));
+ }
}
}
return targetRoot;
@@ -108,6 +115,7 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public EObject basicGetTargetRoot() {
@@ -117,25 +125,28 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public void setTargetRoot(EObject newTargetRoot) {
EObject oldTargetRoot = targetRoot;
targetRoot = newTargetRoot;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, DiagramTemplatePackage.TEMPLATE__TARGET_ROOT, oldTargetRoot, targetRoot));
+ }
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
- return ((InternalEList<?>)getDiagramDefinitions()).basicRemove(otherEnd, msgs);
+ case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
+ return ((InternalEList<?>) getDiagramDefinitions()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -143,16 +154,19 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
- return getDiagramDefinitions();
- case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
- if (resolve) return getTargetRoot();
- return basicGetTargetRoot();
+ case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
+ return getDiagramDefinitions();
+ case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
+ if (resolve) {
+ return getTargetRoot();
+ }
+ return basicGetTargetRoot();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -160,19 +174,20 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
- getDiagramDefinitions().clear();
- getDiagramDefinitions().addAll((Collection<? extends DiagramDefinition>)newValue);
- return;
- case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
- setTargetRoot((EObject)newValue);
- return;
+ case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
+ getDiagramDefinitions().clear();
+ getDiagramDefinitions().addAll((Collection<? extends DiagramDefinition>) newValue);
+ return;
+ case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
+ setTargetRoot((EObject) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -180,17 +195,18 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
- getDiagramDefinitions().clear();
- return;
- case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
- setTargetRoot((EObject)null);
- return;
+ case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
+ getDiagramDefinitions().clear();
+ return;
+ case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
+ setTargetRoot((EObject) null);
+ return;
}
super.eUnset(featureID);
}
@@ -198,17 +214,18 @@ public class TemplateImpl extends EObjectImpl implements Template {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
- return diagramDefinitions != null && !diagramDefinitions.isEmpty();
- case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
- return targetRoot != null;
+ case DiagramTemplatePackage.TEMPLATE__DIAGRAM_DEFINITIONS:
+ return diagramDefinitions != null && !diagramDefinitions.isEmpty();
+ case DiagramTemplatePackage.TEMPLATE__TARGET_ROOT:
+ return targetRoot != null;
}
return super.eIsSet(featureID);
}
-} //TemplateImpl
+} // TemplateImpl
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateAdapterFactory.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateAdapterFactory.java
index 76b16813156..a4856365d0b 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateAdapterFactory.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateAdapterFactory.java
@@ -22,6 +22,7 @@ import org.eclipse.papyrus.diagramtemplate.Template;
* 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.diagramtemplate.DiagramTemplatePackage
* @generated
*/
@@ -30,6 +31,7 @@ public class DiagramTemplateAdapterFactory extends AdapterFactoryImpl {
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected static DiagramTemplatePackage modelPackage;
@@ -38,6 +40,7 @@ public class DiagramTemplateAdapterFactory extends AdapterFactoryImpl {
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplateAdapterFactory() {
@@ -51,6 +54,7 @@ public class DiagramTemplateAdapterFactory 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
*/
@@ -60,7 +64,7 @@ public class DiagramTemplateAdapterFactory extends AdapterFactoryImpl {
return true;
}
if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
@@ -69,47 +73,55 @@ public class DiagramTemplateAdapterFactory extends AdapterFactoryImpl {
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected DiagramTemplateSwitch<Adapter> modelSwitch =
- new DiagramTemplateSwitch<Adapter>() {
- @Override
- public Adapter caseDiagramDefinition(DiagramDefinition object) {
- return createDiagramDefinitionAdapter();
- }
- @Override
- public Adapter caseSelection(Selection object) {
- return createSelectionAdapter();
- }
- @Override
- public Adapter caseSelectionRef(SelectionRef object) {
- return createSelectionRefAdapter();
- }
- @Override
- public Adapter caseTemplate(Template object) {
- return createTemplateAdapter();
- }
- @Override
- public Adapter caseAbstractSelection(AbstractSelection object) {
- return createAbstractSelectionAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ new DiagramTemplateSwitch<Adapter>() {
+ @Override
+ public Adapter caseDiagramDefinition(DiagramDefinition object) {
+ return createDiagramDefinitionAdapter();
+ }
+
+ @Override
+ public Adapter caseSelection(Selection object) {
+ return createSelectionAdapter();
+ }
+
+ @Override
+ public Adapter caseSelectionRef(SelectionRef object) {
+ return createSelectionRefAdapter();
+ }
+
+ @Override
+ public Adapter caseTemplate(Template object) {
+ return createTemplateAdapter();
+ }
+
+ @Override
+ public Adapter caseAbstractSelection(AbstractSelection object) {
+ return createAbstractSelectionAdapter();
+ }
+
+ @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);
}
@@ -119,6 +131,7 @@ public class DiagramTemplateAdapterFactory 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.diagramtemplate.DiagramDefinition
* @generated
@@ -133,6 +146,7 @@ public class DiagramTemplateAdapterFactory 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.diagramtemplate.Selection
* @generated
@@ -147,6 +161,7 @@ public class DiagramTemplateAdapterFactory 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.diagramtemplate.SelectionRef
* @generated
@@ -161,6 +176,7 @@ public class DiagramTemplateAdapterFactory 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.diagramtemplate.Template
* @generated
@@ -175,6 +191,7 @@ public class DiagramTemplateAdapterFactory 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.diagramtemplate.AbstractSelection
* @generated
@@ -188,6 +205,7 @@ public class DiagramTemplateAdapterFactory extends AdapterFactoryImpl {
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
+ *
* @return the new adapter.
* @generated
*/
@@ -195,4 +213,4 @@ public class DiagramTemplateAdapterFactory extends AdapterFactoryImpl {
return null;
}
-} //DiagramTemplateAdapterFactory
+} // DiagramTemplateAdapterFactory
diff --git a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateSwitch.java b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateSwitch.java
index 6d93594220e..504445b3168 100644
--- a/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateSwitch.java
+++ b/extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate/src/org/eclipse/papyrus/diagramtemplate/util/DiagramTemplateSwitch.java
@@ -20,13 +20,13 @@ import org.eclipse.papyrus.diagramtemplate.Template;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
- * It supports the call {@link #doSwitch(EObject) doSwitch(object)}
- * to invoke the <code>caseXXX</code> method for each class of the model,
+ * It supports the call {@link #doSwitch(EObject) doSwitch(object)} to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.diagramtemplate.DiagramTemplatePackage
* @generated
*/
@@ -35,6 +35,7 @@ public class DiagramTemplateSwitch<T> {
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
protected static DiagramTemplatePackage modelPackage;
@@ -43,6 +44,7 @@ public class DiagramTemplateSwitch<T> {
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public DiagramTemplateSwitch() {
@@ -55,6 +57,7 @@ public class DiagramTemplateSwitch<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
*/
@@ -66,6 +69,7 @@ public class DiagramTemplateSwitch<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
*/
@@ -75,8 +79,7 @@ public class DiagramTemplateSwitch<T> {
}
else {
List<EClass> eSuperTypes = theEClass.getESuperTypes();
- return
- eSuperTypes.isEmpty() ?
+ return eSuperTypes.isEmpty() ?
defaultCase(theEObject) :
doSwitch(eSuperTypes.get(0), theEObject);
}
@@ -86,44 +89,60 @@ public class DiagramTemplateSwitch<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
*/
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
- case DiagramTemplatePackage.DIAGRAM_DEFINITION: {
- DiagramDefinition diagramDefinition = (DiagramDefinition)theEObject;
- T result = caseDiagramDefinition(diagramDefinition);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ case DiagramTemplatePackage.DIAGRAM_DEFINITION: {
+ DiagramDefinition diagramDefinition = (DiagramDefinition) theEObject;
+ T result = caseDiagramDefinition(diagramDefinition);
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- case DiagramTemplatePackage.SELECTION: {
- Selection selection = (Selection)theEObject;
- T result = caseSelection(selection);
- if (result == null) result = caseAbstractSelection(selection);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ return result;
+ }
+ case DiagramTemplatePackage.SELECTION: {
+ Selection selection = (Selection) theEObject;
+ T result = caseSelection(selection);
+ if (result == null) {
+ result = caseAbstractSelection(selection);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- case DiagramTemplatePackage.SELECTION_REF: {
- SelectionRef selectionRef = (SelectionRef)theEObject;
- T result = caseSelectionRef(selectionRef);
- if (result == null) result = caseAbstractSelection(selectionRef);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ return result;
+ }
+ case DiagramTemplatePackage.SELECTION_REF: {
+ SelectionRef selectionRef = (SelectionRef) theEObject;
+ T result = caseSelectionRef(selectionRef);
+ if (result == null) {
+ result = caseAbstractSelection(selectionRef);
}
- case DiagramTemplatePackage.TEMPLATE: {
- Template template = (Template)theEObject;
- T result = caseTemplate(template);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- case DiagramTemplatePackage.ABSTRACT_SELECTION: {
- AbstractSelection abstractSelection = (AbstractSelection)theEObject;
- T result = caseAbstractSelection(abstractSelection);
- if (result == null) result = defaultCase(theEObject);
- return result;
+ return result;
+ }
+ case DiagramTemplatePackage.TEMPLATE: {
+ Template template = (Template) theEObject;
+ T result = caseTemplate(template);
+ if (result == null) {
+ result = defaultCase(theEObject);
}
- default: return defaultCase(theEObject);
+ return result;
+ }
+ case DiagramTemplatePackage.ABSTRACT_SELECTION: {
+ AbstractSelection abstractSelection = (AbstractSelection) theEObject;
+ T result = caseAbstractSelection(abstractSelection);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
@@ -133,7 +152,9 @@ public class DiagramTemplateSwitch<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>Diagram Definition</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -148,7 +169,9 @@ public class DiagramTemplateSwitch<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>Selection</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -163,7 +186,9 @@ public class DiagramTemplateSwitch<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>Selection Ref</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -178,7 +203,9 @@ public class DiagramTemplateSwitch<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>Template</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -193,7 +220,9 @@ public class DiagramTemplateSwitch<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>Abstract Selection</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
@@ -208,7 +237,9 @@ public class DiagramTemplateSwitch<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
@@ -217,4 +248,4 @@ public class DiagramTemplateSwitch<T> {
return null;
}
-} //DiagramTemplateSwitch
+} // DiagramTemplateSwitch

Back to the top