Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaurent Wouters2014-03-26 12:51:51 +0000
committerLaurent Wouters2014-03-26 15:38:48 +0000
commit625aba3625623e9fd32a1ca4ea23b78ce10d455b (patch)
treee4b0d0449016973b755addde1cd53cd2c877c491
parent2f286d60faab11ece5efb54066956498bee1e6af (diff)
downloadorg.eclipse.papyrus-625aba3625623e9fd32a1ca4ea23b78ce10d455b.tar.gz
org.eclipse.papyrus-625aba3625623e9fd32a1ca4ea23b78ce10d455b.tar.xz
org.eclipse.papyrus-625aba3625623e9fd32a1ca4ea23b78ce10d455b.zip
Changed viewpoint model to enable the auto-instantiation of model elements
https://bugs.eclipse.org/bugs/show_bug.cgi?id=431139 Signed-off-by: Laurent Wouters <laurent.wouters@cea.fr>
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF9
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties5
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java16
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java (renamed from plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java)66
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java40
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java40
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java7
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF6
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore16
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java6
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java185
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java89
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelAutoCreate.java106
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java17
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java17
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java17
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java8
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java72
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java228
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java256
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java52
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java52
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java37
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java18
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java10
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java12
26 files changed, 686 insertions, 701 deletions
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF
index 6a9401e35f7..25e8553c865 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF
@@ -6,18 +6,15 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.0.0",
org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.0.0",
org.eclipse.papyrus.infra.viewpoints.iso42010.edit;bundle-version="1.0.0"
-Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration.pro
- vider
+Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration.provider
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.p
- rovider.ConfigurationEditPlugin$Implementation
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.provider.ConfigurationEditPlugin$Implementation
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuratio
- n.edit;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuration.edit;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties
index 6c33b907a74..387d6eeedde 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties
@@ -89,3 +89,8 @@ _UI_PapyrusDiagram_imports_feature = Imports
_UI_ElementImport_from_feature = From
_UI_ElementImport_element_feature = Element
_UI_ModelRule_autoSelectPath_feature = Auto Select Path
+_UI_ModelAutoCreate_type = Model Auto Create
+_UI_OwningRule_newModelPath_feature = New Model Path
+_UI_ModelAutoCreate_feature_feature = Feature
+_UI_ModelAutoCreate_origin_feature = Origin
+_UI_ModelAutoCreate_creationType_feature = Creation Type
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
index 3414bf305eb..3a52ea4dfda 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
@@ -359,26 +359,26 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
}
/**
- * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport} instances.
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected ElementImportItemProvider elementImportItemProvider;
+ protected ModelAutoCreateItemProvider modelAutoCreateItemProvider;
/**
- * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport}.
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
- public Adapter createElementImportAdapter() {
- if (elementImportItemProvider == null) {
- elementImportItemProvider = new ElementImportItemProvider(this);
+ public Adapter createModelAutoCreateAdapter() {
+ if (modelAutoCreateItemProvider == null) {
+ modelAutoCreateItemProvider = new ModelAutoCreateItemProvider(this);
}
- return elementImportItemProvider;
+ return modelAutoCreateItemProvider;
}
/**
@@ -492,7 +492,7 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
if (paletteRuleItemProvider != null) paletteRuleItemProvider.dispose();
if (pathElementItemProvider != null) pathElementItemProvider.dispose();
if (categoryItemProvider != null) categoryItemProvider.dispose();
- if (elementImportItemProvider != null) elementImportItemProvider.dispose();
+ if (modelAutoCreateItemProvider != null) modelAutoCreateItemProvider.dispose();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java
index 9592e8606c7..ab883e3b389 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ElementImportItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java
@@ -29,15 +29,14 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
/**
- * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport} object.
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
-public class ElementImportItemProvider
+public class ModelAutoCreateItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
@@ -51,7 +50,7 @@ public class ElementImportItemProvider
* <!-- end-user-doc -->
* @generated
*/
- public ElementImportItemProvider(AdapterFactory adapterFactory) {
+ public ModelAutoCreateItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
@@ -66,26 +65,27 @@ public class ElementImportItemProvider
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
- addFromPropertyDescriptor(object);
- addElementPropertyDescriptor(object);
+ addFeaturePropertyDescriptor(object);
+ addOriginPropertyDescriptor(object);
+ addCreationTypePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
- * This adds a property descriptor for the From feature.
+ * This adds a property descriptor for the Feature feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addFromPropertyDescriptor(Object object) {
+ protected void addFeaturePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_ElementImport_from_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ElementImport_from_feature", "_UI_ElementImport_type"),
- ConfigurationPackage.Literals.ELEMENT_IMPORT__FROM,
+ getString("_UI_ModelAutoCreate_feature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelAutoCreate_feature_feature", "_UI_ModelAutoCreate_type"),
+ ConfigurationPackage.Literals.MODEL_AUTO_CREATE__FEATURE,
true,
false,
true,
@@ -95,19 +95,41 @@ public class ElementImportItemProvider
}
/**
- * This adds a property descriptor for the Element feature.
+ * This adds a property descriptor for the Origin feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- protected void addElementPropertyDescriptor(Object object) {
+ protected void addOriginPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
- getString("_UI_ElementImport_element_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ElementImport_element_feature", "_UI_ElementImport_type"),
- ConfigurationPackage.Literals.ELEMENT_IMPORT__ELEMENT,
+ getString("_UI_ModelAutoCreate_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelAutoCreate_origin_feature", "_UI_ModelAutoCreate_type"),
+ ConfigurationPackage.Literals.MODEL_AUTO_CREATE__ORIGIN,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
+ }
+
+ /**
+ * This adds a property descriptor for the Creation Type feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addCreationTypePropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add
+ (createItemPropertyDescriptor
+ (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelAutoCreate_creationType_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelAutoCreate_creationType_feature", "_UI_ModelAutoCreate_type"),
+ ConfigurationPackage.Literals.MODEL_AUTO_CREATE__CREATION_TYPE,
true,
false,
true,
@@ -117,29 +139,25 @@ public class ElementImportItemProvider
}
/**
- * This returns ElementImport.gif.
+ * This returns ModelAutoCreate.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
- return overlayImage(object, getResourceLocator().getImage("full/obj16/ElementImport.png"));
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/PathElement.png"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ * @generated
*/
@Override
public String getText(Object object) {
- ElementImport ei = (ElementImport) object;
- StringBuilder builder = new StringBuilder("[");
- builder.append(ei.getElement() != null ? ei.getElement().getName() : "?");
- builder.append("] from ");
- builder.append(ei.getFrom() != null ? PapyrusViewItemProvider.getTextFor(ei.getFrom()) : "?");
- return builder.toString();
+ return getString("_UI_ModelAutoCreate_type");
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
index 450094af358..5a0bf83f021 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
@@ -19,7 +19,6 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -29,7 +28,6 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
import org.eclipse.papyrus.infra.viewpoints.configuration.EClassPropertyDescriptor;
import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
@@ -143,36 +141,6 @@ public class ModelRuleItemProvider
}
/**
- * 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
- public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
- if (childrenFeatures == null) {
- super.getChildrenFeatures(object);
- childrenFeatures.add(ConfigurationPackage.Literals.MODEL_RULE__AUTO_SELECT_PATH);
- }
- return childrenFeatures;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EStructuralFeature getChildFeature(Object object, Object child) {
- // Check the type of the specified child object and return the proper feature to use for
- // adding (see {@link AddCommand}) it as a child.
-
- return super.getChildFeature(object, child);
- }
-
- /**
* This returns ModelRule.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -224,9 +192,6 @@ public class ModelRuleItemProvider
case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
- case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
}
super.notifyChanged(notification);
}
@@ -241,11 +206,6 @@ public class ModelRuleItemProvider
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
-
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.MODEL_RULE__AUTO_SELECT_PATH,
- ConfigurationFactory.eINSTANCE.createPathElement()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
index 1748a6c4dd0..780f7709195 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
@@ -19,6 +19,7 @@ import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
@@ -28,6 +29,7 @@ import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
import org.eclipse.papyrus.infra.viewpoints.configuration.EClassPropertyDescriptor;
import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
@@ -140,6 +142,36 @@ public class OwningRuleItemProvider
}
/**
+ * 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
+ public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
+ if (childrenFeatures == null) {
+ super.getChildrenFeatures(object);
+ childrenFeatures.add(ConfigurationPackage.Literals.OWNING_RULE__NEW_MODEL_PATH);
+ }
+ return childrenFeatures;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EStructuralFeature getChildFeature(Object object, Object child) {
+ // Check the type of the specified child object and return the proper feature to use for
+ // adding (see {@link AddCommand}) it as a child.
+
+ return super.getChildFeature(object, child);
+ }
+
+ /**
* This returns OwningRule.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -191,6 +223,9 @@ public class OwningRuleItemProvider
case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -205,6 +240,11 @@ public class OwningRuleItemProvider
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
+
+ newChildDescriptors.add
+ (createChildParameter
+ (ConfigurationPackage.Literals.OWNING_RULE__NEW_MODEL_PATH,
+ ConfigurationFactory.eINSTANCE.createModelAutoCreate()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
index 8263e4d0dd1..8ceb433fd7c 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
@@ -132,7 +132,6 @@ public class PapyrusDiagramItemProvider
super.getChildrenFeatures(object);
childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES);
childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES);
- childrenFeatures.add(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__IMPORTS);
}
return childrenFeatures;
}
@@ -189,7 +188,6 @@ public class PapyrusDiagramItemProvider
return;
case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
@@ -216,11 +214,6 @@ public class PapyrusDiagramItemProvider
(createChildParameter
(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES,
ConfigurationFactory.eINSTANCE.createPaletteRule()));
-
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__IMPORTS,
- ConfigurationFactory.eINSTANCE.createElementImport()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF
index cc49df1ed96..c08080d9874 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF
@@ -16,10 +16,8 @@ Bundle-ClassPath: .
Bundle-Version: 1.0.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.A
- ctivator
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.Activator
Bundle-ManifestVersion: 2
-Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuratio
- n;singleton:=true
+Bundle-SymbolicName: org.eclipse.papyrus.infra.viewpoints.configuration;singleton:=true
Bundle-RequiredExecutionEnvironment: J2SE-1.5
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore
index fa114a399eb..68809247223 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore
@@ -50,8 +50,6 @@
<details key="documentation" value="These rules determine which palette elements should be available for this diagram"/>
</eAnnotations>
</eStructuralFeatures>
- <eStructuralFeatures xsi:type="ecore:EReference" name="imports" upperBound="-1"
- eType="#//ElementImport" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PapyrusSyncTable" eSuperTypes="#//PapyrusView"/>
<eClassifiers xsi:type="ecore:EClass" name="PapyrusTable" eSuperTypes="#//PapyrusView">
@@ -68,8 +66,6 @@
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="multiplicity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="autoSelectPath" upperBound="-1"
- eType="#//PathElement" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="OwningRule" eSuperTypes="#//Rule">
<eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
@@ -77,6 +73,8 @@
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="multiplicity" lowerBound="1"
eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt" defaultValueLiteral="-1"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="newModelPath" upperBound="-1"
+ eType="#//ModelAutoCreate" containment="true"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="ChildRule" eSuperTypes="#//Rule">
<eStructuralFeatures xsi:type="ecore:EReference" name="element" eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
@@ -102,9 +100,13 @@
<eClassifiers xsi:type="ecore:EClass" name="Category">
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
- <eClassifiers xsi:type="ecore:EClass" name="ElementImport">
- <eStructuralFeatures xsi:type="ecore:EReference" name="from" lowerBound="1" eType="#//PapyrusDiagram"/>
- <eStructuralFeatures xsi:type="ecore:EReference" name="element" lowerBound="1"
+ <eClassifiers xsi:type="ecore:EClass" name="ModelAutoCreate">
+ <eStructuralFeatures xsi:type="ecore:EReference" name="feature" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="origin" lowerBound="1"
+ eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass" changeable="false"
+ volatile="true" transient="true" derived="true"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="creationType" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EClass"/>
</eClassifiers>
</ecore:EPackage>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
index 3a6909c1508..5ffd4e9cbd3 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
@@ -141,13 +141,13 @@ public interface ConfigurationFactory extends EFactory {
Category createCategory();
/**
- * Returns a new object of class '<em>Element Import</em>'.
+ * Returns a new object of class '<em>Model Auto Create</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return a new object of class '<em>Element Import</em>'.
+ * @return a new object of class '<em>Model Auto Create</em>'.
* @generated
*/
- ElementImport createElementImport();
+ ModelAutoCreate createModelAutoCreate();
/**
* Returns the package supported by this factory.
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
index 25d0f1d2ee7..6a415ddccd7 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
@@ -515,22 +515,13 @@ public interface ConfigurationPackage extends EPackage {
int PAPYRUS_DIAGRAM__PALETTE_RULES = PAPYRUS_VIEW_FEATURE_COUNT + 3;
/**
- * The feature id for the '<em><b>Imports</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int PAPYRUS_DIAGRAM__IMPORTS = PAPYRUS_VIEW_FEATURE_COUNT + 4;
-
- /**
* The number of structural features of the '<em>Papyrus Diagram</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int PAPYRUS_DIAGRAM_FEATURE_COUNT = PAPYRUS_VIEW_FEATURE_COUNT + 5;
+ int PAPYRUS_DIAGRAM_FEATURE_COUNT = PAPYRUS_VIEW_FEATURE_COUNT + 4;
/**
* The number of operations of the '<em>Papyrus Diagram</em>' class.
@@ -888,22 +879,13 @@ public interface ConfigurationPackage extends EPackage {
int MODEL_RULE__MULTIPLICITY = RULE_FEATURE_COUNT + 2;
/**
- * The feature id for the '<em><b>Auto Select Path</b></em>' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- * @ordered
- */
- int MODEL_RULE__AUTO_SELECT_PATH = RULE_FEATURE_COUNT + 3;
-
- /**
* The number of structural features of the '<em>Model Rule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int MODEL_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 4;
+ int MODEL_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 3;
/**
* The number of operations of the '<em>Model Rule</em>' class.
@@ -961,13 +943,22 @@ public interface ConfigurationPackage extends EPackage {
int OWNING_RULE__MULTIPLICITY = RULE_FEATURE_COUNT + 2;
/**
+ * The feature id for the '<em><b>New Model Path</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int OWNING_RULE__NEW_MODEL_PATH = RULE_FEATURE_COUNT + 3;
+
+ /**
* The number of structural features of the '<em>Owning Rule</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int OWNING_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 3;
+ int OWNING_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 4;
/**
* The number of operations of the '<em>Owning Rule</em>' class.
@@ -1192,51 +1183,59 @@ public interface ConfigurationPackage extends EPackage {
/**
- * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl <em>Element Import</em>}' class.
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl <em>Model Auto Create</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getElementImport()
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getModelAutoCreate()
* @generated
*/
- int ELEMENT_IMPORT = 13;
+ int MODEL_AUTO_CREATE = 13;
/**
- * The feature id for the '<em><b>From</b></em>' reference.
+ * The feature id for the '<em><b>Feature</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ELEMENT_IMPORT__FROM = 0;
+ int MODEL_AUTO_CREATE__FEATURE = 0;
/**
- * The feature id for the '<em><b>Element</b></em>' reference.
+ * The feature id for the '<em><b>Origin</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ELEMENT_IMPORT__ELEMENT = 1;
+ int MODEL_AUTO_CREATE__ORIGIN = 1;
/**
- * The number of structural features of the '<em>Element Import</em>' class.
+ * The feature id for the '<em><b>Creation Type</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ELEMENT_IMPORT_FEATURE_COUNT = 2;
+ int MODEL_AUTO_CREATE__CREATION_TYPE = 2;
/**
- * The number of operations of the '<em>Element Import</em>' class.
+ * The number of structural features of the '<em>Model Auto Create</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
- int ELEMENT_IMPORT_OPERATION_COUNT = 0;
+ int MODEL_AUTO_CREATE_FEATURE_COUNT = 3;
+ /**
+ * The number of operations of the '<em>Model Auto Create</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int MODEL_AUTO_CREATE_OPERATION_COUNT = 0;
/**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration <em>Papyrus Configuration</em>}'.
@@ -1444,17 +1443,6 @@ public interface ConfigurationPackage extends EPackage {
EReference getPapyrusDiagram_PaletteRules();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getImports <em>Imports</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Imports</em>'.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getImports()
- * @see #getPapyrusDiagram()
- * @generated
- */
- EReference getPapyrusDiagram_Imports();
-
- /**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable <em>Papyrus Sync Table</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1529,17 +1517,6 @@ public interface ConfigurationPackage extends EPackage {
EAttribute getModelRule_Multiplicity();
/**
- * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getAutoSelectPath <em>Auto Select Path</em>}'.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @return the meta object for the containment reference list '<em>Auto Select Path</em>'.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getAutoSelectPath()
- * @see #getModelRule()
- * @generated
- */
- EReference getModelRule_AutoSelectPath();
-
- /**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule <em>Owning Rule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1583,6 +1560,17 @@ public interface ConfigurationPackage extends EPackage {
EAttribute getOwningRule_Multiplicity();
/**
+ * Returns the meta object for the containment reference list '{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getNewModelPath <em>New Model Path</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>New Model Path</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getNewModelPath()
+ * @see #getOwningRule()
+ * @generated
+ */
+ EReference getOwningRule_NewModelPath();
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule <em>Child Rule</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1743,36 +1731,47 @@ public interface ConfigurationPackage extends EPackage {
EAttribute getCategory_Name();
/**
- * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport <em>Element Import</em>}'.
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate <em>Model Auto Create</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for class '<em>Element Import</em>'.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport
+ * @return the meta object for class '<em>Model Auto Create</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate
* @generated
*/
- EClass getElementImport();
+ EClass getModelAutoCreate();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom <em>From</em>}'.
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getFeature <em>Feature</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>From</em>'.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom()
- * @see #getElementImport()
+ * @return the meta object for the reference '<em>Feature</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getFeature()
+ * @see #getModelAutoCreate()
* @generated
*/
- EReference getElementImport_From();
+ EReference getModelAutoCreate_Feature();
/**
- * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement <em>Element</em>}'.
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getOrigin <em>Origin</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @return the meta object for the reference '<em>Element</em>'.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement()
- * @see #getElementImport()
+ * @return the meta object for the reference '<em>Origin</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getOrigin()
+ * @see #getModelAutoCreate()
+ * @generated
+ */
+ EReference getModelAutoCreate_Origin();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getCreationType <em>Creation Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the reference '<em>Creation Type</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getCreationType()
+ * @see #getModelAutoCreate()
* @generated
*/
- EReference getElementImport_Element();
+ EReference getModelAutoCreate_CreationType();
/**
* Returns the factory that creates the instances of the model.
@@ -1958,14 +1957,6 @@ public interface ConfigurationPackage extends EPackage {
EReference PAPYRUS_DIAGRAM__PALETTE_RULES = eINSTANCE.getPapyrusDiagram_PaletteRules();
/**
- * The meta object literal for the '<em><b>Imports</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference PAPYRUS_DIAGRAM__IMPORTS = eINSTANCE.getPapyrusDiagram_Imports();
-
- /**
* The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusSyncTableImpl <em>Papyrus Sync Table</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2028,14 +2019,6 @@ public interface ConfigurationPackage extends EPackage {
EAttribute MODEL_RULE__MULTIPLICITY = eINSTANCE.getModelRule_Multiplicity();
/**
- * The meta object literal for the '<em><b>Auto Select Path</b></em>' containment reference list feature.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- EReference MODEL_RULE__AUTO_SELECT_PATH = eINSTANCE.getModelRule_AutoSelectPath();
-
- /**
* The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl <em>Owning Rule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2070,6 +2053,14 @@ public interface ConfigurationPackage extends EPackage {
EAttribute OWNING_RULE__MULTIPLICITY = eINSTANCE.getOwningRule_Multiplicity();
/**
+ * The meta object literal for the '<em><b>New Model Path</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference OWNING_RULE__NEW_MODEL_PATH = eINSTANCE.getOwningRule_NewModelPath();
+
+ /**
* The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ChildRuleImpl <em>Child Rule</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2200,30 +2191,38 @@ public interface ConfigurationPackage extends EPackage {
EAttribute CATEGORY__NAME = eINSTANCE.getCategory_Name();
/**
- * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl <em>Element Import</em>}' class.
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl <em>Model Auto Create</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getElementImport()
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getModelAutoCreate()
* @generated
*/
- EClass ELEMENT_IMPORT = eINSTANCE.getElementImport();
+ EClass MODEL_AUTO_CREATE = eINSTANCE.getModelAutoCreate();
/**
- * The meta object literal for the '<em><b>From</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Feature</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EReference ELEMENT_IMPORT__FROM = eINSTANCE.getElementImport_From();
+ EReference MODEL_AUTO_CREATE__FEATURE = eINSTANCE.getModelAutoCreate_Feature();
/**
- * The meta object literal for the '<em><b>Element</b></em>' reference feature.
+ * The meta object literal for the '<em><b>Origin</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference MODEL_AUTO_CREATE__ORIGIN = eINSTANCE.getModelAutoCreate_Origin();
+
+ /**
+ * The meta object literal for the '<em><b>Creation Type</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
- EReference ELEMENT_IMPORT__ELEMENT = eINSTANCE.getElementImport_Element();
+ EReference MODEL_AUTO_CREATE__CREATION_TYPE = eINSTANCE.getModelAutoCreate_CreationType();
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java
deleted file mode 100755
index f4a7feb3f20..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ElementImport.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.infra.viewpoints.configuration;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-
-/**
- * <!-- begin-user-doc -->
- * A representation of the model object '<em><b>Element Import</b></em>'.
- * <!-- end-user-doc -->
- *
- * <p>
- * The following features are supported:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom <em>From</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement <em>Element</em>}</li>
- * </ul>
- * </p>
- *
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getElementImport()
- * @model
- * @generated
- */
-public interface ElementImport extends EObject {
- /**
- * Returns the value of the '<em><b>From</b></em>' reference.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>From</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</em>' reference.
- * @see #setFrom(PapyrusDiagram)
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getElementImport_From()
- * @model required="true"
- * @generated
- */
- PapyrusDiagram getFrom();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getFrom <em>From</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>From</em>' reference.
- * @see #getFrom()
- * @generated
- */
- void setFrom(PapyrusDiagram value);
-
- /**
- * 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...
- * </p>
- * <!-- end-user-doc -->
- * @return the value of the '<em>Element</em>' reference.
- * @see #setElement(EClass)
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getElementImport_Element()
- * @model required="true"
- * @generated
- */
- EClass getElement();
-
- /**
- * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport#getElement <em>Element</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @param value the new value of the '<em>Element</em>' reference.
- * @see #getElement()
- * @generated
- */
- void setElement(EClass value);
-
-} // ElementImport
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelAutoCreate.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelAutoCreate.java
new file mode 100755
index 00000000000..6880563fbe1
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelAutoCreate.java
@@ -0,0 +1,106 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Model Auto Create</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getCreationType <em>Creation Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelAutoCreate()
+ * @model
+ * @generated
+ */
+public interface ModelAutoCreate extends EObject {
+ /**
+ * Returns the value of the '<em><b>Feature</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Feature</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Feature</em>' reference.
+ * @see #setFeature(EReference)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelAutoCreate_Feature()
+ * @model required="true"
+ * @generated
+ */
+ EReference getFeature();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getFeature <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Feature</em>' reference.
+ * @see #getFeature()
+ * @generated
+ */
+ void setFeature(EReference value);
+
+ /**
+ * Returns the value of the '<em><b>Origin</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Origin</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Origin</em>' reference.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelAutoCreate_Origin()
+ * @model required="true" transient="true" changeable="false" volatile="true" derived="true"
+ * @generated
+ */
+ EClass getOrigin();
+
+ /**
+ * Returns the value of the '<em><b>Creation Type</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Creation Type</em>' reference isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>Creation Type</em>' reference.
+ * @see #setCreationType(EClass)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelAutoCreate_CreationType()
+ * @model required="true"
+ * @generated
+ */
+ EClass getCreationType();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate#getCreationType <em>Creation Type</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Creation Type</em>' reference.
+ * @see #getCreationType()
+ * @generated
+ */
+ void setCreationType(EClass value);
+
+} // ModelAutoCreate
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java
index e4e1607b709..ab2d7fa18ed 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/ModelRule.java
@@ -27,7 +27,6 @@ import org.eclipse.emf.ecore.EClass;
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getElement <em>Element</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getStereotypes <em>Stereotypes</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getMultiplicity <em>Multiplicity</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule#getAutoSelectPath <em>Auto Select Path</em>}</li>
* </ul>
* </p>
*
@@ -105,20 +104,4 @@ public interface ModelRule extends Rule {
*/
void setMultiplicity(int value);
- /**
- * Returns the value of the '<em><b>Auto Select Path</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.PathElement}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Auto Select Path</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>Auto Select Path</em>' containment reference list.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getModelRule_AutoSelectPath()
- * @model containment="true"
- * @generated
- */
- EList<PathElement> getAutoSelectPath();
-
} // ModelRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java
index ae4140cbdbf..d6ab0dc0f4d 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/OwningRule.java
@@ -27,6 +27,7 @@ import org.eclipse.emf.ecore.EClass;
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getElement <em>Element</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getStereotypes <em>Stereotypes</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getMultiplicity <em>Multiplicity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule#getNewModelPath <em>New Model Path</em>}</li>
* </ul>
* </p>
*
@@ -104,4 +105,20 @@ public interface OwningRule extends Rule {
*/
void setMultiplicity(int value);
+ /**
+ * Returns the value of the '<em><b>New Model Path</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate}.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>New Model Path</em>' reference list isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @return the value of the '<em>New Model Path</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getOwningRule_NewModelPath()
+ * @model containment="true"
+ * @generated
+ */
+ EList<ModelAutoCreate> getNewModelPath();
+
} // OwningRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
index 7f01343501b..621d85a9572 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
@@ -27,7 +27,6 @@ import org.eclipse.emf.common.util.EList;
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getCustomStyle <em>Custom Style</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getChildRules <em>Child Rules</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getPaletteRules <em>Palette Rules</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getImports <em>Imports</em>}</li>
* </ul>
* </p>
*
@@ -118,20 +117,4 @@ public interface PapyrusDiagram extends PapyrusView {
*/
EList<PaletteRule> getPaletteRules();
- /**
- * Returns the value of the '<em><b>Imports</b></em>' containment reference list.
- * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport}.
- * <!-- begin-user-doc -->
- * <p>
- * If the meaning of the '<em>Imports</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>Imports</em>' containment reference list.
- * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_Imports()
- * @model containment="true"
- * @generated
- */
- EList<ElementImport> getImports();
-
} // PapyrusDiagram
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
index 7176aacd15f..eff070456ae 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
@@ -79,7 +79,7 @@ public class ConfigurationFactoryImpl extends EFactoryImpl implements Configurat
case ConfigurationPackage.PALETTE_RULE: return createPaletteRule();
case ConfigurationPackage.PATH_ELEMENT: return createPathElement();
case ConfigurationPackage.CATEGORY: return createCategory();
- case ConfigurationPackage.ELEMENT_IMPORT: return createElementImport();
+ case ConfigurationPackage.MODEL_AUTO_CREATE: return createModelAutoCreate();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
@@ -210,9 +210,9 @@ public class ConfigurationFactoryImpl extends EFactoryImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- public ElementImport createElementImport() {
- ElementImportImpl elementImport = new ElementImportImpl();
- return elementImport;
+ public ModelAutoCreate createModelAutoCreate() {
+ ModelAutoCreateImpl modelAutoCreate = new ModelAutoCreateImpl();
+ return modelAutoCreate;
}
/**
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
index 74e443c3040..9eb2cf46154 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
@@ -23,7 +23,7 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
@@ -140,7 +140,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- private EClass elementImportEClass = null;
+ private EClass modelAutoCreateEClass = null;
/**
* Creates an instance of the model <b>Package</b>, registered with
@@ -383,15 +383,6 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- public EReference getPapyrusDiagram_Imports() {
- return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(4);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EClass getPapyrusSyncTable() {
return papyrusSyncTableEClass;
}
@@ -455,15 +446,6 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- public EReference getModelRule_AutoSelectPath() {
- return (EReference)modelRuleEClass.getEStructuralFeatures().get(3);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
public EClass getOwningRule() {
return owningRuleEClass;
}
@@ -500,6 +482,15 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
+ public EReference getOwningRule_NewModelPath() {
+ return (EReference)owningRuleEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public EClass getChildRule() {
return childRuleEClass;
}
@@ -635,8 +626,17 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- public EClass getElementImport() {
- return elementImportEClass;
+ public EClass getModelAutoCreate() {
+ return modelAutoCreateEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getModelAutoCreate_Feature() {
+ return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(0);
}
/**
@@ -644,8 +644,8 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- public EReference getElementImport_From() {
- return (EReference)elementImportEClass.getEStructuralFeatures().get(0);
+ public EReference getModelAutoCreate_Origin() {
+ return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(1);
}
/**
@@ -653,8 +653,8 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
- public EReference getElementImport_Element() {
- return (EReference)elementImportEClass.getEStructuralFeatures().get(1);
+ public EReference getModelAutoCreate_CreationType() {
+ return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(2);
}
/**
@@ -707,7 +707,6 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
createEAttribute(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CUSTOM_STYLE);
createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__CHILD_RULES);
createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__PALETTE_RULES);
- createEReference(papyrusDiagramEClass, PAPYRUS_DIAGRAM__IMPORTS);
papyrusSyncTableEClass = createEClass(PAPYRUS_SYNC_TABLE);
@@ -721,12 +720,12 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
createEReference(modelRuleEClass, MODEL_RULE__ELEMENT);
createEReference(modelRuleEClass, MODEL_RULE__STEREOTYPES);
createEAttribute(modelRuleEClass, MODEL_RULE__MULTIPLICITY);
- createEReference(modelRuleEClass, MODEL_RULE__AUTO_SELECT_PATH);
owningRuleEClass = createEClass(OWNING_RULE);
createEReference(owningRuleEClass, OWNING_RULE__ELEMENT);
createEReference(owningRuleEClass, OWNING_RULE__STEREOTYPES);
createEAttribute(owningRuleEClass, OWNING_RULE__MULTIPLICITY);
+ createEReference(owningRuleEClass, OWNING_RULE__NEW_MODEL_PATH);
childRuleEClass = createEClass(CHILD_RULE);
createEReference(childRuleEClass, CHILD_RULE__ELEMENT);
@@ -745,9 +744,10 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
categoryEClass = createEClass(CATEGORY);
createEAttribute(categoryEClass, CATEGORY__NAME);
- elementImportEClass = createEClass(ELEMENT_IMPORT);
- createEReference(elementImportEClass, ELEMENT_IMPORT__FROM);
- createEReference(elementImportEClass, ELEMENT_IMPORT__ELEMENT);
+ modelAutoCreateEClass = createEClass(MODEL_AUTO_CREATE);
+ createEReference(modelAutoCreateEClass, MODEL_AUTO_CREATE__FEATURE);
+ createEReference(modelAutoCreateEClass, MODEL_AUTO_CREATE__ORIGIN);
+ createEReference(modelAutoCreateEClass, MODEL_AUTO_CREATE__CREATION_TYPE);
}
/**
@@ -815,7 +815,6 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
initEAttribute(getPapyrusDiagram_CustomStyle(), ecorePackage.getEString(), "customStyle", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPapyrusDiagram_ChildRules(), this.getChildRule(), null, "childRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPapyrusDiagram_PaletteRules(), this.getPaletteRule(), null, "paletteRules", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getPapyrusDiagram_Imports(), this.getElementImport(), null, "imports", null, 0, -1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(papyrusSyncTableEClass, PapyrusSyncTable.class, "PapyrusSyncTable", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
@@ -829,12 +828,12 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
initEReference(getModelRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getModelRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getModelRule_Multiplicity(), ecorePackage.getEInt(), "multiplicity", "-1", 1, 1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getModelRule_AutoSelectPath(), this.getPathElement(), null, "autoSelectPath", null, 0, -1, ModelRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(owningRuleEClass, OwningRule.class, "OwningRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getOwningRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getOwningRule_Stereotypes(), ecorePackage.getEClass(), null, "stereotypes", null, 0, -1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getOwningRule_Multiplicity(), ecorePackage.getEInt(), "multiplicity", "-1", 1, 1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getOwningRule_NewModelPath(), this.getModelAutoCreate(), null, "newModelPath", null, 0, -1, OwningRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(childRuleEClass, ChildRule.class, "ChildRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getChildRule_Element(), ecorePackage.getEClass(), null, "element", null, 0, 1, ChildRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -853,9 +852,10 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
initEClass(categoryEClass, Category.class, "Category", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getCategory_Name(), ecorePackage.getEString(), "name", null, 1, 1, Category.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEClass(elementImportEClass, ElementImport.class, "ElementImport", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getElementImport_From(), this.getPapyrusDiagram(), null, "from", null, 1, 1, ElementImport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getElementImport_Element(), ecorePackage.getEClass(), null, "element", null, 1, 1, ElementImport.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEClass(modelAutoCreateEClass, ModelAutoCreate.class, "ModelAutoCreate", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEReference(getModelAutoCreate_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, ModelAutoCreate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getModelAutoCreate_Origin(), ecorePackage.getEClass(), null, "origin", null, 1, 1, ModelAutoCreate.class, IS_TRANSIENT, IS_VOLATILE, !IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, IS_DERIVED, IS_ORDERED);
+ initEReference(getModelAutoCreate_CreationType(), ecorePackage.getEClass(), null, "creationType", null, 1, 1, ModelAutoCreate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java
deleted file mode 100755
index d1f39a65d94..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ElementImportImpl.java
+++ /dev/null
@@ -1,228 +0,0 @@
-/**
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
- */
-package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
-
-import org.eclipse.emf.common.notify.Notification;
-
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.InternalEObject;
-
-import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
-
-import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
-
-/**
- * <!-- begin-user-doc -->
- * An implementation of the model object '<em><b>Element Import</b></em>'.
- * <!-- end-user-doc -->
- * <p>
- * The following features are implemented:
- * <ul>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl#getFrom <em>From</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ElementImportImpl#getElement <em>Element</em>}</li>
- * </ul>
- * </p>
- *
- * @generated
- */
-public class ElementImportImpl extends MinimalEObjectImpl.Container implements ElementImport {
- /**
- * The cached value of the '{@link #getFrom() <em>From</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getFrom()
- * @generated
- * @ordered
- */
- protected PapyrusDiagram from;
-
- /**
- * The cached value of the '{@link #getElement() <em>Element</em>}' reference.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getElement()
- * @generated
- * @ordered
- */
- protected EClass element;
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- protected ElementImportImpl() {
- super();
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- protected EClass eStaticClass() {
- return ConfigurationPackage.Literals.ELEMENT_IMPORT;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrusDiagram getFrom() {
- if (from != null && from.eIsProxy()) {
- InternalEObject oldFrom = (InternalEObject)from;
- from = (PapyrusDiagram)eResolveProxy(oldFrom);
- if (from != oldFrom) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.ELEMENT_IMPORT__FROM, oldFrom, from));
- }
- }
- return from;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public PapyrusDiagram basicGetFrom() {
- return from;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setFrom(PapyrusDiagram newFrom) {
- PapyrusDiagram oldFrom = from;
- from = newFrom;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.ELEMENT_IMPORT__FROM, oldFrom, from));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass getElement() {
- if (element != null && element.eIsProxy()) {
- InternalEObject oldElement = (InternalEObject)element;
- element = (EClass)eResolveProxy(oldElement);
- if (element != oldElement) {
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.ELEMENT_IMPORT__ELEMENT, oldElement, element));
- }
- }
- return element;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public EClass basicGetElement() {
- return element;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- public void setElement(EClass newElement) {
- EClass oldElement = element;
- element = newElement;
- if (eNotificationRequired())
- eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.ELEMENT_IMPORT__ELEMENT, oldElement, element));
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public Object eGet(int featureID, boolean resolve, boolean coreType) {
- switch (featureID) {
- case ConfigurationPackage.ELEMENT_IMPORT__FROM:
- if (resolve) return getFrom();
- return basicGetFrom();
- case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
- if (resolve) return getElement();
- return basicGetElement();
- }
- return super.eGet(featureID, resolve, coreType);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eSet(int featureID, Object newValue) {
- switch (featureID) {
- case ConfigurationPackage.ELEMENT_IMPORT__FROM:
- setFrom((PapyrusDiagram)newValue);
- return;
- case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
- setElement((EClass)newValue);
- return;
- }
- super.eSet(featureID, newValue);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public void eUnset(int featureID) {
- switch (featureID) {
- case ConfigurationPackage.ELEMENT_IMPORT__FROM:
- setFrom((PapyrusDiagram)null);
- return;
- case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
- setElement((EClass)null);
- return;
- }
- super.eUnset(featureID);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public boolean eIsSet(int featureID) {
- switch (featureID) {
- case ConfigurationPackage.ELEMENT_IMPORT__FROM:
- return from != null;
- case ConfigurationPackage.ELEMENT_IMPORT__ELEMENT:
- return element != null;
- }
- return super.eIsSet(featureID);
- }
-
-} //ElementImportImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java
new file mode 100755
index 00000000000..4f404b4ba70
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java
@@ -0,0 +1,256 @@
+/**
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
+import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Model Auto Create</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl#getFeature <em>Feature</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl#getOrigin <em>Origin</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelAutoCreateImpl#getCreationType <em>Creation Type</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements ModelAutoCreate {
+ /**
+ * The cached value of the '{@link #getFeature() <em>Feature</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getFeature()
+ * @generated
+ * @ordered
+ */
+ protected EReference feature;
+
+ /**
+ * The cached value of the '{@link #getCreationType() <em>Creation Type</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getCreationType()
+ * @generated
+ * @ordered
+ */
+ protected EClass creationType;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected ModelAutoCreateImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.MODEL_AUTO_CREATE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getFeature() {
+ if (feature != null && feature.eIsProxy()) {
+ InternalEObject oldFeature = (InternalEObject)feature;
+ feature = (EReference)eResolveProxy(oldFeature);
+ if (feature != oldFeature) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE, oldFeature, feature));
+ }
+ }
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference basicGetFeature() {
+ return feature;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setFeature(EReference newFeature) {
+ EReference oldFeature = feature;
+ feature = newFeature;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE, oldFeature, feature));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getOrigin() {
+ EClass origin = basicGetOrigin();
+ return origin != null && origin.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)origin) : origin;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ */
+ public EClass basicGetOrigin() {
+ OwningRule rule = (OwningRule) this.eContainer();
+ EList<ModelAutoCreate> list = rule.getNewModelPath();
+ int index = list.indexOf(this);
+ if (index == 0)
+ return rule.getElement();
+ return list.get(index - 1).getCreationType();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getCreationType() {
+ if (creationType != null && creationType.eIsProxy()) {
+ InternalEObject oldCreationType = (InternalEObject)creationType;
+ creationType = (EClass)eResolveProxy(oldCreationType);
+ if (creationType != oldCreationType) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE, oldCreationType, creationType));
+ }
+ }
+ return creationType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass basicGetCreationType() {
+ return creationType;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setCreationType(EClass newCreationType) {
+ EClass oldCreationType = creationType;
+ creationType = newCreationType;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE, oldCreationType, creationType));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE:
+ if (resolve) return getFeature();
+ return basicGetFeature();
+ case ConfigurationPackage.MODEL_AUTO_CREATE__ORIGIN:
+ if (resolve) return getOrigin();
+ return basicGetOrigin();
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ if (resolve) return getCreationType();
+ return basicGetCreationType();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE:
+ setFeature((EReference)newValue);
+ return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ setCreationType((EClass)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE:
+ setFeature((EReference)null);
+ return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ setCreationType((EClass)null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE:
+ return feature != null;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__ORIGIN:
+ return basicGetOrigin() != null;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ return creationType != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+} //ModelAutoCreateImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
index 75149e650b0..73683edb0db 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
@@ -15,17 +15,13 @@ package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
-import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
-import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
/**
* <!-- begin-user-doc -->
@@ -37,7 +33,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getElement <em>Element</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getStereotypes <em>Stereotypes</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getMultiplicity <em>Multiplicity</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.ModelRuleImpl#getAutoSelectPath <em>Auto Select Path</em>}</li>
* </ul>
* </p>
*
@@ -85,16 +80,6 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
protected int multiplicity = MULTIPLICITY_EDEFAULT;
/**
- * The cached value of the '{@link #getAutoSelectPath() <em>Auto Select Path</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getAutoSelectPath()
- * @generated
- * @ordered
- */
- protected EList<PathElement> autoSelectPath;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -189,32 +174,6 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
* <!-- end-user-doc -->
* @generated
*/
- public EList<PathElement> getAutoSelectPath() {
- if (autoSelectPath == null) {
- autoSelectPath = new EObjectContainmentEList<PathElement>(PathElement.class, this, ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH);
- }
- return autoSelectPath;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
- @Override
- public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
- switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
- return ((InternalEList<?>)getAutoSelectPath()).basicRemove(otherEnd, msgs);
- }
- return super.eInverseRemove(otherEnd, featureID, msgs);
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
@@ -225,8 +184,6 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
return getStereotypes();
case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
return getMultiplicity();
- case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
- return getAutoSelectPath();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -250,10 +207,6 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
setMultiplicity((Integer)newValue);
return;
- case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
- getAutoSelectPath().clear();
- getAutoSelectPath().addAll((Collection<? extends PathElement>)newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -275,9 +228,6 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
setMultiplicity(MULTIPLICITY_EDEFAULT);
return;
- case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
- getAutoSelectPath().clear();
- return;
}
super.eUnset(featureID);
}
@@ -296,8 +246,6 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
return stereotypes != null && !stereotypes.isEmpty();
case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
return multiplicity != MULTIPLICITY_EDEFAULT;
- case ConfigurationPackage.MODEL_RULE__AUTO_SELECT_PATH:
- return autoSelectPath != null && !autoSelectPath.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
index 4b75d1292e8..4cb3c9bff4f 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
@@ -16,14 +16,18 @@ package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
+import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
/**
@@ -36,6 +40,7 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getElement <em>Element</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getStereotypes <em>Stereotypes</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getMultiplicity <em>Multiplicity</em>}</li>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.OwningRuleImpl#getNewModelPath <em>New Model Path</em>}</li>
* </ul>
* </p>
*
@@ -83,6 +88,16 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
protected int multiplicity = MULTIPLICITY_EDEFAULT;
/**
+ * The cached value of the '{@link #getNewModelPath() <em>New Model Path</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getNewModelPath()
+ * @generated
+ * @ordered
+ */
+ protected EList<ModelAutoCreate> newModelPath;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -177,6 +192,32 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
* <!-- end-user-doc -->
* @generated
*/
+ public EList<ModelAutoCreate> getNewModelPath() {
+ if (newModelPath == null) {
+ newModelPath = new EObjectContainmentEList<ModelAutoCreate>(ModelAutoCreate.class, this, ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH);
+ }
+ return newModelPath;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
+ switch (featureID) {
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ return ((InternalEList<?>)getNewModelPath()).basicRemove(otherEnd, msgs);
+ }
+ return super.eInverseRemove(otherEnd, featureID, msgs);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
@@ -187,6 +228,8 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
return getStereotypes();
case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
return getMultiplicity();
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ return getNewModelPath();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -210,6 +253,10 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
setMultiplicity((Integer)newValue);
return;
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ getNewModelPath().clear();
+ getNewModelPath().addAll((Collection<? extends ModelAutoCreate>)newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -231,6 +278,9 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
setMultiplicity(MULTIPLICITY_EDEFAULT);
return;
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ getNewModelPath().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -249,6 +299,8 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
return stereotypes != null && !stereotypes.isEmpty();
case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
return multiplicity != MULTIPLICITY_EDEFAULT;
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ return newModelPath != null && !newModelPath.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
index 7aa81c0eb8f..e2dac6f2c9a 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
@@ -24,7 +24,6 @@ import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport;
import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
@@ -39,7 +38,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getCustomStyle <em>Custom Style</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getChildRules <em>Child Rules</em>}</li>
* <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getPaletteRules <em>Palette Rules</em>}</li>
- * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.PapyrusDiagramImpl#getImports <em>Imports</em>}</li>
* </ul>
* </p>
*
@@ -107,16 +105,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
protected EList<PaletteRule> paletteRules;
/**
- * The cached value of the '{@link #getImports() <em>Imports</em>}' containment reference list.
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @see #getImports()
- * @generated
- * @ordered
- */
- protected EList<ElementImport> imports;
-
- /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -206,18 +194,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
* <!-- end-user-doc -->
* @generated
*/
- public EList<ElementImport> getImports() {
- if (imports == null) {
- imports = new EObjectContainmentEList<ElementImport>(ElementImport.class, this, ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS);
- }
- return imports;
- }
-
- /**
- * <!-- begin-user-doc -->
- * <!-- end-user-doc -->
- * @generated
- */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
@@ -225,8 +201,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
return ((InternalEList<?>)getChildRules()).basicRemove(otherEnd, msgs);
case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
return ((InternalEList<?>)getPaletteRules()).basicRemove(otherEnd, msgs);
- case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
- return ((InternalEList<?>)getImports()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -247,8 +221,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
return getChildRules();
case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
return getPaletteRules();
- case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
- return getImports();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -276,10 +248,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
getPaletteRules().clear();
getPaletteRules().addAll((Collection<? extends PaletteRule>)newValue);
return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
- getImports().clear();
- getImports().addAll((Collection<? extends ElementImport>)newValue);
- return;
}
super.eSet(featureID, newValue);
}
@@ -304,9 +272,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
getPaletteRules().clear();
return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
- getImports().clear();
- return;
}
super.eUnset(featureID);
}
@@ -327,8 +292,6 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
return childRules != null && !childRules.isEmpty();
case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
return paletteRules != null && !paletteRules.isEmpty();
- case ConfigurationPackage.PAPYRUS_DIAGRAM__IMPORTS:
- return imports != null && !imports.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
index 20cf5683b4d..aef427bf7d6 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
@@ -22,9 +22,6 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
-import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
-import org.eclipse.papyrus.infra.viewpoints.configuration.OwningRule;
-import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
/**
@@ -125,25 +122,10 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
* <!-- end-user-doc -->
*/
public EClass basicGetOrigin() {
- if (this.eContainer() instanceof ChildRule)
- return basicGetOriginChildRule();
- return basicGetOriginModelRule();
- }
-
- private EClass basicGetOriginChildRule() {
ChildRule rule = (ChildRule) this.eContainer();
return basicGetOriginFrom(rule.getInsertionPath(), rule.getOrigin());
}
- private EClass basicGetOriginModelRule() {
- ModelRule rule = (ModelRule)this.eContainer();
- PapyrusView view = (PapyrusView) rule.eContainer();
- OwningRule or = (view.getOwningRules().size() >= 1) ? view.getOwningRules().get(0) : null;
- if (or != null)
- return basicGetOriginFrom(rule.getAutoSelectPath(), or.getElement());
- return null;
- }
-
private EClass basicGetOriginFrom(EList<PathElement> list, EClass from) {
EClass current = from;
int index = 0;
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
index b4a8bfdad47..1b8eb67a6a3 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
@@ -132,8 +132,8 @@ public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
return createCategoryAdapter();
}
@Override
- public Adapter caseElementImport(ElementImport object) {
- return createElementImportAdapter();
+ public Adapter caseModelAutoCreate(ModelAutoCreate object) {
+ return createModelAutoCreateAdapter();
}
@Override
public Adapter caseArchitectureFramework(ArchitectureFramework object) {
@@ -354,16 +354,16 @@ public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
}
/**
- * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ElementImport <em>Element Import</em>}'.
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate <em>Model Auto Create</em>}'.
* <!-- begin-user-doc -->
* 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.infra.viewpoints.configuration.ElementImport
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate
* @generated
*/
- public Adapter createElementImportAdapter() {
+ public Adapter createModelAutoCreateAdapter() {
return null;
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
index 4b8fceb879a..7d3018c6d6b 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
@@ -175,9 +175,9 @@ public class ConfigurationSwitch<T> extends Switch<T> {
if (result == null) result = defaultCase(theEObject);
return result;
}
- case ConfigurationPackage.ELEMENT_IMPORT: {
- ElementImport elementImport = (ElementImport)theEObject;
- T result = caseElementImport(elementImport);
+ case ConfigurationPackage.MODEL_AUTO_CREATE: {
+ ModelAutoCreate modelAutoCreate = (ModelAutoCreate)theEObject;
+ T result = caseModelAutoCreate(modelAutoCreate);
if (result == null) result = defaultCase(theEObject);
return result;
}
@@ -381,17 +381,17 @@ public class ConfigurationSwitch<T> extends Switch<T> {
}
/**
- * Returns the result of interpreting the object as an instance of '<em>Element Import</em>'.
+ * Returns the result of interpreting the object as an instance of '<em>Model Auto Create</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch.
* <!-- end-user-doc -->
* @param object the target of the switch.
- * @return the result of interpreting the object as an instance of '<em>Element Import</em>'.
+ * @return the result of interpreting the object as an instance of '<em>Model Auto Create</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
- public T caseElementImport(ElementImport object) {
+ public T caseModelAutoCreate(ModelAutoCreate object) {
return null;
}

Back to the top