Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-04-23 16:13:35 +0000
committerChristian W. Damus2015-04-28 20:39:02 +0000
commit5175ebff02ca6261d791dfd9c42f9cc81df0b3b3 (patch)
tree3b00094f7344c7efbb4b668a31655e3f2b51f704 /plugins/infra/viewpoints
parentdadd3ac93fecbeeb79a5f5cbb9e3fd520abd0a1b (diff)
downloadorg.eclipse.papyrus-5175ebff02ca6261d791dfd9c42f9cc81df0b3b3.tar.gz
org.eclipse.papyrus-5175ebff02ca6261d791dfd9c42f9cc81df0b3b3.tar.xz
org.eclipse.papyrus-5175ebff02ca6261d791dfd9c42f9cc81df0b3b3.zip
Bug 463156: [Assistants] Integrate with viewpoints for filtering
https://bugs.eclipse.org/bugs/show_bug.cgi?id=463156 Add a Modeling Assistant filtering rule to the Viewpoint Configurations model. This allows a viewpoint author to constrain the modeling assistants (by element type ID pattern) applicable to diagrams in the same fashion as palette tools. Some additional changes are made to clean up re-generation of the code from the model: * enable formatting and clean-up in the genmodel * update the copyright for generation of new files * disable generation of a resource implementation, as we have a custom resource factory for this model * turn off generation of creation icons, since using the composed icons is sufficient for our purposes and for some reason we use PNGs anyways * git-ignore the GIF images that EMF will always generate because for some reason we use PNGs instead The viewpoints PolicyChecker adds API to test filtering of modeling assistants. The model-based diagram assistants provider is updated to filter its results through the active PolicyChecker. Generate the tests bundle for the Viewpoints Configuration model, implement test TODOs, and create a JUnit launch configuration. Integrate the tests into the master Papyrus test suite. Change-Id: Ia5e898fca38231fefa7e8351961fd63182f81d0f Reviewed-on: https://git.eclipse.org/r/46382 Tested-by: Hudson CI Reviewed-by: Christian W. Damus <give.a.damus@gmail.com>
Diffstat (limited to 'plugins/infra/viewpoints')
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/META-INF/MANIFEST.MF21
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/.gitignore1
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.pngbin480 -> 0 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.pngbin595 -> 0 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.pngbin629 -> 0 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.pngbin674 -> 0 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.pngbin626 -> 0 bytes
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/AssistantRule.pngbin0 -> 7291 bytes
-rw-r--r--[-rwxr-xr-x]plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/plugin.properties9
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/AssistantRuleItemProvider.java154
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java51
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java97
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java11
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java133
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java93
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java135
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java111
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java43
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java91
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java94
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java13
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java43
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java169
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java57
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java87
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RootAutoSelectItemProvider.java55
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java47
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/META-INF/MANIFEST.MF8
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.ecore23
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel23
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/AssistantRule.java85
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java20
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java188
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java27
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleImpl.java202
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java39
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java128
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java126
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java227
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java87
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java166
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java147
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java39
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java106
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java151
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java12
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java39
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java192
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java46
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java74
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RootAutoSelectImpl.java46
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java39
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java227
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceFactoryImpl.java12
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceImpl.java13
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java326
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java72
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleCustomImpl.java115
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryCustomImpl.java18
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java57
60 files changed, 3019 insertions, 1576 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 b2b32a5dbd8..2457f26af5f 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
@@ -1,25 +1,22 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.core.runtime,
- org.eclipse.emf.edit,
- org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.constraints.edit;bundle-version="1.1.0",
+ org.eclipse.emf.edit;visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.constraints.edit;bundle-version="1.1.0";visibility:=reexport,
org.eclipse.emf.ecore,
org.eclipse.emf.ecore.edit,
- org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.iso42010.edit;bundle-version="1.1.0"
-Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration.pro
- vider
+ org.eclipse.papyrus.infra.viewpoints.configuration;bundle-version="1.1.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.1.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.viewpoints.iso42010.edit;bundle-version="1.1.0";visibility:=reexport
+Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration.provider
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
Bundle-Version: 1.1.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/icons/full/.gitignore b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/.gitignore
new file mode 100644
index 00000000000..2d0c92986b9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/.gitignore
@@ -0,0 +1 @@
+*.gif
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.png
deleted file mode 100755
index 298c65024cb..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreateChildRule_insertionPath_PathElement.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.png
deleted file mode 100755
index 8e4881ab36f..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_childRules_ChildRule.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.png
deleted file mode 100755
index 9cbe852aee8..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusDiagram_paletteRules_PaletteRule.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.png
deleted file mode 100755
index 3be5941ebc8..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_modelRules_ModelRule.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.png
deleted file mode 100755
index f8826cd1b04..00000000000
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/ctool16/CreatePapyrusView_owningRules_OwningRule.png
+++ /dev/null
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/AssistantRule.png b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/AssistantRule.png
new file mode 100644
index 00000000000..dbad2213d36
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/AssistantRule.png
Binary files differ
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 5a5ed1f3d0c..3a22d3e508e 100755..100644
--- 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
@@ -1,5 +1,5 @@
##########################################################################################
-# Copyright (c) 2013 CEA LIST.
+# Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
#
#
# All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
#
# Contributors:
# Laurent Wouters (CEA LIST) laurent.wouters@cea.fr - Initial API and implementation
+# Christian W. Damus - bug 463156
#
########################################################################################
@@ -98,3 +99,9 @@ _UI_RootAutoSelect_type = Root Auto Select
_UI_OwningRule_selectDiagramRoot_feature = Select Diagram Root
_UI_RootAutoSelect_feature_feature = Feature
_UI_RootAutoSelect_origin_feature = Origin
+_UI_AssistantRule_type = Assistant Rule
+_UI_AssistantRule_label = Assistant: {0} => {1}
+_UI_AssistantRule_elementTypeID_feature = Element Type ID
+_UI_PapyrusDiagram_assistantRules_feature = Assistant Rules
+_UI_allow = allow
+_UI_deny = deny
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/AssistantRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/AssistantRuleItemProvider.java
new file mode 100644
index 00000000000..ae28bf90686
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/AssistantRuleItemProvider.java
@@ -0,0 +1,154 @@
+/**
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
+
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
+import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
+import org.eclipse.emf.edit.provider.ViewerNotification;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+
+/**
+ * This is the item provider adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule} object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class AssistantRuleItemProvider extends RuleItemProvider {
+ /**
+ * This constructs an instance from a factory and a notifier.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public AssistantRuleItemProvider(AdapterFactory adapterFactory) {
+ super(adapterFactory);
+ }
+
+ /**
+ * This returns the property descriptors for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
+ if (itemPropertyDescriptors == null) {
+ super.getPropertyDescriptors(object);
+
+ addElementTypeIDPropertyDescriptor(object);
+ }
+ return itemPropertyDescriptors;
+ }
+
+ /**
+ * This adds a property descriptor for the Element Type ID feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected void addElementTypeIDPropertyDescriptor(Object object) {
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_AssistantRule_elementTypeID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_AssistantRule_elementTypeID_feature", "_UI_AssistantRule_type"),
+ ConfigurationPackage.Literals.ASSISTANT_RULE__ELEMENT_TYPE_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * This returns AssistantRule.gif.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT - custom image
+ */
+ @Override
+ public Object getImage(Object object) {
+ return overlayImage(object, getResourceLocator().getImage("full/obj16/AssistantRule.png"));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
+ * This returns the label text for the adapted class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ @Override
+ public String getText(Object object) {
+ AssistantRule rule = (AssistantRule) object;
+ String pattern = rule.getElementTypeID();
+ if ((pattern == null) || pattern.isEmpty()) {
+ pattern = "*";
+ }
+ String permit = rule.isPermit() ? getString("_UI_allow") : getString("_UI_deny");
+ return getString("_UI_AssistantRule_label", new Object[] { pattern, permit });
+ }
+
+
+ /**
+ * This handles model notifications by calling {@link #updateChildren} to update any cached
+ * children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void notifyChanged(Notification notification) {
+ updateChildren(notification);
+
+ switch (notification.getFeatureID(AssistantRule.class)) {
+ case ConfigurationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ }
+ super.notifyChanged(notification);
+ }
+
+ /**
+ * This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
+ * that can be created under this object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
+ super.collectNewChildDescriptors(newChildDescriptors, object);
+ }
+
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java
index 1c57fbc36f7..351ef091a64 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/CategoryItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*
*/
@@ -81,19 +82,17 @@ public class CategoryItemProvider
* @generated
*/
protected void addNamePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Category_name_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Category_name_feature", "_UI_Category_type"),
- ConfigurationPackage.Literals.CATEGORY__NAME,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Category_name_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Category_name_feature", "_UI_Category_type"),
+ ConfigurationPackage.Literals.CATEGORY__NAME,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -109,6 +108,16 @@ public class CategoryItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -116,10 +125,8 @@ public class CategoryItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((Category)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_Category_type") :
- getString("_UI_Category_type") + " " + label;
+ String label = ((Category) object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_Category_type") : getString("_UI_Category_type") + " " + label;
}
@@ -135,9 +142,9 @@ public class CategoryItemProvider
updateChildren(notification);
switch (notification.getFeatureID(Category.class)) {
- case ConfigurationPackage.CATEGORY__NAME:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case ConfigurationPackage.CATEGORY__NAME:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
@@ -162,7 +169,7 @@ public class CategoryItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java
index d605ca021ba..59a66e51630 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ChildRuleItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -73,19 +74,17 @@ public class ChildRuleItemProvider
* @generated NOT
*/
protected void addElementPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EClassPropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ChildRule_element_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_element_feature", "_UI_ChildRule_type"),
- ConfigurationPackage.Literals.CHILD_RULE__ELEMENT,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EClassPropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_element_feature", "_UI_ChildRule_type"),
+ ConfigurationPackage.Literals.CHILD_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -96,19 +95,17 @@ public class ChildRuleItemProvider
* @generated NOT
*/
protected void addStereotypesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new StereotypePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ChildRule_stereotypes_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_stereotypes_feature", "_UI_ChildRule_type"),
- ConfigurationPackage.Literals.CHILD_RULE__STEREOTYPES,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new StereotypePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_stereotypes_feature", "_UI_ChildRule_type"),
+ ConfigurationPackage.Literals.CHILD_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -119,19 +116,17 @@ public class ChildRuleItemProvider
* @generated NOT
*/
protected void addOriginPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EClassPropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ChildRule_origin_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_origin_feature", "_UI_ChildRule_type"),
- ConfigurationPackage.Literals.CHILD_RULE__ORIGIN,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EClassPropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ChildRule_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ChildRule_origin_feature", "_UI_ChildRule_type"),
+ ConfigurationPackage.Literals.CHILD_RULE__ORIGIN,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -177,6 +172,16 @@ public class ChildRuleItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -215,9 +220,9 @@ public class ChildRuleItemProvider
updateChildren(notification);
switch (notification.getFeatureID(ChildRule.class)) {
- case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -233,10 +238,8 @@ public class ChildRuleItemProvider
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.CHILD_RULE__INSERTION_PATH,
- ConfigurationFactory.eINSTANCE.createPathElement()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.CHILD_RULE__INSERTION_PATH,
+ ConfigurationFactory.eINSTANCE.createPathElement()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java
index 1f1bf7dd1f2..900c9f4c6fb 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationEditPlugin.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -48,11 +49,9 @@ public final class ConfigurationEditPlugin extends EMFPlugin {
* @generated
*/
public ConfigurationEditPlugin() {
- super
- (new ResourceLocator [] {
- ConstraintsEditPlugin.INSTANCE,
- Iso42010EditPlugin.INSTANCE,
- });
+ super(new ResourceLocator[] {
+ ConstraintsEditPlugin.INSTANCE,
+ Iso42010EditPlugin.INSTANCE, });
}
/**
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
index 2578b0e8d55..8725b15be49 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ConfigurationItemProviderAdapterFactory.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -425,6 +426,29 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
}
/**
+ * This keeps track of the one adapter used for all {@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule} instances.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AssistantRuleItemProvider assistantRuleItemProvider;
+
+ /**
+ * This creates an adapter for a {@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Adapter createAssistantRuleAdapter() {
+ if (assistantRuleItemProvider == null) {
+ assistantRuleItemProvider = new AssistantRuleItemProvider(this);
+ }
+
+ return assistantRuleItemProvider;
+ }
+
+ /**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -474,7 +498,7 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
public Object adapt(Object object, Object type) {
if (isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
- if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
+ if (!(type instanceof Class<?>) || (((Class<?>) type).isInstance(adapter))) {
return adapter;
}
}
@@ -544,26 +568,57 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
}
/**
- * This disposes all of the item providers created by this factory.
+ * This disposes all of the item providers created by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void dispose() {
- if (papyrusConfigurationItemProvider != null) papyrusConfigurationItemProvider.dispose();
- if (papyrusViewpointItemProvider != null) papyrusViewpointItemProvider.dispose();
- if (papyrusViewItemProvider != null) papyrusViewItemProvider.dispose();
- if (papyrusDiagramItemProvider != null) papyrusDiagramItemProvider.dispose();
- if (papyrusSyncTableItemProvider != null) papyrusSyncTableItemProvider.dispose();
- if (papyrusTableItemProvider != null) papyrusTableItemProvider.dispose();
- if (modelRuleItemProvider != null) modelRuleItemProvider.dispose();
- if (owningRuleItemProvider != null) owningRuleItemProvider.dispose();
- if (childRuleItemProvider != null) childRuleItemProvider.dispose();
- if (paletteRuleItemProvider != null) paletteRuleItemProvider.dispose();
- if (pathElementItemProvider != null) pathElementItemProvider.dispose();
- if (categoryItemProvider != null) categoryItemProvider.dispose();
- if (modelAutoCreateItemProvider != null) modelAutoCreateItemProvider.dispose();
- if (rootAutoSelectItemProvider != null) rootAutoSelectItemProvider.dispose();
+ if (papyrusConfigurationItemProvider != null) {
+ papyrusConfigurationItemProvider.dispose();
+ }
+ if (papyrusViewpointItemProvider != null) {
+ papyrusViewpointItemProvider.dispose();
+ }
+ if (papyrusViewItemProvider != null) {
+ papyrusViewItemProvider.dispose();
+ }
+ if (papyrusDiagramItemProvider != null) {
+ papyrusDiagramItemProvider.dispose();
+ }
+ if (papyrusSyncTableItemProvider != null) {
+ papyrusSyncTableItemProvider.dispose();
+ }
+ if (papyrusTableItemProvider != null) {
+ papyrusTableItemProvider.dispose();
+ }
+ if (modelRuleItemProvider != null) {
+ modelRuleItemProvider.dispose();
+ }
+ if (owningRuleItemProvider != null) {
+ owningRuleItemProvider.dispose();
+ }
+ if (childRuleItemProvider != null) {
+ childRuleItemProvider.dispose();
+ }
+ if (paletteRuleItemProvider != null) {
+ paletteRuleItemProvider.dispose();
+ }
+ if (pathElementItemProvider != null) {
+ pathElementItemProvider.dispose();
+ }
+ if (categoryItemProvider != null) {
+ categoryItemProvider.dispose();
+ }
+ if (modelAutoCreateItemProvider != null) {
+ modelAutoCreateItemProvider.dispose();
+ }
+ if (rootAutoSelectItemProvider != null) {
+ rootAutoSelectItemProvider.dispose();
+ }
+ if (assistantRuleItemProvider != null) {
+ assistantRuleItemProvider.dispose();
+ }
}
/**
@@ -614,10 +669,8 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
*/
@Override
public Object caseArchitectureDescription(ArchitectureDescription object) {
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__VIEWPOINTS,
- ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_DESCRIPTION__VIEWPOINTS,
+ ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
return null;
}
@@ -629,25 +682,17 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
*/
@Override
public Object caseArchitectureViewpoint(ArchitectureViewpoint object) {
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusView()));
-
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusDiagram()));
-
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusSyncTable()));
-
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusTable()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusView()));
+
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusDiagram()));
+
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusSyncTable()));
+
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusTable()));
return null;
}
@@ -659,10 +704,8 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
*/
@Override
public Object caseArchitectureFramework(ArchitectureFramework object) {
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS,
- ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS,
+ ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
return null;
}
@@ -685,7 +728,7 @@ public class ConfigurationItemProviderAdapterFactory extends ConfigurationAdapte
*/
public Collection<Object> getNewChildDescriptors(Object object, EditingDomain editingDomain) {
ArrayList<Object> result = new ArrayList<Object>();
- new CreationSwitch(result, editingDomain).doSwitch((EObject)object);
+ new CreationSwitch(result, editingDomain).doSwitch((EObject) object);
return result;
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java
index 0db4a6756eb..49fd7039bba 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelAutoCreateItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*
*/
@@ -88,19 +89,17 @@ public class ModelAutoCreateItemProvider
* @generated NOT
*/
protected void addFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EReferencePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- 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,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EReferencePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ 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,
+ null,
+ null,
+ null)));
}
/**
@@ -110,19 +109,17 @@ public class ModelAutoCreateItemProvider
* @generated
*/
protected void addOriginPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- 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));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ 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));
}
/**
@@ -133,19 +130,17 @@ public class ModelAutoCreateItemProvider
* @generated NOT
*/
protected void addCreationTypePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new ComplexTypePropertyDescriptor(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,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null)));
+ itemPropertyDescriptors.add(new ComplexTypePropertyDescriptor(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,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null)));
}
/**
@@ -161,6 +156,16 @@ public class ModelAutoCreateItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -193,9 +198,9 @@ public class ModelAutoCreateItemProvider
updateChildren(notification);
switch (notification.getFeatureID(ModelAutoCreate.class)) {
- case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
@@ -220,7 +225,7 @@ public class ModelAutoCreateItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
index 65df56342a4..6786709fd53 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/ModelRuleItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -75,19 +76,17 @@ public class ModelRuleItemProvider
* @generated
*/
protected void addElementMultiplicityPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_DisplayUnit_elementMultiplicity_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_DisplayUnit_elementMultiplicity_feature", "_UI_DisplayUnit_type"),
- ConstraintsPackage.Literals.DISPLAY_UNIT__ELEMENT_MULTIPLICITY,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_DisplayUnit_elementMultiplicity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_DisplayUnit_elementMultiplicity_feature", "_UI_DisplayUnit_type"),
+ ConstraintsPackage.Literals.DISPLAY_UNIT__ELEMENT_MULTIPLICITY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -98,19 +97,17 @@ public class ModelRuleItemProvider
* @generated NOT
*/
protected void addElementPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EClassPropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ModelRule_element_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_element_feature", "_UI_ModelRule_type"),
- ConfigurationPackage.Literals.MODEL_RULE__ELEMENT,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EClassPropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_element_feature", "_UI_ModelRule_type"),
+ ConfigurationPackage.Literals.MODEL_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -121,19 +118,17 @@ public class ModelRuleItemProvider
* @generated NOT
*/
protected void addStereotypesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new StereotypePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ModelRule_stereotypes_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_stereotypes_feature", "_UI_ModelRule_type"),
- ConfigurationPackage.Literals.MODEL_RULE__STEREOTYPES,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new StereotypePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_stereotypes_feature", "_UI_ModelRule_type"),
+ ConfigurationPackage.Literals.MODEL_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -143,19 +138,17 @@ public class ModelRuleItemProvider
* @generated
*/
protected void addMultiplicityPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_ModelRule_multiplicity_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_multiplicity_feature", "_UI_ModelRule_type"),
- ConfigurationPackage.Literals.MODEL_RULE__MULTIPLICITY,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_ModelRule_multiplicity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_ModelRule_multiplicity_feature", "_UI_ModelRule_type"),
+ ConfigurationPackage.Literals.MODEL_RULE__MULTIPLICITY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -201,6 +194,16 @@ public class ModelRuleItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -239,13 +242,13 @@ public class ModelRuleItemProvider
updateChildren(notification);
switch (notification.getFeatureID(ModelRule.class)) {
- case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
- case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -261,15 +264,11 @@ public class ModelRuleItemProvider
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (ConstraintsPackage.Literals.DISPLAY_UNIT__CONSTRAINTS,
- ConstraintsFactory.eINSTANCE.createSimpleConstraint()));
+ newChildDescriptors.add(createChildParameter(ConstraintsPackage.Literals.DISPLAY_UNIT__CONSTRAINTS,
+ ConstraintsFactory.eINSTANCE.createSimpleConstraint()));
- newChildDescriptors.add
- (createChildParameter
- (ConstraintsPackage.Literals.DISPLAY_UNIT__CONSTRAINTS,
- ConstraintsFactory.eINSTANCE.createCompositeConstraint()));
+ newChildDescriptors.add(createChildParameter(ConstraintsPackage.Literals.DISPLAY_UNIT__CONSTRAINTS,
+ ConstraintsFactory.eINSTANCE.createCompositeConstraint()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
index fbcdfe56364..e89dd7fd771 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/OwningRuleItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -73,19 +74,17 @@ public class OwningRuleItemProvider
* @generated NOT
*/
protected void addElementPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EClassPropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_OwningRule_element_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_element_feature", "_UI_OwningRule_type"),
- ConfigurationPackage.Literals.OWNING_RULE__ELEMENT,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EClassPropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OwningRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_element_feature", "_UI_OwningRule_type"),
+ ConfigurationPackage.Literals.OWNING_RULE__ELEMENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -96,19 +95,17 @@ public class OwningRuleItemProvider
* @generated NOT
*/
protected void addStereotypesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new StereotypePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_OwningRule_stereotypes_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_stereotypes_feature", "_UI_OwningRule_type"),
- ConfigurationPackage.Literals.OWNING_RULE__STEREOTYPES,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new StereotypePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OwningRule_stereotypes_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_stereotypes_feature", "_UI_OwningRule_type"),
+ ConfigurationPackage.Literals.OWNING_RULE__STEREOTYPES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -118,19 +115,17 @@ public class OwningRuleItemProvider
* @generated
*/
protected void addMultiplicityPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_OwningRule_multiplicity_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_multiplicity_feature", "_UI_OwningRule_type"),
- ConfigurationPackage.Literals.OWNING_RULE__MULTIPLICITY,
- true,
- false,
- false,
- ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_OwningRule_multiplicity_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_OwningRule_multiplicity_feature", "_UI_OwningRule_type"),
+ ConfigurationPackage.Literals.OWNING_RULE__MULTIPLICITY,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -177,6 +172,16 @@ public class OwningRuleItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -215,13 +220,13 @@ public class OwningRuleItemProvider
updateChildren(notification);
switch (notification.getFeatureID(OwningRule.class)) {
- case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
- case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -237,15 +242,11 @@ public class OwningRuleItemProvider
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()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.OWNING_RULE__NEW_MODEL_PATH,
+ ConfigurationFactory.eINSTANCE.createModelAutoCreate()));
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.OWNING_RULE__SELECT_DIAGRAM_ROOT,
- ConfigurationFactory.eINSTANCE.createRootAutoSelect()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.OWNING_RULE__SELECT_DIAGRAM_ROOT,
+ ConfigurationFactory.eINSTANCE.createRootAutoSelect()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java
index 2a13b66c6b4..2cc754a7adb 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PaletteRuleItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -67,19 +68,17 @@ public class PaletteRuleItemProvider
* @generated
*/
protected void addElementPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PaletteRule_element_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PaletteRule_element_feature", "_UI_PaletteRule_type"),
- ConfigurationPackage.Literals.PALETTE_RULE__ELEMENT,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PaletteRule_element_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PaletteRule_element_feature", "_UI_PaletteRule_type"),
+ ConfigurationPackage.Literals.PALETTE_RULE__ELEMENT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -95,6 +94,16 @@ public class PaletteRuleItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -121,9 +130,9 @@ public class PaletteRuleItemProvider
updateChildren(notification);
switch (notification.getFeatureID(PaletteRule.class)) {
- case ConfigurationPackage.PALETTE_RULE__ELEMENT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java
index 2e110d91791..2df4e7d7ece 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusConfigurationItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -75,19 +76,17 @@ public class PapyrusConfigurationItemProvider
* @generated
*/
protected void addDefaultStakeholderPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusConfiguration_defaultStakeholder_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_defaultStakeholder_feature", "_UI_PapyrusConfiguration_type"),
- ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER,
- true,
- false,
- true,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusConfiguration_defaultStakeholder_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_defaultStakeholder_feature", "_UI_PapyrusConfiguration_type"),
+ ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
@@ -98,19 +97,17 @@ public class PapyrusConfigurationItemProvider
* @generated NOT
*/
protected void addMetamodelPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EPackagePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusConfiguration_metamodel_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_metamodel_feature", "_UI_PapyrusConfiguration_type"),
- ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__METAMODEL,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EPackagePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusConfiguration_metamodel_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusConfiguration_metamodel_feature", "_UI_PapyrusConfiguration_type"),
+ ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__METAMODEL,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -156,6 +153,16 @@ public class PapyrusConfigurationItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -181,9 +188,9 @@ public class PapyrusConfigurationItemProvider
updateChildren(notification);
switch (notification.getFeatureID(PapyrusConfiguration.class)) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -196,20 +203,14 @@ public class PapyrusConfigurationItemProvider
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS,
- ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
-
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS,
- Iso42010Factory.eINSTANCE.createStakeholder()));
-
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__CATEGORIES,
- ConfigurationFactory.eINSTANCE.createCategory()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__VIEWPOINTS,
+ ConfigurationFactory.eINSTANCE.createPapyrusViewpoint()));
+
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_FRAMEWORK__STAKEHOLDERS,
+ Iso42010Factory.eINSTANCE.createStakeholder()));
+
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.PAPYRUS_CONFIGURATION__CATEGORIES,
+ ConfigurationFactory.eINSTANCE.createCategory()));
}
/**
@@ -220,7 +221,7 @@ public class PapyrusConfigurationItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
index 9ceb96d06e9..1ddfe373fbe 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusDiagramItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -70,19 +71,17 @@ public class PapyrusDiagramItemProvider
* @generated
*/
protected void addCustomPalettePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusDiagram_customPalette_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customPalette_feature", "_UI_PapyrusDiagram_type"),
- ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_PALETTE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_customPalette_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customPalette_feature", "_UI_PapyrusDiagram_type"),
+ ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_PALETTE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -92,19 +91,17 @@ public class PapyrusDiagramItemProvider
* @generated
*/
protected void addCustomStylePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusDiagram_customStyle_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customStyle_feature", "_UI_PapyrusDiagram_type"),
- ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_STYLE,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusDiagram_customStyle_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusDiagram_customStyle_feature", "_UI_PapyrusDiagram_type"),
+ ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CUSTOM_STYLE,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -121,6 +118,7 @@ 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__ASSISTANT_RULES);
}
return childrenFeatures;
}
@@ -151,6 +149,16 @@ public class PapyrusDiagramItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -172,14 +180,15 @@ public class PapyrusDiagramItemProvider
updateChildren(notification);
switch (notification.getFeatureID(PapyrusDiagram.class)) {
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
- case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -195,15 +204,14 @@ public class PapyrusDiagramItemProvider
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES,
- ConfigurationFactory.eINSTANCE.createChildRule()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__CHILD_RULES,
+ ConfigurationFactory.eINSTANCE.createChildRule()));
+
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES,
+ ConfigurationFactory.eINSTANCE.createPaletteRule()));
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__PALETTE_RULES,
- ConfigurationFactory.eINSTANCE.createPaletteRule()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.PAPYRUS_DIAGRAM__ASSISTANT_RULES,
+ ConfigurationFactory.eINSTANCE.createAssistantRule()));
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java
index 3b8d3088d86..1cbfa2223d2 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusSyncTableItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*
*/
@@ -68,6 +69,16 @@ public class PapyrusSyncTableItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java
index f7a48fb6622..47a2387c060 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusTableItemProvider.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*
*/
@@ -67,19 +68,17 @@ public class PapyrusTableItemProvider
* @generated
*/
protected void addConfigurationPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusTable_configuration_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_configuration_feature", "_UI_PapyrusTable_type"),
- ConfigurationPackage.Literals.PAPYRUS_TABLE__CONFIGURATION,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusTable_configuration_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusTable_configuration_feature", "_UI_PapyrusTable_type"),
+ ConfigurationPackage.Literals.PAPYRUS_TABLE__CONFIGURATION,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -95,6 +94,16 @@ public class PapyrusTableItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -116,9 +125,9 @@ public class PapyrusTableItemProvider
updateChildren(notification);
switch (notification.getFeatureID(PapyrusTable.class)) {
- case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java
index a126e03c441..1fcdc1b4554 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -78,19 +79,17 @@ public class PapyrusViewItemProvider
* @generated
*/
protected void addIconPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusView_icon_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_icon_feature", "_UI_PapyrusView_type"),
- ConfigurationPackage.Literals.PAPYRUS_VIEW__ICON,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_icon_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_icon_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__ICON,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -100,19 +99,17 @@ public class PapyrusViewItemProvider
* @generated
*/
protected void addParentPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusView_parent_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_parent_feature", "_UI_PapyrusView_type"),
- ConfigurationPackage.Literals.PAPYRUS_VIEW__PARENT,
- true,
- false,
- true,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_parent_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_parent_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__PARENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
@@ -123,19 +120,17 @@ public class PapyrusViewItemProvider
* @generated NOT
*/
protected void addProfilesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new ProfilePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusView_profiles_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_profiles_feature", "_UI_PapyrusView_type"),
- ConfigurationPackage.Literals.PAPYRUS_VIEW__PROFILES,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new ProfilePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_profiles_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_profiles_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__PROFILES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -145,19 +140,17 @@ public class PapyrusViewItemProvider
* @generated
*/
protected void addImplementationIDPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusView_implementationID_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_implementationID_feature", "_UI_PapyrusView_type"),
- ConfigurationPackage.Literals.PAPYRUS_VIEW__IMPLEMENTATION_ID,
- true,
- false,
- false,
- ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_implementationID_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_implementationID_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__IMPLEMENTATION_ID,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
+ null,
+ null));
}
/**
@@ -167,19 +160,17 @@ public class PapyrusViewItemProvider
* @generated
*/
protected void addCategoriesPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusView_categories_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_categories_feature", "_UI_PapyrusView_type"),
- ConfigurationPackage.Literals.PAPYRUS_VIEW__CATEGORIES,
- true,
- false,
- true,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusView_categories_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusView_categories_feature", "_UI_PapyrusView_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEW__CATEGORIES,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
@@ -226,6 +217,16 @@ public class PapyrusViewItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -233,10 +234,8 @@ public class PapyrusViewItemProvider
*/
@Override
public String getText(Object object) {
- String label = ((PapyrusView)object).getName();
- return label == null || label.length() == 0 ?
- getString("_UI_PapyrusView_type") :
- getString("_UI_PapyrusView_type") + " " + label;
+ String label = ((PapyrusView) object).getName();
+ return label == null || label.length() == 0 ? getString("_UI_PapyrusView_type") : getString("_UI_PapyrusView_type") + " " + label;
}
/**
@@ -264,14 +263,14 @@ public class PapyrusViewItemProvider
updateChildren(notification);
switch (notification.getFeatureID(PapyrusView.class)) {
- case ConfigurationPackage.PAPYRUS_VIEW__ICON:
- case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
- case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
- return;
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
+ return;
}
super.notifyChanged(notification);
}
@@ -287,15 +286,11 @@ public class PapyrusViewItemProvider
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.PAPYRUS_VIEW__MODEL_RULES,
- ConfigurationFactory.eINSTANCE.createModelRule()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.PAPYRUS_VIEW__MODEL_RULES,
+ ConfigurationFactory.eINSTANCE.createModelRule()));
- newChildDescriptors.add
- (createChildParameter
- (ConfigurationPackage.Literals.PAPYRUS_VIEW__OWNING_RULES,
- ConfigurationFactory.eINSTANCE.createOwningRule()));
+ newChildDescriptors.add(createChildParameter(ConfigurationPackage.Literals.PAPYRUS_VIEW__OWNING_RULES,
+ ConfigurationFactory.eINSTANCE.createOwningRule()));
}
/**
@@ -306,7 +301,7 @@ public class PapyrusViewItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java
index 04a0c762be6..aaf8e735d1e 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PapyrusViewpointItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -70,19 +71,17 @@ public class PapyrusViewpointItemProvider
* @generated
*/
protected void addParentPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PapyrusViewpoint_parent_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PapyrusViewpoint_parent_feature", "_UI_PapyrusViewpoint_type"),
- ConfigurationPackage.Literals.PAPYRUS_VIEWPOINT__PARENT,
- true,
- false,
- true,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PapyrusViewpoint_parent_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PapyrusViewpoint_parent_feature", "_UI_PapyrusViewpoint_type"),
+ ConfigurationPackage.Literals.PAPYRUS_VIEWPOINT__PARENT,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
@@ -98,6 +97,16 @@ public class PapyrusViewpointItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -129,18 +138,12 @@ public class PapyrusViewpointItemProvider
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusDiagram()));
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusTable()));
- newChildDescriptors.add
- (createChildParameter
- (Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
- ConfigurationFactory.eINSTANCE.createPapyrusSyncTable()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusDiagram()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusTable()));
+ newChildDescriptors.add(createChildParameter(Iso42010Package.Literals.ARCHITECTURE_VIEWPOINT__MODEL_KINDS,
+ ConfigurationFactory.eINSTANCE.createPapyrusSyncTable()));
}
/**
@@ -151,7 +154,7 @@ public class PapyrusViewpointItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java
index 15dacb09eaf..5ec7850a03d 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/PathElementItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -85,19 +86,17 @@ public class PathElementItemProvider
* @generated NOT
*/
protected void addFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (new EReferencePropertyDescriptor(createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PathElement_feature_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PathElement_feature_feature", "_UI_PathElement_type"),
- ConfigurationPackage.Literals.PATH_ELEMENT__FEATURE,
- true,
- false,
- true,
- null,
- null,
- null)));
+ itemPropertyDescriptors.add(new EReferencePropertyDescriptor(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_feature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_feature_feature", "_UI_PathElement_type"),
+ ConfigurationPackage.Literals.PATH_ELEMENT__FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null)));
}
/**
@@ -106,19 +105,17 @@ public class PathElementItemProvider
* <!-- end-user-doc -->
*/
protected void addOriginPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PathElement_origin_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PathElement_origin_feature", "_UI_PathElement_type"),
- ConfigurationPackage.Literals.PATH_ELEMENT__ORIGIN,
- false,
- false,
- false,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_origin_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_origin_feature", "_UI_PathElement_type"),
+ ConfigurationPackage.Literals.PATH_ELEMENT__ORIGIN,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
}
/**
@@ -128,19 +125,17 @@ public class PathElementItemProvider
* @generated
*/
protected void addTargetPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_PathElement_target_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_PathElement_target_feature", "_UI_PathElement_type"),
- ConfigurationPackage.Literals.PATH_ELEMENT__TARGET,
- false,
- false,
- false,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_PathElement_target_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_PathElement_target_feature", "_UI_PathElement_type"),
+ ConfigurationPackage.Literals.PATH_ELEMENT__TARGET,
+ false,
+ false,
+ false,
+ null,
+ null,
+ null));
}
/**
@@ -156,6 +151,16 @@ public class PathElementItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -208,7 +213,7 @@ public class PathElementItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RootAutoSelectItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RootAutoSelectItemProvider.java
index c520cd4e7ca..5eead0e08c1 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RootAutoSelectItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RootAutoSelectItemProvider.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -40,9 +41,9 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
* <!-- end-user-doc -->
* @generated
*/
-public class RootAutoSelectItemProvider
- extends ItemProviderAdapter
- implements
+public class RootAutoSelectItemProvider
+ extends ItemProviderAdapter
+ implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
@@ -81,19 +82,17 @@ public class RootAutoSelectItemProvider
* @generated
*/
protected void addFeaturePropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_RootAutoSelect_feature_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_RootAutoSelect_feature_feature", "_UI_RootAutoSelect_type"),
- ConfigurationPackage.Literals.ROOT_AUTO_SELECT__FEATURE,
- true,
- false,
- true,
- null,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_RootAutoSelect_feature_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_RootAutoSelect_feature_feature", "_UI_RootAutoSelect_type"),
+ ConfigurationPackage.Literals.ROOT_AUTO_SELECT__FEATURE,
+ true,
+ false,
+ true,
+ null,
+ null,
+ null));
}
/**
@@ -108,6 +107,16 @@ public class RootAutoSelectItemProvider
}
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
+ }
+
+ /**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -117,7 +126,7 @@ public class RootAutoSelectItemProvider
public String getText(Object object) {
return getString("_UI_RootAutoSelect_type");
}
-
+
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
@@ -152,7 +161,7 @@ public class RootAutoSelectItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java
index c70245096f6..84bce077239 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/provider/RuleItemProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,6 +9,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration.provider;
@@ -81,19 +82,27 @@ public class RuleItemProvider
* @generated
*/
protected void addPermitPropertyDescriptor(Object object) {
- itemPropertyDescriptors.add
- (createItemPropertyDescriptor
- (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
- getResourceLocator(),
- getString("_UI_Rule_permit_feature"),
- getString("_UI_PropertyDescriptor_description", "_UI_Rule_permit_feature", "_UI_Rule_type"),
- ConfigurationPackage.Literals.RULE__PERMIT,
- true,
- false,
- false,
- ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
- null,
- null));
+ itemPropertyDescriptors.add(createItemPropertyDescriptor(((ComposeableAdapterFactory) adapterFactory).getRootAdapterFactory(),
+ getResourceLocator(),
+ getString("_UI_Rule_permit_feature"),
+ getString("_UI_PropertyDescriptor_description", "_UI_Rule_permit_feature", "_UI_Rule_type"),
+ ConfigurationPackage.Literals.RULE__PERMIT,
+ true,
+ false,
+ false,
+ ItemPropertyDescriptor.BOOLEAN_VALUE_IMAGE,
+ null,
+ null));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected boolean shouldComposeCreationImage() {
+ return true;
}
/**
@@ -104,7 +113,7 @@ public class RuleItemProvider
*/
@Override
public String getText(Object object) {
- Rule rule = (Rule)object;
+ Rule rule = (Rule) object;
return getString("_UI_Rule_type") + " " + rule.isPermit();
}
@@ -120,9 +129,9 @@ public class RuleItemProvider
updateChildren(notification);
switch (notification.getFeatureID(Rule.class)) {
- case ConfigurationPackage.RULE__PERMIT:
- fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
- return;
+ case ConfigurationPackage.RULE__PERMIT:
+ fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
+ return;
}
super.notifyChanged(notification);
}
@@ -147,7 +156,7 @@ public class RuleItemProvider
*/
@Override
public ResourceLocator getResourceLocator() {
- return ((IChildCreationExtender)adapterFactory).getResourceLocator();
+ return ((IChildCreationExtender) adapterFactory).getResourceLocator();
}
}
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 4985c645b35..47b1c99c19e 100644
--- 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
@@ -5,15 +5,15 @@ Export-Package: org.eclipse.papyrus.infra.viewpoints.configuration,
org.eclipse.papyrus.infra.viewpoints.configuration.util
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jface,
- org.eclipse.emf.ecore,
+ org.eclipse.emf.ecore;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.emf.edit,
org.eclipse.gmf.runtime.emf.type.core,
org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.viewpoints.iso42010;bundle-version="1.1.0";visibility:=reexport,
org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0";visibility:=reexport,
org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
@@ -21,7 +21,7 @@ Bundle-ClassPath: .
Bundle-Version: 1.1.0.qualifier
Bundle-Localization: plugin
Bundle-Name: %pluginName
-Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.Activator
+Bundle-Activator: org.eclipse.papyrus.infra.viewpoints.configuration.Activator$Implementation
Bundle-ManifestVersion: 2
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 5b5a8b8ed72..50363972818 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,6 +50,12 @@
<details key="documentation" value="These rules determine which palette elements should be available for this diagram"/>
</eAnnotations>
</eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="assistantRules" upperBound="-1"
+ eType="#//AssistantRule" containment="true">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="These rules determine which modeling assistants should be presented in this diagram"/>
+ </eAnnotations>
+ </eStructuralFeatures>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PapyrusSyncTable" eSuperTypes="#//PapyrusView"/>
<eClassifiers xsi:type="ecore:EClass" name="PapyrusTable" eSuperTypes="#//PapyrusView">
@@ -115,4 +121,21 @@
<eStructuralFeatures xsi:type="ecore:EReference" name="feature" lowerBound="1"
eType="ecore:EClass http://www.eclipse.org/emf/2002/Ecore#//EReference"/>
</eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="AssistantRule" eSuperTypes="#//Rule">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="A rule that permits or forbids one or more modeling assistants by element type ID."/>
+ </eAnnotations>
+ <eOperations name="matches" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="Queries whether I match a given &lt;tt>elementType&lt;/tt>."/>
+ </eAnnotations>
+ <eParameters name="elementType" lowerBound="1" eType="#//ElementType"/>
+ </eOperations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="elementTypeID" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="&lt;p>&#xA;Modeling assistants are identified by the ID of the element type that they create.&#xA;This element type ID supports very simple wildcard patterns: an asterisk (&lt;tt>*&lt;/tt>)&#xA;may be used to match any substring, including the empty substring. This is&#xA;particularly useful to match an entire family of related element types by namespace&#xA;prefix, using a terminal asterisk.&#xA;&lt;/p>&lt;p>&#xA;If the element type ID is omitted, then the rule applies to all element types&#xA;(universal wildcard).&#xA;&lt;/p>"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EDataType" name="ElementType" instanceClassName="org.eclipse.gmf.runtime.emf.type.core.IElementType"/>
</ecore:EPackage>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel
index 56bbbaf93a0..c21da7a6c59 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/model/configuration.genmodel
@@ -1,16 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<genmodel:GenModel xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore"
- xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2013 CEA LIST.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
- modelDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen" editDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen"
+ xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2015 CEA LIST and others.&#xD;&#xA;&#xD;&#xA; All rights reserved. This program and the accompanying materials&#xD;&#xA; are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA; which accompanies this distribution, and is available at&#xD;&#xA; http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA; &#xD;&#xA; Contributors:&#xD;&#xA; CEA LIST - Initial API and implementation&#xD;&#xA; &#xD;&#xA;"
+ modelDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen" creationIcons="false"
+ editDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration.edit/src-gen"
editorDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration.editor/src-gen"
modelPluginID="org.eclipse.papyrus.infra.viewpoints.configuration" modelName="Configuration"
- rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" importerID="org.eclipse.emf.importer.ecore"
- complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.papyrus.infra.constraints/Model/Constraints.genmodel#//constraints platform:/plugin/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel#//iso42010"
- operationReflection="true" importOrganizing="true">
+ rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" codeFormatting="true"
+ testsDirectory="/org.eclipse.papyrus.infra.viewpoints.configuration.tests/src-gen"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="6.0" copyrightFields="false"
+ usedGenPackages="../../org.eclipse.papyrus.infra.constraints/Model/Constraints.genmodel#//constraints platform:/plugin/org.eclipse.papyrus.infra.viewpoints.iso42010/model/iso42010.genmodel#//iso42010"
+ operationReflection="true" importOrganizing="true" cleanup="true">
<foreignModel>configuration.ecore</foreignModel>
<genPackages prefix="Configuration" basePackage="org.eclipse.papyrus.infra.viewpoints"
- resource="XMI" disposableProviderFactory="true" extensibleProviderFactory="true"
+ disposableProviderFactory="true" generateExampleClass="false" extensibleProviderFactory="true"
childCreationExtenders="true" ecorePackage="configuration.ecore#/">
+ <genDataTypes ecoreDataType="configuration.ecore#//ElementType"/>
<genClasses ecoreClass="configuration.ecore#//PapyrusConfiguration">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusConfiguration/defaultStakeholder"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusConfiguration/metamodel"/>
@@ -33,6 +37,7 @@
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute configuration.ecore#//PapyrusDiagram/customStyle"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusDiagram/childRules"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusDiagram/paletteRules"/>
+ <genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference configuration.ecore#//PapyrusDiagram/assistantRules"/>
</genClasses>
<genClasses ecoreClass="configuration.ecore#//PapyrusSyncTable"/>
<genClasses ecoreClass="configuration.ecore#//PapyrusTable">
@@ -78,5 +83,11 @@
<genClasses ecoreClass="configuration.ecore#//RootAutoSelect">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference configuration.ecore#//RootAutoSelect/feature"/>
</genClasses>
+ <genClasses ecoreClass="configuration.ecore#//AssistantRule">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute configuration.ecore#//AssistantRule/elementTypeID"/>
+ <genOperations ecoreOperation="configuration.ecore#//AssistantRule/matches">
+ <genParameters ecoreParameter="configuration.ecore#//AssistantRule/matches/elementType"/>
+ </genOperations>
+ </genClasses>
</genPackages>
</genmodel:GenModel>
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/AssistantRule.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/AssistantRule.java
new file mode 100644
index 00000000000..1b466629d14
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/AssistantRule.java
@@ -0,0 +1,85 @@
+/**
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Assistant Rule</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * A rule that permits or forbids one or more modeling assistants by element type ID.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule#getElementTypeID <em>Element Type ID</em>}</li>
+ * </ul>
+ *
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getAssistantRule()
+ * @model
+ * @generated
+ */
+public interface AssistantRule extends Rule {
+ /**
+ * Returns the value of the '<em><b>Element Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * <p>
+ * Modeling assistants are identified by the ID of the element type that they create.
+ * This element type ID supports very simple wildcard patterns: an asterisk (<tt>*</tt>)
+ * may be used to match any substring, including the empty substring. This is
+ * particularly useful to match an entire family of related element types by namespace
+ * prefix, using a terminal asterisk.
+ * </p><p>
+ * If the element type ID is omitted, then the rule applies to all element types
+ * (universal wildcard).
+ * </p>
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Element Type ID</em>' attribute.
+ * @see #setElementTypeID(String)
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getAssistantRule_ElementTypeID()
+ * @model
+ * @generated
+ */
+ String getElementTypeID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule#getElementTypeID <em>Element Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Element Type ID</em>' attribute.
+ * @see #getElementTypeID()
+ * @generated
+ */
+ void setElementTypeID(String value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * Queries whether I match a given <tt>elementType</tt>.
+ * <!-- end-model-doc -->
+ * @model required="true" elementTypeDataType="org.eclipse.papyrus.infra.viewpoints.configuration.ElementType" elementTypeRequired="true"
+ * @generated
+ */
+ boolean matches(IElementType elementType);
+
+} // AssistantRule
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
index 58d4e1bad68..d9a59dcbffc 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationFactory.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration;
@@ -159,6 +160,15 @@ public interface ConfigurationFactory extends EFactory {
RootAutoSelect createRootAutoSelect();
/**
+ * Returns a new object of class '<em>Assistant Rule</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Assistant Rule</em>'.
+ * @generated
+ */
+ AssistantRule createAssistantRule();
+
+ /**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
index 4564de93312..bd6417c3a8d 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/ConfigurationPackage.java
@@ -1,20 +1,23 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
@@ -515,13 +518,22 @@ public interface ConfigurationPackage extends EPackage {
int PAPYRUS_DIAGRAM__PALETTE_RULES = PAPYRUS_VIEW_FEATURE_COUNT + 3;
/**
+ * The feature id for the '<em><b>Assistant Rules</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PAPYRUS_DIAGRAM__ASSISTANT_RULES = 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 + 4;
+ int PAPYRUS_DIAGRAM_FEATURE_COUNT = PAPYRUS_VIEW_FEATURE_COUNT + 5;
/**
* The number of operations of the '<em>Papyrus Diagram</em>' class.
@@ -1301,6 +1313,73 @@ public interface ConfigurationPackage extends EPackage {
/**
+ * The meta object id for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.AssistantRuleImpl <em>Assistant Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.AssistantRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getAssistantRule()
+ * @generated
+ */
+ int ASSISTANT_RULE = 15;
+
+ /**
+ * The feature id for the '<em><b>Permit</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE__PERMIT = RULE__PERMIT;
+
+ /**
+ * The feature id for the '<em><b>Element Type ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE__ELEMENT_TYPE_ID = RULE_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>Assistant Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE_FEATURE_COUNT = RULE_FEATURE_COUNT + 1;
+
+ /**
+ * The operation id for the '<em>Matches</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE___MATCHES__IELEMENTTYPE = RULE_OPERATION_COUNT + 0;
+
+ /**
+ * The number of operations of the '<em>Assistant Rule</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int ASSISTANT_RULE_OPERATION_COUNT = RULE_OPERATION_COUNT + 1;
+
+
+ /**
+ * The meta object id for the '<em>Element Type</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.runtime.emf.type.core.IElementType
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getElementType()
+ * @generated
+ */
+ int ELEMENT_TYPE = 16;
+
+
+ /**
* Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration <em>Papyrus Configuration</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -1506,6 +1585,17 @@ 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#getAssistantRules <em>Assistant Rules</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the containment reference list '<em>Assistant Rules</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram#getAssistantRules()
+ * @see #getPapyrusDiagram()
+ * @generated
+ */
+ EReference getPapyrusDiagram_AssistantRules();
+
+ /**
* 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 -->
@@ -1869,6 +1959,48 @@ public interface ConfigurationPackage extends EPackage {
EReference getRootAutoSelect_Feature();
/**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule <em>Assistant Rule</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Assistant Rule</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule
+ * @generated
+ */
+ EClass getAssistantRule();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule#getElementTypeID <em>Element Type ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Element Type ID</em>'.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule#getElementTypeID()
+ * @see #getAssistantRule()
+ * @generated
+ */
+ EAttribute getAssistantRule_ElementTypeID();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule#matches(org.eclipse.gmf.runtime.emf.type.core.IElementType) <em>Matches</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the '<em>Matches</em>' operation.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule#matches(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ * @generated
+ */
+ EOperation getAssistantRule__Matches__IElementType();
+
+ /**
+ * Returns the meta object for data type '{@link org.eclipse.gmf.runtime.emf.type.core.IElementType <em>Element Type</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for data type '<em>Element Type</em>'.
+ * @see org.eclipse.gmf.runtime.emf.type.core.IElementType
+ * @model instanceClass="org.eclipse.gmf.runtime.emf.type.core.IElementType"
+ * @generated
+ */
+ EDataType getElementType();
+
+ /**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -2052,6 +2184,14 @@ public interface ConfigurationPackage extends EPackage {
EReference PAPYRUS_DIAGRAM__PALETTE_RULES = eINSTANCE.getPapyrusDiagram_PaletteRules();
/**
+ * The meta object literal for the '<em><b>Assistant Rules</b></em>' containment reference list feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EReference PAPYRUS_DIAGRAM__ASSISTANT_RULES = eINSTANCE.getPapyrusDiagram_AssistantRules();
+
+ /**
* 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 -->
@@ -2345,6 +2485,42 @@ public interface ConfigurationPackage extends EPackage {
*/
EReference ROOT_AUTO_SELECT__FEATURE = eINSTANCE.getRootAutoSelect_Feature();
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.AssistantRuleImpl <em>Assistant Rule</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.AssistantRuleImpl
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getAssistantRule()
+ * @generated
+ */
+ EClass ASSISTANT_RULE = eINSTANCE.getAssistantRule();
+
+ /**
+ * The meta object literal for the '<em><b>Element Type ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute ASSISTANT_RULE__ELEMENT_TYPE_ID = eINSTANCE.getAssistantRule_ElementTypeID();
+
+ /**
+ * The meta object literal for the '<em><b>Matches</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EOperation ASSISTANT_RULE___MATCHES__IELEMENTTYPE = eINSTANCE.getAssistantRule__Matches__IElementType();
+
+ /**
+ * The meta object literal for the '<em>Element Type</em>' data type.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.gmf.runtime.emf.type.core.IElementType
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.impl.ConfigurationPackageImpl#getElementType()
+ * @generated
+ */
+ EDataType ELEMENT_TYPE = eINSTANCE.getElementType();
+
}
} //ConfigurationPackage
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
index dee9c6e661c..6c8f709ef40 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/PapyrusDiagram.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration;
@@ -28,6 +29,7 @@ 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#getAssistantRules <em>Assistant Rules</em>}</li>
* </ul>
*
* @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram()
@@ -117,4 +119,19 @@ public interface PapyrusDiagram extends PapyrusView {
*/
EList<PaletteRule> getPaletteRules();
+ /**
+ * Returns the value of the '<em><b>Assistant Rules</b></em>' containment reference list.
+ * The list contents are of type {@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule}.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * These rules determine which modeling assistants should be presented in this diagram
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Assistant Rules</em>' containment reference list.
+ * @see org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage#getPapyrusDiagram_AssistantRules()
+ * @model containment="true"
+ * @generated
+ */
+ EList<AssistantRule> getAssistantRules();
+
} // PapyrusDiagram
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleImpl.java
new file mode 100644
index 00000000000..a5e7a783900
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleImpl.java
@@ -0,0 +1,202 @@
+/**
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *
+ */
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+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.impl.ENotificationImpl;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
+import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Assistant Rule</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * </p>
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.infra.viewpoints.configuration.impl.AssistantRuleImpl#getElementTypeID <em>Element Type ID</em>}</li>
+ * </ul>
+ *
+ * @generated
+ */
+public class AssistantRuleImpl extends RuleImpl implements AssistantRule {
+ /**
+ * The default value of the '{@link #getElementTypeID() <em>Element Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElementTypeID()
+ * @generated
+ * @ordered
+ */
+ protected static final String ELEMENT_TYPE_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getElementTypeID() <em>Element Type ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getElementTypeID()
+ * @generated
+ * @ordered
+ */
+ protected String elementTypeID = ELEMENT_TYPE_ID_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected AssistantRuleImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ConfigurationPackage.Literals.ASSISTANT_RULE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getElementTypeID() {
+ return elementTypeID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setElementTypeID(String newElementTypeID) {
+ String oldElementTypeID = elementTypeID;
+ elementTypeID = newElementTypeID;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID, oldElementTypeID, elementTypeID));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public boolean matches(IElementType elementType) {
+ // Implemented in the custom subclass
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ConfigurationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ return getElementTypeID();
+ }
+ 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.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ setElementTypeID((String) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ setElementTypeID(ELEMENT_TYPE_ID_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ConfigurationPackage.ASSISTANT_RULE__ELEMENT_TYPE_ID:
+ return ELEMENT_TYPE_ID_EDEFAULT == null ? elementTypeID != null : !ELEMENT_TYPE_ID_EDEFAULT.equals(elementTypeID);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException {
+ switch (operationID) {
+ case ConfigurationPackage.ASSISTANT_RULE___MATCHES__IELEMENTTYPE:
+ return matches((IElementType) arguments.get(0));
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) {
+ return super.toString();
+ }
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (elementTypeID: ");
+ result.append(elementTypeID);
+ result.append(')');
+ return result.toString();
+ }
+
+} // AssistantRuleImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java
index 8bdd254fd02..2bbedf1aec1 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/CategoryImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -28,7 +29,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
* An implementation of the model object '<em><b>Category</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -94,8 +94,9 @@ public class CategoryImpl extends MinimalEObjectImpl.Container implements Catego
public void setName(String newName) {
String oldName = name;
name = newName;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CATEGORY__NAME, oldName, name));
+ }
}
/**
@@ -106,8 +107,8 @@ public class CategoryImpl extends MinimalEObjectImpl.Container implements Catego
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.CATEGORY__NAME:
- return getName();
+ case ConfigurationPackage.CATEGORY__NAME:
+ return getName();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -120,9 +121,9 @@ public class CategoryImpl extends MinimalEObjectImpl.Container implements Catego
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.CATEGORY__NAME:
- setName((String)newValue);
- return;
+ case ConfigurationPackage.CATEGORY__NAME:
+ setName((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -135,9 +136,9 @@ public class CategoryImpl extends MinimalEObjectImpl.Container implements Catego
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.CATEGORY__NAME:
- setName(NAME_EDEFAULT);
- return;
+ case ConfigurationPackage.CATEGORY__NAME:
+ setName(NAME_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -150,8 +151,8 @@ public class CategoryImpl extends MinimalEObjectImpl.Container implements Catego
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.CATEGORY__NAME:
- return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
+ case ConfigurationPackage.CATEGORY__NAME:
+ return NAME_EDEFAULT == null ? name != null : !NAME_EDEFAULT.equals(name);
}
return super.eIsSet(featureID);
}
@@ -163,7 +164,9 @@ public class CategoryImpl extends MinimalEObjectImpl.Container implements Catego
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (name: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java
index c1f98924e97..acdb441d65b 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ChildRuleImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -38,7 +39,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
* An implementation of the model object '<em><b>Child Rule</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -117,11 +117,12 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
*/
public EClass getElement() {
if (element != null && element.eIsProxy()) {
- InternalEObject oldElement = (InternalEObject)element;
- element = (EClass)eResolveProxy(oldElement);
+ InternalEObject oldElement = (InternalEObject) element;
+ element = (EClass) eResolveProxy(oldElement);
if (element != oldElement) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.CHILD_RULE__ELEMENT, oldElement, element));
+ }
}
}
return element;
@@ -144,8 +145,9 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
public void setElement(EClass newElement) {
EClass oldElement = element;
element = newElement;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CHILD_RULE__ELEMENT, oldElement, element));
+ }
}
/**
@@ -167,11 +169,12 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
*/
public EClass getOrigin() {
if (origin != null && origin.eIsProxy()) {
- InternalEObject oldOrigin = (InternalEObject)origin;
- origin = (EClass)eResolveProxy(oldOrigin);
+ InternalEObject oldOrigin = (InternalEObject) origin;
+ origin = (EClass) eResolveProxy(oldOrigin);
if (origin != oldOrigin) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.CHILD_RULE__ORIGIN, oldOrigin, origin));
+ }
}
}
return origin;
@@ -194,8 +197,9 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
public void setOrigin(EClass newOrigin) {
EClass oldOrigin = origin;
origin = newOrigin;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.CHILD_RULE__ORIGIN, oldOrigin, origin));
+ }
}
/**
@@ -218,8 +222,8 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
- return ((InternalEList<?>)getInsertionPath()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ return ((InternalEList<?>) getInsertionPath()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -232,16 +236,20 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.CHILD_RULE__ELEMENT:
- if (resolve) return getElement();
- return basicGetElement();
- case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
- return getStereotypes();
- case ConfigurationPackage.CHILD_RULE__ORIGIN:
- if (resolve) return getOrigin();
- return basicGetOrigin();
- case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
- return getInsertionPath();
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ if (resolve) {
+ return getElement();
+ }
+ return basicGetElement();
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ return getStereotypes();
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ if (resolve) {
+ return getOrigin();
+ }
+ return basicGetOrigin();
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ return getInsertionPath();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -255,20 +263,20 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.CHILD_RULE__ELEMENT:
- setElement((EClass)newValue);
- return;
- case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
- getStereotypes().clear();
- getStereotypes().addAll((Collection<? extends EClass>)newValue);
- return;
- case ConfigurationPackage.CHILD_RULE__ORIGIN:
- setOrigin((EClass)newValue);
- return;
- case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
- getInsertionPath().clear();
- getInsertionPath().addAll((Collection<? extends PathElement>)newValue);
- return;
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ setElement((EClass) newValue);
+ return;
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>) newValue);
+ return;
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ setOrigin((EClass) newValue);
+ return;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ getInsertionPath().clear();
+ getInsertionPath().addAll((Collection<? extends PathElement>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -281,18 +289,18 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.CHILD_RULE__ELEMENT:
- setElement((EClass)null);
- return;
- case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
- getStereotypes().clear();
- return;
- case ConfigurationPackage.CHILD_RULE__ORIGIN:
- setOrigin((EClass)null);
- return;
- case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
- getInsertionPath().clear();
- return;
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ setElement((EClass) null);
+ return;
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ setOrigin((EClass) null);
+ return;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ getInsertionPath().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -305,14 +313,14 @@ public class ChildRuleImpl extends RuleImpl implements ChildRule {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.CHILD_RULE__ELEMENT:
- return element != null;
- case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
- return stereotypes != null && !stereotypes.isEmpty();
- case ConfigurationPackage.CHILD_RULE__ORIGIN:
- return origin != null;
- case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
- return insertionPath != null && !insertionPath.isEmpty();
+ case ConfigurationPackage.CHILD_RULE__ELEMENT:
+ return element != null;
+ case ConfigurationPackage.CHILD_RULE__STEREOTYPES:
+ return stereotypes != null && !stereotypes.isEmpty();
+ case ConfigurationPackage.CHILD_RULE__ORIGIN:
+ return origin != null;
+ case ConfigurationPackage.CHILD_RULE__INSERTION_PATH:
+ return insertionPath != null && !insertionPath.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
index 40f2631308a..f1255498509 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryImpl.java
@@ -1,19 +1,21 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
@@ -21,6 +23,7 @@ import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.papyrus.infra.viewpoints.configuration.*;
/**
@@ -38,12 +41,11 @@ public class ConfigurationFactoryImpl extends EFactoryImpl implements Configurat
*/
public static ConfigurationFactory init() {
try {
- ConfigurationFactory theConfigurationFactory = (ConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(ConfigurationPackage.eNS_URI);
+ ConfigurationFactory theConfigurationFactory = (ConfigurationFactory) EPackage.Registry.INSTANCE.getEFactory(ConfigurationPackage.eNS_URI);
if (theConfigurationFactory != null) {
return theConfigurationFactory;
}
- }
- catch (Exception exception) {
+ } catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ConfigurationFactoryImpl();
@@ -67,22 +69,68 @@ public class ConfigurationFactoryImpl extends EFactoryImpl implements Configurat
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION: return createPapyrusConfiguration();
- case ConfigurationPackage.PAPYRUS_VIEWPOINT: return createPapyrusViewpoint();
- case ConfigurationPackage.PAPYRUS_VIEW: return createPapyrusView();
- case ConfigurationPackage.PAPYRUS_DIAGRAM: return createPapyrusDiagram();
- case ConfigurationPackage.PAPYRUS_SYNC_TABLE: return createPapyrusSyncTable();
- case ConfigurationPackage.PAPYRUS_TABLE: return createPapyrusTable();
- case ConfigurationPackage.MODEL_RULE: return createModelRule();
- case ConfigurationPackage.OWNING_RULE: return createOwningRule();
- case ConfigurationPackage.CHILD_RULE: return createChildRule();
- case ConfigurationPackage.PALETTE_RULE: return createPaletteRule();
- case ConfigurationPackage.PATH_ELEMENT: return createPathElement();
- case ConfigurationPackage.CATEGORY: return createCategory();
- case ConfigurationPackage.MODEL_AUTO_CREATE: return createModelAutoCreate();
- case ConfigurationPackage.ROOT_AUTO_SELECT: return createRootAutoSelect();
- default:
- throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION:
+ return createPapyrusConfiguration();
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT:
+ return createPapyrusViewpoint();
+ case ConfigurationPackage.PAPYRUS_VIEW:
+ return createPapyrusView();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM:
+ return createPapyrusDiagram();
+ case ConfigurationPackage.PAPYRUS_SYNC_TABLE:
+ return createPapyrusSyncTable();
+ case ConfigurationPackage.PAPYRUS_TABLE:
+ return createPapyrusTable();
+ case ConfigurationPackage.MODEL_RULE:
+ return createModelRule();
+ case ConfigurationPackage.OWNING_RULE:
+ return createOwningRule();
+ case ConfigurationPackage.CHILD_RULE:
+ return createChildRule();
+ case ConfigurationPackage.PALETTE_RULE:
+ return createPaletteRule();
+ case ConfigurationPackage.PATH_ELEMENT:
+ return createPathElement();
+ case ConfigurationPackage.CATEGORY:
+ return createCategory();
+ case ConfigurationPackage.MODEL_AUTO_CREATE:
+ return createModelAutoCreate();
+ case ConfigurationPackage.ROOT_AUTO_SELECT:
+ return createRootAutoSelect();
+ case ConfigurationPackage.ASSISTANT_RULE:
+ return createAssistantRule();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object createFromString(EDataType eDataType, String initialValue) {
+ switch (eDataType.getClassifierID()) {
+ case ConfigurationPackage.ELEMENT_TYPE:
+ return createElementTypeFromString(eDataType, initialValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String convertToString(EDataType eDataType, Object instanceValue) {
+ switch (eDataType.getClassifierID()) {
+ case ConfigurationPackage.ELEMENT_TYPE:
+ return convertElementTypeToString(eDataType, instanceValue);
+ default:
+ throw new IllegalArgumentException("The datatype '" + eDataType.getName() + "' is not a valid classifier");
}
}
@@ -231,8 +279,36 @@ public class ConfigurationFactoryImpl extends EFactoryImpl implements Configurat
* <!-- end-user-doc -->
* @generated
*/
+ public AssistantRule createAssistantRule() {
+ AssistantRuleImpl assistantRule = new AssistantRuleImpl();
+ return assistantRule;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public IElementType createElementTypeFromString(EDataType eDataType, String initialValue) {
+ return (IElementType) super.createFromString(eDataType, initialValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String convertElementTypeToString(EDataType eDataType, Object instanceValue) {
+ return super.convertToString(eDataType, instanceValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
public ConfigurationPackage getConfigurationPackage() {
- return (ConfigurationPackage)getEPackage();
+ return (ConfigurationPackage) getEPackage();
}
/**
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
index c98942ff571..11953533667 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationPackageImpl.java
@@ -1,27 +1,32 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EDataType;
+import org.eclipse.emf.ecore.EOperation;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.papyrus.infra.constraints.ConstraintsPackage;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.Category;
import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
@@ -155,6 +160,20 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
private EClass rootAutoSelectEClass = null;
/**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass assistantRuleEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EDataType elementTypeEDataType = null;
+
+ /**
* Creates an instance of the model <b>Package</b>, registered with
* {@link org.eclipse.emf.ecore.EPackage.Registry EPackage.Registry} by the package
* package URI value.
@@ -182,7 +201,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
- *
+ *
* <p>This method is used to initialize {@link ConfigurationPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
@@ -193,10 +212,12 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public static ConfigurationPackage init() {
- if (isInited) return (ConfigurationPackage)EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI);
+ if (isInited) {
+ return (ConfigurationPackage) EPackage.Registry.INSTANCE.getEPackage(ConfigurationPackage.eNS_URI);
+ }
// Obtain or create and register package
- ConfigurationPackageImpl theConfigurationPackage = (ConfigurationPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConfigurationPackageImpl());
+ ConfigurationPackageImpl theConfigurationPackage = (ConfigurationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ConfigurationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ConfigurationPackageImpl());
isInited = true;
@@ -213,7 +234,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
// Mark meta-data to indicate it can't be changed
theConfigurationPackage.freeze();
-
+
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(ConfigurationPackage.eNS_URI, theConfigurationPackage);
return theConfigurationPackage;
@@ -234,7 +255,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusConfiguration_DefaultStakeholder() {
- return (EReference)papyrusConfigurationEClass.getEStructuralFeatures().get(0);
+ return (EReference) papyrusConfigurationEClass.getEStructuralFeatures().get(0);
}
/**
@@ -243,7 +264,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusConfiguration_Metamodel() {
- return (EReference)papyrusConfigurationEClass.getEStructuralFeatures().get(1);
+ return (EReference) papyrusConfigurationEClass.getEStructuralFeatures().get(1);
}
/**
@@ -252,7 +273,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusConfiguration_Categories() {
- return (EReference)papyrusConfigurationEClass.getEStructuralFeatures().get(2);
+ return (EReference) papyrusConfigurationEClass.getEStructuralFeatures().get(2);
}
/**
@@ -270,7 +291,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusViewpoint_Parent() {
- return (EReference)papyrusViewpointEClass.getEStructuralFeatures().get(0);
+ return (EReference) papyrusViewpointEClass.getEStructuralFeatures().get(0);
}
/**
@@ -288,7 +309,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getPapyrusView_Icon() {
- return (EAttribute)papyrusViewEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) papyrusViewEClass.getEStructuralFeatures().get(0);
}
/**
@@ -297,7 +318,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusView_Parent() {
- return (EReference)papyrusViewEClass.getEStructuralFeatures().get(1);
+ return (EReference) papyrusViewEClass.getEStructuralFeatures().get(1);
}
/**
@@ -306,7 +327,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusView_Profiles() {
- return (EReference)papyrusViewEClass.getEStructuralFeatures().get(2);
+ return (EReference) papyrusViewEClass.getEStructuralFeatures().get(2);
}
/**
@@ -315,7 +336,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusView_ModelRules() {
- return (EReference)papyrusViewEClass.getEStructuralFeatures().get(3);
+ return (EReference) papyrusViewEClass.getEStructuralFeatures().get(3);
}
/**
@@ -324,7 +345,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusView_OwningRules() {
- return (EReference)papyrusViewEClass.getEStructuralFeatures().get(4);
+ return (EReference) papyrusViewEClass.getEStructuralFeatures().get(4);
}
/**
@@ -333,7 +354,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getPapyrusView_ImplementationID() {
- return (EAttribute)papyrusViewEClass.getEStructuralFeatures().get(5);
+ return (EAttribute) papyrusViewEClass.getEStructuralFeatures().get(5);
}
/**
@@ -342,7 +363,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusView_Categories() {
- return (EReference)papyrusViewEClass.getEStructuralFeatures().get(6);
+ return (EReference) papyrusViewEClass.getEStructuralFeatures().get(6);
}
/**
@@ -360,7 +381,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getPapyrusDiagram_CustomPalette() {
- return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) papyrusDiagramEClass.getEStructuralFeatures().get(0);
}
/**
@@ -369,7 +390,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getPapyrusDiagram_CustomStyle() {
- return (EAttribute)papyrusDiagramEClass.getEStructuralFeatures().get(1);
+ return (EAttribute) papyrusDiagramEClass.getEStructuralFeatures().get(1);
}
/**
@@ -378,7 +399,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusDiagram_ChildRules() {
- return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(2);
+ return (EReference) papyrusDiagramEClass.getEStructuralFeatures().get(2);
}
/**
@@ -387,7 +408,16 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPapyrusDiagram_PaletteRules() {
- return (EReference)papyrusDiagramEClass.getEStructuralFeatures().get(3);
+ return (EReference) papyrusDiagramEClass.getEStructuralFeatures().get(3);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EReference getPapyrusDiagram_AssistantRules() {
+ return (EReference) papyrusDiagramEClass.getEStructuralFeatures().get(4);
}
/**
@@ -414,7 +444,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getPapyrusTable_Configuration() {
- return (EAttribute)papyrusTableEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) papyrusTableEClass.getEStructuralFeatures().get(0);
}
/**
@@ -432,7 +462,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getRule_Permit() {
- return (EAttribute)ruleEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) ruleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -450,7 +480,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getModelRule_Element() {
- return (EReference)modelRuleEClass.getEStructuralFeatures().get(0);
+ return (EReference) modelRuleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -459,7 +489,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getModelRule_Stereotypes() {
- return (EReference)modelRuleEClass.getEStructuralFeatures().get(1);
+ return (EReference) modelRuleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -468,7 +498,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getModelRule_Multiplicity() {
- return (EAttribute)modelRuleEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) modelRuleEClass.getEStructuralFeatures().get(2);
}
/**
@@ -486,7 +516,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getOwningRule_Element() {
- return (EReference)owningRuleEClass.getEStructuralFeatures().get(0);
+ return (EReference) owningRuleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -495,7 +525,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getOwningRule_Stereotypes() {
- return (EReference)owningRuleEClass.getEStructuralFeatures().get(1);
+ return (EReference) owningRuleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -504,7 +534,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getOwningRule_Multiplicity() {
- return (EAttribute)owningRuleEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) owningRuleEClass.getEStructuralFeatures().get(2);
}
/**
@@ -513,7 +543,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getOwningRule_NewModelPath() {
- return (EReference)owningRuleEClass.getEStructuralFeatures().get(3);
+ return (EReference) owningRuleEClass.getEStructuralFeatures().get(3);
}
/**
@@ -522,7 +552,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getOwningRule_SelectDiagramRoot() {
- return (EReference)owningRuleEClass.getEStructuralFeatures().get(4);
+ return (EReference) owningRuleEClass.getEStructuralFeatures().get(4);
}
/**
@@ -540,7 +570,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getChildRule_Element() {
- return (EReference)childRuleEClass.getEStructuralFeatures().get(0);
+ return (EReference) childRuleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -549,7 +579,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getChildRule_Stereotypes() {
- return (EReference)childRuleEClass.getEStructuralFeatures().get(1);
+ return (EReference) childRuleEClass.getEStructuralFeatures().get(1);
}
/**
@@ -558,7 +588,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getChildRule_Origin() {
- return (EReference)childRuleEClass.getEStructuralFeatures().get(2);
+ return (EReference) childRuleEClass.getEStructuralFeatures().get(2);
}
/**
@@ -567,7 +597,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getChildRule_InsertionPath() {
- return (EReference)childRuleEClass.getEStructuralFeatures().get(3);
+ return (EReference) childRuleEClass.getEStructuralFeatures().get(3);
}
/**
@@ -585,7 +615,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getPaletteRule_Element() {
- return (EAttribute)paletteRuleEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) paletteRuleEClass.getEStructuralFeatures().get(0);
}
/**
@@ -603,7 +633,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPathElement_Feature() {
- return (EReference)pathElementEClass.getEStructuralFeatures().get(0);
+ return (EReference) pathElementEClass.getEStructuralFeatures().get(0);
}
/**
@@ -612,7 +642,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPathElement_Origin() {
- return (EReference)pathElementEClass.getEStructuralFeatures().get(1);
+ return (EReference) pathElementEClass.getEStructuralFeatures().get(1);
}
/**
@@ -621,7 +651,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getPathElement_Target() {
- return (EReference)pathElementEClass.getEStructuralFeatures().get(2);
+ return (EReference) pathElementEClass.getEStructuralFeatures().get(2);
}
/**
@@ -639,7 +669,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getCategory_Name() {
- return (EAttribute)categoryEClass.getEStructuralFeatures().get(0);
+ return (EAttribute) categoryEClass.getEStructuralFeatures().get(0);
}
/**
@@ -657,7 +687,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getModelAutoCreate_Feature() {
- return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(0);
+ return (EReference) modelAutoCreateEClass.getEStructuralFeatures().get(0);
}
/**
@@ -666,7 +696,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getModelAutoCreate_Origin() {
- return (EReference)modelAutoCreateEClass.getEStructuralFeatures().get(1);
+ return (EReference) modelAutoCreateEClass.getEStructuralFeatures().get(1);
}
/**
@@ -675,7 +705,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EAttribute getModelAutoCreate_CreationType() {
- return (EAttribute)modelAutoCreateEClass.getEStructuralFeatures().get(2);
+ return (EAttribute) modelAutoCreateEClass.getEStructuralFeatures().get(2);
}
/**
@@ -693,7 +723,43 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public EReference getRootAutoSelect_Feature() {
- return (EReference)rootAutoSelectEClass.getEStructuralFeatures().get(0);
+ return (EReference) rootAutoSelectEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getAssistantRule() {
+ return assistantRuleEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getAssistantRule_ElementTypeID() {
+ return (EAttribute) assistantRuleEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EOperation getAssistantRule__Matches__IElementType() {
+ return assistantRuleEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EDataType getElementType() {
+ return elementTypeEDataType;
}
/**
@@ -702,7 +768,7 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public ConfigurationFactory getConfigurationFactory() {
- return (ConfigurationFactory)getEFactoryInstance();
+ return (ConfigurationFactory) getEFactoryInstance();
}
/**
@@ -720,7 +786,9 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public void createPackageContents() {
- if (isCreated) return;
+ if (isCreated) {
+ return;
+ }
isCreated = true;
// Create classes and their features
@@ -746,6 +814,7 @@ 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__ASSISTANT_RULES);
papyrusSyncTableEClass = createEClass(PAPYRUS_SYNC_TABLE);
@@ -791,6 +860,13 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
rootAutoSelectEClass = createEClass(ROOT_AUTO_SELECT);
createEReference(rootAutoSelectEClass, ROOT_AUTO_SELECT__FEATURE);
+
+ assistantRuleEClass = createEClass(ASSISTANT_RULE);
+ createEAttribute(assistantRuleEClass, ASSISTANT_RULE__ELEMENT_TYPE_ID);
+ createEOperation(assistantRuleEClass, ASSISTANT_RULE___MATCHES__IELEMENTTYPE);
+
+ // Create data types
+ elementTypeEDataType = createEDataType(ELEMENT_TYPE);
}
/**
@@ -808,7 +884,9 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
* @generated
*/
public void initializePackageContents() {
- if (isInitialized) return;
+ if (isInitialized) {
+ return;
+ }
isInitialized = true;
// Initialize package
@@ -817,8 +895,8 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
setNsURI(eNS_URI);
// Obtain other dependent packages
- Iso42010Package theIso42010Package = (Iso42010Package)EPackage.Registry.INSTANCE.getEPackage(Iso42010Package.eNS_URI);
- ConstraintsPackage theConstraintsPackage = (ConstraintsPackage)EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
+ Iso42010Package theIso42010Package = (Iso42010Package) EPackage.Registry.INSTANCE.getEPackage(Iso42010Package.eNS_URI);
+ ConstraintsPackage theConstraintsPackage = (ConstraintsPackage) EPackage.Registry.INSTANCE.getEPackage(ConstraintsPackage.eNS_URI);
// Create type parameters
@@ -836,15 +914,20 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
owningRuleEClass.getESuperTypes().add(this.getRule());
childRuleEClass.getESuperTypes().add(this.getRule());
paletteRuleEClass.getESuperTypes().add(this.getRule());
+ assistantRuleEClass.getESuperTypes().add(this.getRule());
// Initialize classes, features, and operations; add parameters
initEClass(papyrusConfigurationEClass, PapyrusConfiguration.class, "PapyrusConfiguration", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getPapyrusConfiguration_DefaultStakeholder(), theIso42010Package.getStakeholder(), null, "defaultStakeholder", null, 1, 1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getPapyrusConfiguration_Metamodel(), ecorePackage.getEPackage(), null, "metamodel", null, 1, 1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
- initEReference(getPapyrusConfiguration_Categories(), this.getCategory(), null, "categories", null, 0, -1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusConfiguration_DefaultStakeholder(), theIso42010Package.getStakeholder(), null, "defaultStakeholder", null, 1, 1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES,
+ !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusConfiguration_Metamodel(), ecorePackage.getEPackage(), null, "metamodel", null, 1, 1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE,
+ !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusConfiguration_Categories(), this.getCategory(), null, "categories", null, 0, -1, PapyrusConfiguration.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEClass(papyrusViewpointEClass, PapyrusViewpoint.class, "PapyrusViewpoint", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getPapyrusViewpoint_Parent(), this.getPapyrusViewpoint(), null, "parent", null, 0, 1, PapyrusViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getPapyrusViewpoint_Parent(), this.getPapyrusViewpoint(), null, "parent", null, 0, 1, PapyrusViewpoint.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
initEClass(papyrusViewEClass, PapyrusView.class, "PapyrusView", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPapyrusView_Icon(), ecorePackage.getEString(), "icon", null, 0, 1, PapyrusView.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
@@ -858,8 +941,12 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
initEClass(papyrusDiagramEClass, PapyrusDiagram.class, "PapyrusDiagram", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getPapyrusDiagram_CustomPalette(), ecorePackage.getEString(), "customPalette", null, 0, 1, PapyrusDiagram.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
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_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_AssistantRules(), this.getAssistantRule(), null, "assistantRules", 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);
@@ -876,10 +963,13 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
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);
+ 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);
- initEReference(getOwningRule_SelectDiagramRoot(), this.getRootAutoSelect(), null, "selectDiagramRoot", 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_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);
+ initEReference(getOwningRule_SelectDiagramRoot(), this.getRootAutoSelect(), null, "selectDiagramRoot", 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);
@@ -899,12 +989,23 @@ public class ConfigurationPackageImpl extends EPackageImpl implements Configurat
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(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_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);
initEAttribute(getModelAutoCreate_CreationType(), ecorePackage.getEString(), "creationType", null, 1, 1, ModelAutoCreate.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(rootAutoSelectEClass, RootAutoSelect.class, "RootAutoSelect", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
- initEReference(getRootAutoSelect_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, RootAutoSelect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+ initEReference(getRootAutoSelect_Feature(), ecorePackage.getEReference(), null, "feature", null, 1, 1, RootAutoSelect.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED,
+ IS_ORDERED);
+
+ initEClass(assistantRuleEClass, AssistantRule.class, "AssistantRule", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
+ initEAttribute(getAssistantRule_ElementTypeID(), ecorePackage.getEString(), "elementTypeID", null, 0, 1, AssistantRule.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
+
+ EOperation op = initEOperation(getAssistantRule__Matches__IElementType(), ecorePackage.getEBoolean(), "matches", 1, 1, IS_UNIQUE, IS_ORDERED);
+ addEParameter(op, this.getElementType(), "elementType", 1, 1, IS_UNIQUE, IS_ORDERED);
+
+ // Initialize data types
+ initEDataType(elementTypeEDataType, IElementType.class, "ElementType", IS_SERIALIZABLE, !IS_GENERATED_INSTANCE_CLASS);
// Create resource
createResource(eNS_URI);
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java
index 3a7fef2fa7a..2fed2d298e3 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelAutoCreateImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -30,7 +31,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
* An implementation of the model object '<em><b>Model Auto Create</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -98,11 +98,12 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
*/
public EReference getFeature() {
if (feature != null && feature.eIsProxy()) {
- InternalEObject oldFeature = (InternalEObject)feature;
- feature = (EReference)eResolveProxy(oldFeature);
+ InternalEObject oldFeature = (InternalEObject) feature;
+ feature = (EReference) eResolveProxy(oldFeature);
if (feature != oldFeature) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE, oldFeature, feature));
+ }
}
}
return feature;
@@ -125,8 +126,9 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
public void setFeature(EReference newFeature) {
EReference oldFeature = feature;
feature = newFeature;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE, oldFeature, feature));
+ }
}
/**
@@ -136,7 +138,7 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
*/
public EClass getOrigin() {
EClass origin = basicGetOrigin();
- return origin != null && origin.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)origin) : origin;
+ return origin != null && origin.eIsProxy() ? (EClass) eResolveProxy((InternalEObject) origin) : origin;
}
/**
@@ -168,8 +170,9 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
public void setCreationType(String newCreationType) {
String oldCreationType = creationType;
creationType = newCreationType;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE, oldCreationType, creationType));
+ }
}
/**
@@ -180,14 +183,18 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
@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:
- return getCreationType();
+ 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:
+ return getCreationType();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -200,12 +207,12 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
@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((String)newValue);
- return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE:
+ setFeature((EReference) newValue);
+ return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ setCreationType((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -218,12 +225,12 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
@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(CREATION_TYPE_EDEFAULT);
- return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__FEATURE:
+ setFeature((EReference) null);
+ return;
+ case ConfigurationPackage.MODEL_AUTO_CREATE__CREATION_TYPE:
+ setCreationType(CREATION_TYPE_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -236,12 +243,12 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
@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 CREATION_TYPE_EDEFAULT == null ? creationType != null : !CREATION_TYPE_EDEFAULT.equals(creationType);
+ 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 CREATION_TYPE_EDEFAULT == null ? creationType != null : !CREATION_TYPE_EDEFAULT.equals(creationType);
}
return super.eIsSet(featureID);
}
@@ -253,7 +260,9 @@ public class ModelAutoCreateImpl extends MinimalEObjectImpl.Container implements
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (creationType: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
index 0bae491e697..7bc2f5546a5 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ModelRuleImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -41,7 +42,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
* An implementation of the model object '<em><b>Model Rule</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -173,8 +173,9 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
public void setElementMultiplicity(int newElementMultiplicity) {
int oldElementMultiplicity = elementMultiplicity;
elementMultiplicity = newElementMultiplicity;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY, oldElementMultiplicity, elementMultiplicity));
+ }
}
/**
@@ -184,11 +185,12 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
*/
public EClass getElement() {
if (element != null && element.eIsProxy()) {
- InternalEObject oldElement = (InternalEObject)element;
- element = (EClass)eResolveProxy(oldElement);
+ InternalEObject oldElement = (InternalEObject) element;
+ element = (EClass) eResolveProxy(oldElement);
if (element != oldElement) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.MODEL_RULE__ELEMENT, oldElement, element));
+ }
}
}
return element;
@@ -211,8 +213,9 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
public void setElement(EClass newElement) {
EClass oldElement = element;
element = newElement;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_RULE__ELEMENT, oldElement, element));
+ }
}
/**
@@ -244,8 +247,9 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
public void setMultiplicity(int newMultiplicity) {
int oldMultiplicity = multiplicity;
multiplicity = newMultiplicity;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.MODEL_RULE__MULTIPLICITY, oldMultiplicity, multiplicity));
+ }
}
/**
@@ -257,8 +261,8 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
@Override
public NotificationChain eInverseAdd(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- return ((InternalEList<InternalEObject>)(InternalEList<?>)getConstraints()).basicAdd(otherEnd, msgs);
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ return ((InternalEList<InternalEObject>) (InternalEList<?>) getConstraints()).basicAdd(otherEnd, msgs);
}
return super.eInverseAdd(otherEnd, featureID, msgs);
}
@@ -271,8 +275,8 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- return ((InternalEList<?>)getConstraints()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ return ((InternalEList<?>) getConstraints()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -285,17 +289,19 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- return getConstraints();
- case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
- return getElementMultiplicity();
- case ConfigurationPackage.MODEL_RULE__ELEMENT:
- if (resolve) return getElement();
- return basicGetElement();
- case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
- return getStereotypes();
- case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
- return getMultiplicity();
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ return getConstraints();
+ case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
+ return getElementMultiplicity();
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ if (resolve) {
+ return getElement();
+ }
+ return basicGetElement();
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ return getStereotypes();
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ return getMultiplicity();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -309,23 +315,23 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- getConstraints().clear();
- getConstraints().addAll((Collection<? extends ConstraintDescriptor>)newValue);
- return;
- case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
- setElementMultiplicity((Integer)newValue);
- return;
- case ConfigurationPackage.MODEL_RULE__ELEMENT:
- setElement((EClass)newValue);
- return;
- case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
- getStereotypes().clear();
- getStereotypes().addAll((Collection<? extends EClass>)newValue);
- return;
- case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
- setMultiplicity((Integer)newValue);
- return;
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ getConstraints().clear();
+ getConstraints().addAll((Collection<? extends ConstraintDescriptor>) newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
+ setElementMultiplicity((Integer) newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ setElement((EClass) newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>) newValue);
+ return;
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ setMultiplicity((Integer) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -338,21 +344,21 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- getConstraints().clear();
- return;
- case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
- setElementMultiplicity(ELEMENT_MULTIPLICITY_EDEFAULT);
- return;
- case ConfigurationPackage.MODEL_RULE__ELEMENT:
- setElement((EClass)null);
- return;
- case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
- getStereotypes().clear();
- return;
- case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
- setMultiplicity(MULTIPLICITY_EDEFAULT);
- return;
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ getConstraints().clear();
+ return;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
+ setElementMultiplicity(ELEMENT_MULTIPLICITY_EDEFAULT);
+ return;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ setElement((EClass) null);
+ return;
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ setMultiplicity(MULTIPLICITY_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -365,16 +371,16 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
- return constraints != null && !constraints.isEmpty();
- case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
- return elementMultiplicity != ELEMENT_MULTIPLICITY_EDEFAULT;
- case ConfigurationPackage.MODEL_RULE__ELEMENT:
- return element != null;
- case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
- return stereotypes != null && !stereotypes.isEmpty();
- case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
- return multiplicity != MULTIPLICITY_EDEFAULT;
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ return constraints != null && !constraints.isEmpty();
+ case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
+ return elementMultiplicity != ELEMENT_MULTIPLICITY_EDEFAULT;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT:
+ return element != null;
+ case ConfigurationPackage.MODEL_RULE__STEREOTYPES:
+ return stereotypes != null && !stereotypes.isEmpty();
+ case ConfigurationPackage.MODEL_RULE__MULTIPLICITY:
+ return multiplicity != MULTIPLICITY_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -388,9 +394,12 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
if (baseClass == DisplayUnit.class) {
switch (derivedFeatureID) {
- case ConfigurationPackage.MODEL_RULE__CONSTRAINTS: return ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS;
- case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY: return ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY;
- default: return -1;
+ case ConfigurationPackage.MODEL_RULE__CONSTRAINTS:
+ return ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS;
+ case ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY:
+ return ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY;
+ default:
+ return -1;
}
}
return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
@@ -405,9 +414,12 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
if (baseClass == DisplayUnit.class) {
switch (baseFeatureID) {
- case ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS: return ConfigurationPackage.MODEL_RULE__CONSTRAINTS;
- case ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY: return ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY;
- default: return -1;
+ case ConstraintsPackage.DISPLAY_UNIT__CONSTRAINTS:
+ return ConfigurationPackage.MODEL_RULE__CONSTRAINTS;
+ case ConstraintsPackage.DISPLAY_UNIT__ELEMENT_MULTIPLICITY:
+ return ConfigurationPackage.MODEL_RULE__ELEMENT_MULTIPLICITY;
+ default:
+ return -1;
}
}
return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
@@ -420,7 +432,9 @@ public class ModelRuleImpl extends RuleImpl implements ModelRule {
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (elementMultiplicity: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
index 021cfdb4f01..d8bd1083a56 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/OwningRuleImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -39,7 +40,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.RootAutoSelect;
* An implementation of the model object '<em><b>Owning Rule</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -139,11 +139,12 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
*/
public EClass getElement() {
if (element != null && element.eIsProxy()) {
- InternalEObject oldElement = (InternalEObject)element;
- element = (EClass)eResolveProxy(oldElement);
+ InternalEObject oldElement = (InternalEObject) element;
+ element = (EClass) eResolveProxy(oldElement);
if (element != oldElement) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.OWNING_RULE__ELEMENT, oldElement, element));
+ }
}
}
return element;
@@ -166,8 +167,9 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
public void setElement(EClass newElement) {
EClass oldElement = element;
element = newElement;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.OWNING_RULE__ELEMENT, oldElement, element));
+ }
}
/**
@@ -199,8 +201,9 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
public void setMultiplicity(int newMultiplicity) {
int oldMultiplicity = multiplicity;
multiplicity = newMultiplicity;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.OWNING_RULE__MULTIPLICITY, oldMultiplicity, multiplicity));
+ }
}
/**
@@ -235,10 +238,10 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
@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);
- case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
- return ((InternalEList<?>)getSelectDiagramRoot()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ return ((InternalEList<?>) getNewModelPath()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
+ return ((InternalEList<?>) getSelectDiagramRoot()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -251,17 +254,19 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.OWNING_RULE__ELEMENT:
- if (resolve) return getElement();
- return basicGetElement();
- case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
- return getStereotypes();
- case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
- return getMultiplicity();
- case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
- return getNewModelPath();
- case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
- return getSelectDiagramRoot();
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ if (resolve) {
+ return getElement();
+ }
+ return basicGetElement();
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ return getStereotypes();
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ return getMultiplicity();
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ return getNewModelPath();
+ case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
+ return getSelectDiagramRoot();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -275,24 +280,24 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.OWNING_RULE__ELEMENT:
- setElement((EClass)newValue);
- return;
- case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
- getStereotypes().clear();
- getStereotypes().addAll((Collection<? extends EClass>)newValue);
- return;
- 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;
- case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
- getSelectDiagramRoot().clear();
- getSelectDiagramRoot().addAll((Collection<? extends RootAutoSelect>)newValue);
- return;
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ setElement((EClass) newValue);
+ return;
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ getStereotypes().addAll((Collection<? extends EClass>) newValue);
+ return;
+ 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;
+ case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
+ getSelectDiagramRoot().clear();
+ getSelectDiagramRoot().addAll((Collection<? extends RootAutoSelect>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -305,21 +310,21 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.OWNING_RULE__ELEMENT:
- setElement((EClass)null);
- return;
- case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
- getStereotypes().clear();
- return;
- case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
- setMultiplicity(MULTIPLICITY_EDEFAULT);
- return;
- case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
- getNewModelPath().clear();
- return;
- case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
- getSelectDiagramRoot().clear();
- return;
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ setElement((EClass) null);
+ return;
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ getStereotypes().clear();
+ return;
+ case ConfigurationPackage.OWNING_RULE__MULTIPLICITY:
+ setMultiplicity(MULTIPLICITY_EDEFAULT);
+ return;
+ case ConfigurationPackage.OWNING_RULE__NEW_MODEL_PATH:
+ getNewModelPath().clear();
+ return;
+ case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
+ getSelectDiagramRoot().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -332,16 +337,16 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.OWNING_RULE__ELEMENT:
- return element != null;
- case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
- 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();
- case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
- return selectDiagramRoot != null && !selectDiagramRoot.isEmpty();
+ case ConfigurationPackage.OWNING_RULE__ELEMENT:
+ return element != null;
+ case ConfigurationPackage.OWNING_RULE__STEREOTYPES:
+ 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();
+ case ConfigurationPackage.OWNING_RULE__SELECT_DIAGRAM_ROOT:
+ return selectDiagramRoot != null && !selectDiagramRoot.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -353,7 +358,9 @@ public class OwningRuleImpl extends RuleImpl implements OwningRule {
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (multiplicity: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java
index d2de77b1e8a..c0e7e3c4697 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PaletteRuleImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -27,7 +28,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
* An implementation of the model object '<em><b>Palette Rule</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -93,8 +93,9 @@ public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
public void setElement(String newElement) {
String oldElement = element;
element = newElement;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PALETTE_RULE__ELEMENT, oldElement, element));
+ }
}
/**
@@ -105,8 +106,8 @@ public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PALETTE_RULE__ELEMENT:
- return getElement();
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ return getElement();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -119,9 +120,9 @@ public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PALETTE_RULE__ELEMENT:
- setElement((String)newValue);
- return;
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ setElement((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -134,9 +135,9 @@ public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PALETTE_RULE__ELEMENT:
- setElement(ELEMENT_EDEFAULT);
- return;
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ setElement(ELEMENT_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -149,8 +150,8 @@ public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PALETTE_RULE__ELEMENT:
- return ELEMENT_EDEFAULT == null ? element != null : !ELEMENT_EDEFAULT.equals(element);
+ case ConfigurationPackage.PALETTE_RULE__ELEMENT:
+ return ELEMENT_EDEFAULT == null ? element != null : !ELEMENT_EDEFAULT.equals(element);
}
return super.eIsSet(featureID);
}
@@ -162,7 +163,9 @@ public class PaletteRuleImpl extends RuleImpl implements PaletteRule {
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (element: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java
index bc9411a05bb..4fd7c3567f5 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusConfigurationImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -42,7 +43,6 @@ import org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureFrameworkI
* An implementation of the model object '<em><b>Papyrus Configuration</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -110,11 +110,12 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
*/
public Stakeholder getDefaultStakeholder() {
if (defaultStakeholder != null && defaultStakeholder.eIsProxy()) {
- InternalEObject oldDefaultStakeholder = (InternalEObject)defaultStakeholder;
- defaultStakeholder = (Stakeholder)eResolveProxy(oldDefaultStakeholder);
+ InternalEObject oldDefaultStakeholder = (InternalEObject) defaultStakeholder;
+ defaultStakeholder = (Stakeholder) eResolveProxy(oldDefaultStakeholder);
if (defaultStakeholder != oldDefaultStakeholder) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER, oldDefaultStakeholder, defaultStakeholder));
+ }
}
}
return defaultStakeholder;
@@ -137,8 +138,9 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
public void setDefaultStakeholder(Stakeholder newDefaultStakeholder) {
Stakeholder oldDefaultStakeholder = defaultStakeholder;
defaultStakeholder = newDefaultStakeholder;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER, oldDefaultStakeholder, defaultStakeholder));
+ }
}
/**
@@ -148,11 +150,12 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
*/
public EPackage getMetamodel() {
if (metamodel != null && metamodel.eIsProxy()) {
- InternalEObject oldMetamodel = (InternalEObject)metamodel;
- metamodel = (EPackage)eResolveProxy(oldMetamodel);
+ InternalEObject oldMetamodel = (InternalEObject) metamodel;
+ metamodel = (EPackage) eResolveProxy(oldMetamodel);
if (metamodel != oldMetamodel) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL, oldMetamodel, metamodel));
+ }
}
}
return metamodel;
@@ -175,8 +178,9 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
public void setMetamodel(EPackage newMetamodel) {
EPackage oldMetamodel = metamodel;
metamodel = newMetamodel;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL, oldMetamodel, metamodel));
+ }
}
/**
@@ -199,8 +203,8 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
- return ((InternalEList<?>)getCategories()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ return ((InternalEList<?>) getCategories()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -213,14 +217,18 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
- if (resolve) return getDefaultStakeholder();
- return basicGetDefaultStakeholder();
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
- if (resolve) return getMetamodel();
- return basicGetMetamodel();
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
- return getCategories();
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ if (resolve) {
+ return getDefaultStakeholder();
+ }
+ return basicGetDefaultStakeholder();
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ if (resolve) {
+ return getMetamodel();
+ }
+ return basicGetMetamodel();
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ return getCategories();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -234,16 +242,16 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
- setDefaultStakeholder((Stakeholder)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
- setMetamodel((EPackage)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
- getCategories().clear();
- getCategories().addAll((Collection<? extends Category>)newValue);
- return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ setDefaultStakeholder((Stakeholder) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ setMetamodel((EPackage) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ getCategories().clear();
+ getCategories().addAll((Collection<? extends Category>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -256,15 +264,15 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
- setDefaultStakeholder((Stakeholder)null);
- return;
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
- setMetamodel((EPackage)null);
- return;
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
- getCategories().clear();
- return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ setDefaultStakeholder((Stakeholder) null);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ setMetamodel((EPackage) null);
+ return;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ getCategories().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -277,12 +285,12 @@ public class PapyrusConfigurationImpl extends ArchitectureFrameworkImpl implemen
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
- return defaultStakeholder != null;
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
- return metamodel != null;
- case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
- return categories != null && !categories.isEmpty();
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__DEFAULT_STAKEHOLDER:
+ return defaultStakeholder != null;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__METAMODEL:
+ return metamodel != null;
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION__CATEGORIES:
+ return categories != null && !categories.isEmpty();
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
index e528191dc27..853ac886547 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusDiagramImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -28,6 +29,7 @@ import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
import org.eclipse.papyrus.infra.viewpoints.configuration.PaletteRule;
@@ -38,7 +40,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
* An implementation of the model object '<em><b>Papyrus Diagram</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -46,6 +47,7 @@ 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#getAssistantRules <em>Assistant Rules</em>}</li>
* </ul>
*
* @generated
@@ -112,6 +114,16 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
protected EList<PaletteRule> paletteRules;
/**
+ * The cached value of the '{@link #getAssistantRules() <em>Assistant Rules</em>}' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getAssistantRules()
+ * @generated
+ * @ordered
+ */
+ protected EList<AssistantRule> assistantRules;
+
+ /**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
@@ -147,8 +159,9 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
public void setCustomPalette(String newCustomPalette) {
String oldCustomPalette = customPalette;
customPalette = newCustomPalette;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE, oldCustomPalette, customPalette));
+ }
}
/**
@@ -168,8 +181,9 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
public void setCustomStyle(String newCustomStyle) {
String oldCustomStyle = customStyle;
customStyle = newCustomStyle;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE, oldCustomStyle, customStyle));
+ }
}
/**
@@ -201,13 +215,27 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
* <!-- end-user-doc -->
* @generated
*/
+ public EList<AssistantRule> getAssistantRules() {
+ if (assistantRules == null) {
+ assistantRules = new EObjectContainmentEList<AssistantRule>(AssistantRule.class, this, ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES);
+ }
+ return assistantRules;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
- return ((InternalEList<?>)getChildRules()).basicRemove(otherEnd, msgs);
- case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- return ((InternalEList<?>)getPaletteRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return ((InternalEList<?>) getChildRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return ((InternalEList<?>) getPaletteRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ return ((InternalEList<?>) getAssistantRules()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -220,14 +248,16 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
- return getCustomPalette();
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
- return getCustomStyle();
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
- return getChildRules();
- case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- return getPaletteRules();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ return getCustomPalette();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ return getCustomStyle();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return getChildRules();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return getPaletteRules();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ return getAssistantRules();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -241,20 +271,24 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
- setCustomPalette((String)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
- setCustomStyle((String)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
- getChildRules().clear();
- getChildRules().addAll((Collection<? extends ChildRule>)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- getPaletteRules().clear();
- getPaletteRules().addAll((Collection<? extends PaletteRule>)newValue);
- return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ setCustomPalette((String) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ setCustomStyle((String) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ getChildRules().clear();
+ getChildRules().addAll((Collection<? extends ChildRule>) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ getPaletteRules().clear();
+ getPaletteRules().addAll((Collection<? extends PaletteRule>) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ getAssistantRules().clear();
+ getAssistantRules().addAll((Collection<? extends AssistantRule>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -267,18 +301,21 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
- setCustomPalette(CUSTOM_PALETTE_EDEFAULT);
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
- setCustomStyle(CUSTOM_STYLE_EDEFAULT);
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
- getChildRules().clear();
- return;
- case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- getPaletteRules().clear();
- return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ setCustomPalette(CUSTOM_PALETTE_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ setCustomStyle(CUSTOM_STYLE_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ getChildRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ getPaletteRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ getAssistantRules().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -291,14 +328,16 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
- return CUSTOM_PALETTE_EDEFAULT == null ? customPalette != null : !CUSTOM_PALETTE_EDEFAULT.equals(customPalette);
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
- return CUSTOM_STYLE_EDEFAULT == null ? customStyle != null : !CUSTOM_STYLE_EDEFAULT.equals(customStyle);
- case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
- return childRules != null && !childRules.isEmpty();
- case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
- return paletteRules != null && !paletteRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_PALETTE:
+ return CUSTOM_PALETTE_EDEFAULT == null ? customPalette != null : !CUSTOM_PALETTE_EDEFAULT.equals(customPalette);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CUSTOM_STYLE:
+ return CUSTOM_STYLE_EDEFAULT == null ? customStyle != null : !CUSTOM_STYLE_EDEFAULT.equals(customStyle);
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__CHILD_RULES:
+ return childRules != null && !childRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__PALETTE_RULES:
+ return paletteRules != null && !paletteRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_DIAGRAM__ASSISTANT_RULES:
+ return assistantRules != null && !assistantRules.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -310,7 +349,9 @@ public class PapyrusDiagramImpl extends PapyrusViewImpl implements PapyrusDiagra
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (customPalette: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java
index 37f02e019e3..d5b9aaeb71b 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusSyncTableImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -22,7 +23,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusSyncTable;
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Papyrus Sync Table</b></em>'.
* <!-- end-user-doc -->
- * <p>
*
* @generated
*/
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java
index de36744b3ef..0d72303481e 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusTableImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -27,7 +28,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusTable;
* An implementation of the model object '<em><b>Papyrus Table</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -93,8 +93,9 @@ public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
public void setConfiguration(String newConfiguration) {
String oldConfiguration = configuration;
configuration = newConfiguration;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION, oldConfiguration, configuration));
+ }
}
/**
@@ -105,8 +106,8 @@ public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
- return getConfiguration();
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ return getConfiguration();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -119,9 +120,9 @@ public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
- setConfiguration((String)newValue);
- return;
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ setConfiguration((String) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -134,9 +135,9 @@ public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
- setConfiguration(CONFIGURATION_EDEFAULT);
- return;
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ setConfiguration(CONFIGURATION_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -149,8 +150,8 @@ public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
- return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration);
+ case ConfigurationPackage.PAPYRUS_TABLE__CONFIGURATION:
+ return CONFIGURATION_EDEFAULT == null ? configuration != null : !CONFIGURATION_EDEFAULT.equals(configuration);
}
return super.eIsSet(featureID);
}
@@ -162,7 +163,9 @@ public class PapyrusTableImpl extends PapyrusViewImpl implements PapyrusTable {
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (configuration: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java
index a2484867ed8..2640c93d16f 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -43,7 +44,6 @@ import org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ModelKindImpl;
* An implementation of the model object '<em><b>Papyrus View</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -185,8 +185,9 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
public void setIcon(String newIcon) {
String oldIcon = icon;
icon = newIcon;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEW__ICON, oldIcon, icon));
+ }
}
/**
@@ -196,11 +197,12 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
*/
public PapyrusView getParent() {
if (parent != null && parent.eIsProxy()) {
- InternalEObject oldParent = (InternalEObject)parent;
- parent = (PapyrusView)eResolveProxy(oldParent);
+ InternalEObject oldParent = (InternalEObject) parent;
+ parent = (PapyrusView) eResolveProxy(oldParent);
if (parent != oldParent) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_VIEW__PARENT, oldParent, parent));
+ }
}
}
return parent;
@@ -223,8 +225,9 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
public void setParent(PapyrusView newParent) {
PapyrusView oldParent = parent;
parent = newParent;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEW__PARENT, oldParent, parent));
+ }
}
/**
@@ -280,8 +283,9 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
public void setImplementationID(String newImplementationID) {
String oldImplementationID = implementationID;
implementationID = newImplementationID;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID, oldImplementationID, implementationID));
+ }
}
/**
@@ -304,10 +308,10 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
- return ((InternalEList<?>)getModelRules()).basicRemove(otherEnd, msgs);
- case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
- return ((InternalEList<?>)getOwningRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ return ((InternalEList<?>) getModelRules()).basicRemove(otherEnd, msgs);
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ return ((InternalEList<?>) getOwningRules()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
@@ -320,21 +324,23 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEW__ICON:
- return getIcon();
- case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
- if (resolve) return getParent();
- return basicGetParent();
- case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
- return getProfiles();
- case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
- return getModelRules();
- case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
- return getOwningRules();
- case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
- return getImplementationID();
- case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
- return getCategories();
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ return getIcon();
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ if (resolve) {
+ return getParent();
+ }
+ return basicGetParent();
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ return getProfiles();
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ return getModelRules();
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ return getOwningRules();
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ return getImplementationID();
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ return getCategories();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -348,31 +354,31 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEW__ICON:
- setIcon((String)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
- setParent((PapyrusView)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
- getProfiles().clear();
- getProfiles().addAll((Collection<? extends EPackage>)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
- getModelRules().clear();
- getModelRules().addAll((Collection<? extends ModelRule>)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
- getOwningRules().clear();
- getOwningRules().addAll((Collection<? extends OwningRule>)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
- setImplementationID((String)newValue);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
- getCategories().clear();
- getCategories().addAll((Collection<? extends Category>)newValue);
- return;
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ setIcon((String) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ setParent((PapyrusView) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ getProfiles().clear();
+ getProfiles().addAll((Collection<? extends EPackage>) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ getModelRules().clear();
+ getModelRules().addAll((Collection<? extends ModelRule>) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ getOwningRules().clear();
+ getOwningRules().addAll((Collection<? extends OwningRule>) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ setImplementationID((String) newValue);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ getCategories().clear();
+ getCategories().addAll((Collection<? extends Category>) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -385,27 +391,27 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEW__ICON:
- setIcon(ICON_EDEFAULT);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
- setParent((PapyrusView)null);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
- getProfiles().clear();
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
- getModelRules().clear();
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
- getOwningRules().clear();
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
- setImplementationID(IMPLEMENTATION_ID_EDEFAULT);
- return;
- case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
- getCategories().clear();
- return;
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ setIcon(ICON_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ setParent((PapyrusView) null);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ getProfiles().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ getModelRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ getOwningRules().clear();
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ setImplementationID(IMPLEMENTATION_ID_EDEFAULT);
+ return;
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ getCategories().clear();
+ return;
}
super.eUnset(featureID);
}
@@ -418,20 +424,20 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEW__ICON:
- return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
- case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
- return parent != null;
- case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
- return profiles != null && !profiles.isEmpty();
- case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
- return modelRules != null && !modelRules.isEmpty();
- case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
- return owningRules != null && !owningRules.isEmpty();
- case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
- return IMPLEMENTATION_ID_EDEFAULT == null ? implementationID != null : !IMPLEMENTATION_ID_EDEFAULT.equals(implementationID);
- case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
- return categories != null && !categories.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__ICON:
+ return ICON_EDEFAULT == null ? icon != null : !ICON_EDEFAULT.equals(icon);
+ case ConfigurationPackage.PAPYRUS_VIEW__PARENT:
+ return parent != null;
+ case ConfigurationPackage.PAPYRUS_VIEW__PROFILES:
+ return profiles != null && !profiles.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__MODEL_RULES:
+ return modelRules != null && !modelRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__OWNING_RULES:
+ return owningRules != null && !owningRules.isEmpty();
+ case ConfigurationPackage.PAPYRUS_VIEW__IMPLEMENTATION_ID:
+ return IMPLEMENTATION_ID_EDEFAULT == null ? implementationID != null : !IMPLEMENTATION_ID_EDEFAULT.equals(implementationID);
+ case ConfigurationPackage.PAPYRUS_VIEW__CATEGORIES:
+ return categories != null && !categories.isEmpty();
}
return super.eIsSet(featureID);
}
@@ -443,7 +449,9 @@ public class PapyrusViewImpl extends ModelKindImpl implements PapyrusView {
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (icon: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java
index bd22e1673d2..94532f79088 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PapyrusViewpointImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -30,7 +31,6 @@ import org.eclipse.papyrus.infra.viewpoints.iso42010.impl.ArchitectureViewpointI
* An implementation of the model object '<em><b>Papyrus Viewpoint</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -76,11 +76,12 @@ public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements P
*/
public PapyrusViewpoint getParent() {
if (parent != null && parent.eIsProxy()) {
- InternalEObject oldParent = (InternalEObject)parent;
- parent = (PapyrusViewpoint)eResolveProxy(oldParent);
+ InternalEObject oldParent = (InternalEObject) parent;
+ parent = (PapyrusViewpoint) eResolveProxy(oldParent);
if (parent != oldParent) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT, oldParent, parent));
+ }
}
}
return parent;
@@ -103,8 +104,9 @@ public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements P
public void setParent(PapyrusViewpoint newParent) {
PapyrusViewpoint oldParent = parent;
parent = newParent;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT, oldParent, parent));
+ }
}
/**
@@ -115,9 +117,11 @@ public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements P
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
- if (resolve) return getParent();
- return basicGetParent();
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ if (resolve) {
+ return getParent();
+ }
+ return basicGetParent();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -130,9 +134,9 @@ public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements P
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
- setParent((PapyrusViewpoint)newValue);
- return;
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ setParent((PapyrusViewpoint) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -145,9 +149,9 @@ public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements P
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
- setParent((PapyrusViewpoint)null);
- return;
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ setParent((PapyrusViewpoint) null);
+ return;
}
super.eUnset(featureID);
}
@@ -160,8 +164,8 @@ public class PapyrusViewpointImpl extends ArchitectureViewpointImpl implements P
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
- return parent != null;
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT__PARENT:
+ return parent != null;
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
index 1a4e65f9494..f6ac0a01591 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/PathElementImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -30,7 +31,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PathElement;
* An implementation of the model object '<em><b>Path Element</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -78,11 +78,12 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
*/
public EReference getFeature() {
if (feature != null && feature.eIsProxy()) {
- InternalEObject oldFeature = (InternalEObject)feature;
- feature = (EReference)eResolveProxy(oldFeature);
+ InternalEObject oldFeature = (InternalEObject) feature;
+ feature = (EReference) eResolveProxy(oldFeature);
if (feature != oldFeature) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.PATH_ELEMENT__FEATURE, oldFeature, feature));
+ }
}
}
return feature;
@@ -105,8 +106,9 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
public void setFeature(EReference newFeature) {
EReference oldFeature = feature;
feature = newFeature;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.PATH_ELEMENT__FEATURE, oldFeature, feature));
+ }
}
/**
@@ -116,7 +118,7 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
*/
public EClass getOrigin() {
EClass origin = basicGetOrigin();
- return origin != null && origin.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)origin) : origin;
+ return origin != null && origin.eIsProxy() ? (EClass) eResolveProxy((InternalEObject) origin) : origin;
}
/**
@@ -138,7 +140,7 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
*/
public EClass getTarget() {
EClass target = basicGetTarget();
- return target != null && target.eIsProxy() ? (EClass)eResolveProxy((InternalEObject)target) : target;
+ return target != null && target.eIsProxy() ? (EClass) eResolveProxy((InternalEObject) target) : target;
}
/**
@@ -161,15 +163,21 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.PATH_ELEMENT__FEATURE:
- if (resolve) return getFeature();
- return basicGetFeature();
- case ConfigurationPackage.PATH_ELEMENT__ORIGIN:
- if (resolve) return getOrigin();
- return basicGetOrigin();
- case ConfigurationPackage.PATH_ELEMENT__TARGET:
- if (resolve) return getTarget();
- return basicGetTarget();
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ if (resolve) {
+ return getFeature();
+ }
+ return basicGetFeature();
+ case ConfigurationPackage.PATH_ELEMENT__ORIGIN:
+ if (resolve) {
+ return getOrigin();
+ }
+ return basicGetOrigin();
+ case ConfigurationPackage.PATH_ELEMENT__TARGET:
+ if (resolve) {
+ return getTarget();
+ }
+ return basicGetTarget();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -182,9 +190,9 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.PATH_ELEMENT__FEATURE:
- setFeature((EReference)newValue);
- return;
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ setFeature((EReference) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -197,9 +205,9 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PATH_ELEMENT__FEATURE:
- setFeature((EReference)null);
- return;
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ setFeature((EReference) null);
+ return;
}
super.eUnset(featureID);
}
@@ -212,12 +220,12 @@ public class PathElementImpl extends MinimalEObjectImpl.Container implements Pat
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.PATH_ELEMENT__FEATURE:
- return feature != null;
- case ConfigurationPackage.PATH_ELEMENT__ORIGIN:
- return basicGetOrigin() != null;
- case ConfigurationPackage.PATH_ELEMENT__TARGET:
- return basicGetTarget() != null;
+ case ConfigurationPackage.PATH_ELEMENT__FEATURE:
+ return feature != null;
+ case ConfigurationPackage.PATH_ELEMENT__ORIGIN:
+ return basicGetOrigin() != null;
+ case ConfigurationPackage.PATH_ELEMENT__TARGET:
+ return basicGetTarget() != null;
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RootAutoSelectImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RootAutoSelectImpl.java
index 5c9019686b3..fe60545e892 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RootAutoSelectImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RootAutoSelectImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -30,7 +31,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.RootAutoSelect;
* An implementation of the model object '<em><b>Root Auto Select</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -76,11 +76,12 @@ public class RootAutoSelectImpl extends MinimalEObjectImpl.Container implements
*/
public EReference getFeature() {
if (feature != null && feature.eIsProxy()) {
- InternalEObject oldFeature = (InternalEObject)feature;
- feature = (EReference)eResolveProxy(oldFeature);
+ InternalEObject oldFeature = (InternalEObject) feature;
+ feature = (EReference) eResolveProxy(oldFeature);
if (feature != oldFeature) {
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.RESOLVE, ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE, oldFeature, feature));
+ }
}
}
return feature;
@@ -103,8 +104,9 @@ public class RootAutoSelectImpl extends MinimalEObjectImpl.Container implements
public void setFeature(EReference newFeature) {
EReference oldFeature = feature;
feature = newFeature;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE, oldFeature, feature));
+ }
}
/**
@@ -115,9 +117,11 @@ public class RootAutoSelectImpl extends MinimalEObjectImpl.Container implements
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
- if (resolve) return getFeature();
- return basicGetFeature();
+ case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
+ if (resolve) {
+ return getFeature();
+ }
+ return basicGetFeature();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -130,9 +134,9 @@ public class RootAutoSelectImpl extends MinimalEObjectImpl.Container implements
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
- setFeature((EReference)newValue);
- return;
+ case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
+ setFeature((EReference) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -145,9 +149,9 @@ public class RootAutoSelectImpl extends MinimalEObjectImpl.Container implements
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
- setFeature((EReference)null);
- return;
+ case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
+ setFeature((EReference) null);
+ return;
}
super.eUnset(featureID);
}
@@ -160,8 +164,8 @@ public class RootAutoSelectImpl extends MinimalEObjectImpl.Container implements
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
- return feature != null;
+ case ConfigurationPackage.ROOT_AUTO_SELECT__FEATURE:
+ return feature != null;
}
return super.eIsSet(featureID);
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java
index 2a402d02795..a7585246d10 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/impl/RuleImpl.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
@@ -28,7 +29,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.Rule;
* An implementation of the model object '<em><b>Rule</b></em>'.
* <!-- end-user-doc -->
* <p>
- * <p>
* The following features are implemented:
* </p>
* <ul>
@@ -94,8 +94,9 @@ public abstract class RuleImpl extends MinimalEObjectImpl.Container implements R
public void setPermit(boolean newPermit) {
boolean oldPermit = permit;
permit = newPermit;
- if (eNotificationRequired())
+ if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, ConfigurationPackage.RULE__PERMIT, oldPermit, permit));
+ }
}
/**
@@ -106,8 +107,8 @@ public abstract class RuleImpl extends MinimalEObjectImpl.Container implements R
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
- case ConfigurationPackage.RULE__PERMIT:
- return isPermit();
+ case ConfigurationPackage.RULE__PERMIT:
+ return isPermit();
}
return super.eGet(featureID, resolve, coreType);
}
@@ -120,9 +121,9 @@ public abstract class RuleImpl extends MinimalEObjectImpl.Container implements R
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
- case ConfigurationPackage.RULE__PERMIT:
- setPermit((Boolean)newValue);
- return;
+ case ConfigurationPackage.RULE__PERMIT:
+ setPermit((Boolean) newValue);
+ return;
}
super.eSet(featureID, newValue);
}
@@ -135,9 +136,9 @@ public abstract class RuleImpl extends MinimalEObjectImpl.Container implements R
@Override
public void eUnset(int featureID) {
switch (featureID) {
- case ConfigurationPackage.RULE__PERMIT:
- setPermit(PERMIT_EDEFAULT);
- return;
+ case ConfigurationPackage.RULE__PERMIT:
+ setPermit(PERMIT_EDEFAULT);
+ return;
}
super.eUnset(featureID);
}
@@ -150,8 +151,8 @@ public abstract class RuleImpl extends MinimalEObjectImpl.Container implements R
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
- case ConfigurationPackage.RULE__PERMIT:
- return permit != PERMIT_EDEFAULT;
+ case ConfigurationPackage.RULE__PERMIT:
+ return permit != PERMIT_EDEFAULT;
}
return super.eIsSet(featureID);
}
@@ -163,7 +164,9 @@ public abstract class RuleImpl extends MinimalEObjectImpl.Container implements R
*/
@Override
public String toString() {
- if (eIsProxy()) return super.toString();
+ if (eIsProxy()) {
+ return super.toString();
+ }
StringBuffer result = new StringBuffer(super.toString());
result.append(" (permit: ");
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
index e9b8e1dd78a..38701fd37d6 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationAdapterFactory.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.util;
@@ -72,7 +73,7 @@ public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
return true;
}
if (object instanceof EObject) {
- return ((EObject)object).eClass().getEPackage() == modelPackage;
+ return ((EObject) object).eClass().getEPackage() == modelPackage;
}
return false;
}
@@ -83,93 +84,117 @@ public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
* <!-- end-user-doc -->
* @generated
*/
- protected ConfigurationSwitch<Adapter> modelSwitch =
- new ConfigurationSwitch<Adapter>() {
- @Override
- public Adapter casePapyrusConfiguration(PapyrusConfiguration object) {
- return createPapyrusConfigurationAdapter();
- }
- @Override
- public Adapter casePapyrusViewpoint(PapyrusViewpoint object) {
- return createPapyrusViewpointAdapter();
- }
- @Override
- public Adapter casePapyrusView(PapyrusView object) {
- return createPapyrusViewAdapter();
- }
- @Override
- public Adapter casePapyrusDiagram(PapyrusDiagram object) {
- return createPapyrusDiagramAdapter();
- }
- @Override
- public Adapter casePapyrusSyncTable(PapyrusSyncTable object) {
- return createPapyrusSyncTableAdapter();
- }
- @Override
- public Adapter casePapyrusTable(PapyrusTable object) {
- return createPapyrusTableAdapter();
- }
- @Override
- public Adapter caseRule(Rule object) {
- return createRuleAdapter();
- }
- @Override
- public Adapter caseModelRule(ModelRule object) {
- return createModelRuleAdapter();
- }
- @Override
- public Adapter caseOwningRule(OwningRule object) {
- return createOwningRuleAdapter();
- }
- @Override
- public Adapter caseChildRule(ChildRule object) {
- return createChildRuleAdapter();
- }
- @Override
- public Adapter casePaletteRule(PaletteRule object) {
- return createPaletteRuleAdapter();
- }
- @Override
- public Adapter casePathElement(PathElement object) {
- return createPathElementAdapter();
- }
- @Override
- public Adapter caseCategory(Category object) {
- return createCategoryAdapter();
- }
- @Override
- public Adapter caseModelAutoCreate(ModelAutoCreate object) {
- return createModelAutoCreateAdapter();
- }
- @Override
- public Adapter caseRootAutoSelect(RootAutoSelect object) {
- return createRootAutoSelectAdapter();
- }
- @Override
- public Adapter caseArchitectureFramework(ArchitectureFramework object) {
- return createArchitectureFrameworkAdapter();
- }
- @Override
- public Adapter caseADElement(ADElement object) {
- return createADElementAdapter();
- }
- @Override
- public Adapter caseArchitectureViewpoint(ArchitectureViewpoint object) {
- return createArchitectureViewpointAdapter();
- }
- @Override
- public Adapter caseModelKind(ModelKind object) {
- return createModelKindAdapter();
- }
- @Override
- public Adapter caseDisplayUnit(DisplayUnit object) {
- return createDisplayUnitAdapter();
- }
- @Override
- public Adapter defaultCase(EObject object) {
- return createEObjectAdapter();
- }
- };
+ protected ConfigurationSwitch<Adapter> modelSwitch = new ConfigurationSwitch<Adapter>() {
+ @Override
+ public Adapter casePapyrusConfiguration(PapyrusConfiguration object) {
+ return createPapyrusConfigurationAdapter();
+ }
+
+ @Override
+ public Adapter casePapyrusViewpoint(PapyrusViewpoint object) {
+ return createPapyrusViewpointAdapter();
+ }
+
+ @Override
+ public Adapter casePapyrusView(PapyrusView object) {
+ return createPapyrusViewAdapter();
+ }
+
+ @Override
+ public Adapter casePapyrusDiagram(PapyrusDiagram object) {
+ return createPapyrusDiagramAdapter();
+ }
+
+ @Override
+ public Adapter casePapyrusSyncTable(PapyrusSyncTable object) {
+ return createPapyrusSyncTableAdapter();
+ }
+
+ @Override
+ public Adapter casePapyrusTable(PapyrusTable object) {
+ return createPapyrusTableAdapter();
+ }
+
+ @Override
+ public Adapter caseRule(Rule object) {
+ return createRuleAdapter();
+ }
+
+ @Override
+ public Adapter caseModelRule(ModelRule object) {
+ return createModelRuleAdapter();
+ }
+
+ @Override
+ public Adapter caseOwningRule(OwningRule object) {
+ return createOwningRuleAdapter();
+ }
+
+ @Override
+ public Adapter caseChildRule(ChildRule object) {
+ return createChildRuleAdapter();
+ }
+
+ @Override
+ public Adapter casePaletteRule(PaletteRule object) {
+ return createPaletteRuleAdapter();
+ }
+
+ @Override
+ public Adapter casePathElement(PathElement object) {
+ return createPathElementAdapter();
+ }
+
+ @Override
+ public Adapter caseCategory(Category object) {
+ return createCategoryAdapter();
+ }
+
+ @Override
+ public Adapter caseModelAutoCreate(ModelAutoCreate object) {
+ return createModelAutoCreateAdapter();
+ }
+
+ @Override
+ public Adapter caseRootAutoSelect(RootAutoSelect object) {
+ return createRootAutoSelectAdapter();
+ }
+
+ @Override
+ public Adapter caseAssistantRule(AssistantRule object) {
+ return createAssistantRuleAdapter();
+ }
+
+ @Override
+ public Adapter caseArchitectureFramework(ArchitectureFramework object) {
+ return createArchitectureFrameworkAdapter();
+ }
+
+ @Override
+ public Adapter caseADElement(ADElement object) {
+ return createADElementAdapter();
+ }
+
+ @Override
+ public Adapter caseArchitectureViewpoint(ArchitectureViewpoint object) {
+ return createArchitectureViewpointAdapter();
+ }
+
+ @Override
+ public Adapter caseModelKind(ModelKind object) {
+ return createModelKindAdapter();
+ }
+
+ @Override
+ public Adapter caseDisplayUnit(DisplayUnit object) {
+ return createDisplayUnitAdapter();
+ }
+
+ @Override
+ public Adapter defaultCase(EObject object) {
+ return createEObjectAdapter();
+ }
+ };
/**
* Creates an adapter for the <code>target</code>.
@@ -181,7 +206,7 @@ public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
*/
@Override
public Adapter createAdapter(Notifier target) {
- return modelSwitch.doSwitch((EObject)target);
+ return modelSwitch.doSwitch((EObject) target);
}
@@ -396,6 +421,20 @@ public class ConfigurationAdapterFactory extends AdapterFactoryImpl {
}
/**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule <em>Assistant Rule</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.AssistantRule
+ * @generated
+ */
+ public Adapter createAssistantRuleAdapter() {
+ return null;
+ }
+
+ /**
* Creates a new adapter for an object of class '{@link org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureFramework <em>Architecture Framework</em>}'.
* <!-- begin-user-doc -->
* This default implementation returns null so that we can easily ignore cases;
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceFactoryImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceFactoryImpl.java
index e5961c5c142..f53210e44c4 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceFactoryImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceFactoryImpl.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,29 +8,32 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.util;
import org.eclipse.emf.common.util.URI;
-
import org.eclipse.emf.ecore.resource.Resource;
-
import org.eclipse.emf.ecore.resource.impl.ResourceFactoryImpl;
/**
* <!-- begin-user-doc -->
* The <b>Resource Factory</b> associated with the package.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.infra.viewpoints.configuration.util.ConfigurationResourceImpl
* @generated
+ * @deprecated Use the {@link ConfigurationResourceFactoryCustomImpl} class, instead.
*/
+@Deprecated
public class ConfigurationResourceFactoryImpl extends ResourceFactoryImpl {
/**
* Creates an instance of the resource factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public ConfigurationResourceFactoryImpl() {
@@ -41,6 +44,7 @@ public class ConfigurationResourceFactoryImpl extends ResourceFactoryImpl {
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
@Override
@@ -49,4 +53,4 @@ public class ConfigurationResourceFactoryImpl extends ResourceFactoryImpl {
return result;
}
-} //ConfigurationResourceFactoryImpl
+} // ConfigurationResourceFactoryImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceImpl.java
index 266e3b3b270..19ff2e1eff1 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationResourceImpl.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,32 +8,37 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.util;
import org.eclipse.emf.common.util.URI;
-
import org.eclipse.emf.ecore.xmi.impl.XMIResourceImpl;
/**
* <!-- begin-user-doc -->
* The <b>Resource </b> associated with the package.
* <!-- end-user-doc -->
+ *
* @see org.eclipse.papyrus.infra.viewpoints.configuration.util.ConfigurationResourceFactoryImpl
* @generated
+ * @deprecated Use the {@link ConfigurationResourceCustomImpl} class, instead.
*/
+@Deprecated
public class ConfigurationResourceImpl extends XMIResourceImpl {
/**
* Creates an instance of the resource.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
- * @param uri the URI of the new resource.
+ *
+ * @param uri
+ * the URI of the new resource.
* @generated
*/
public ConfigurationResourceImpl(URI uri) {
super(uri);
}
-} //ConfigurationResourceImpl
+} // ConfigurationResourceImpl
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
index 99b9a82cd14..2e5d9ee1cc5 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src-gen/org/eclipse/papyrus/infra/viewpoints/configuration/util/ConfigurationSwitch.java
@@ -1,15 +1,16 @@
/**
- * Copyright (c) 2013 CEA LIST.
- *
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
- *
- *
+ * Christian W. Damus - bug 463156
+ *
+ *
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.util;
@@ -84,116 +85,196 @@ public class ConfigurationSwitch<T> extends Switch<T> {
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
- case ConfigurationPackage.PAPYRUS_CONFIGURATION: {
- PapyrusConfiguration papyrusConfiguration = (PapyrusConfiguration)theEObject;
- T result = casePapyrusConfiguration(papyrusConfiguration);
- if (result == null) result = caseArchitectureFramework(papyrusConfiguration);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PAPYRUS_VIEWPOINT: {
- PapyrusViewpoint papyrusViewpoint = (PapyrusViewpoint)theEObject;
- T result = casePapyrusViewpoint(papyrusViewpoint);
- if (result == null) result = caseArchitectureViewpoint(papyrusViewpoint);
- if (result == null) result = caseADElement(papyrusViewpoint);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PAPYRUS_VIEW: {
- PapyrusView papyrusView = (PapyrusView)theEObject;
- T result = casePapyrusView(papyrusView);
- if (result == null) result = caseModelKind(papyrusView);
- if (result == null) result = caseADElement(papyrusView);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PAPYRUS_DIAGRAM: {
- PapyrusDiagram papyrusDiagram = (PapyrusDiagram)theEObject;
- T result = casePapyrusDiagram(papyrusDiagram);
- if (result == null) result = casePapyrusView(papyrusDiagram);
- if (result == null) result = caseModelKind(papyrusDiagram);
- if (result == null) result = caseADElement(papyrusDiagram);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PAPYRUS_SYNC_TABLE: {
- PapyrusSyncTable papyrusSyncTable = (PapyrusSyncTable)theEObject;
- T result = casePapyrusSyncTable(papyrusSyncTable);
- if (result == null) result = casePapyrusView(papyrusSyncTable);
- if (result == null) result = caseModelKind(papyrusSyncTable);
- if (result == null) result = caseADElement(papyrusSyncTable);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PAPYRUS_TABLE: {
- PapyrusTable papyrusTable = (PapyrusTable)theEObject;
- T result = casePapyrusTable(papyrusTable);
- if (result == null) result = casePapyrusView(papyrusTable);
- if (result == null) result = caseModelKind(papyrusTable);
- if (result == null) result = caseADElement(papyrusTable);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.RULE: {
- Rule rule = (Rule)theEObject;
- T result = caseRule(rule);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.MODEL_RULE: {
- ModelRule modelRule = (ModelRule)theEObject;
- T result = caseModelRule(modelRule);
- if (result == null) result = caseRule(modelRule);
- if (result == null) result = caseDisplayUnit(modelRule);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.OWNING_RULE: {
- OwningRule owningRule = (OwningRule)theEObject;
- T result = caseOwningRule(owningRule);
- if (result == null) result = caseRule(owningRule);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.CHILD_RULE: {
- ChildRule childRule = (ChildRule)theEObject;
- T result = caseChildRule(childRule);
- if (result == null) result = caseRule(childRule);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PALETTE_RULE: {
- PaletteRule paletteRule = (PaletteRule)theEObject;
- T result = casePaletteRule(paletteRule);
- if (result == null) result = caseRule(paletteRule);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.PATH_ELEMENT: {
- PathElement pathElement = (PathElement)theEObject;
- T result = casePathElement(pathElement);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.CATEGORY: {
- Category category = (Category)theEObject;
- T result = caseCategory(category);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.MODEL_AUTO_CREATE: {
- ModelAutoCreate modelAutoCreate = (ModelAutoCreate)theEObject;
- T result = caseModelAutoCreate(modelAutoCreate);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- case ConfigurationPackage.ROOT_AUTO_SELECT: {
- RootAutoSelect rootAutoSelect = (RootAutoSelect)theEObject;
- T result = caseRootAutoSelect(rootAutoSelect);
- if (result == null) result = defaultCase(theEObject);
- return result;
- }
- default: return defaultCase(theEObject);
+ case ConfigurationPackage.PAPYRUS_CONFIGURATION: {
+ PapyrusConfiguration papyrusConfiguration = (PapyrusConfiguration) theEObject;
+ T result = casePapyrusConfiguration(papyrusConfiguration);
+ if (result == null) {
+ result = caseArchitectureFramework(papyrusConfiguration);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_VIEWPOINT: {
+ PapyrusViewpoint papyrusViewpoint = (PapyrusViewpoint) theEObject;
+ T result = casePapyrusViewpoint(papyrusViewpoint);
+ if (result == null) {
+ result = caseArchitectureViewpoint(papyrusViewpoint);
+ }
+ if (result == null) {
+ result = caseADElement(papyrusViewpoint);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_VIEW: {
+ PapyrusView papyrusView = (PapyrusView) theEObject;
+ T result = casePapyrusView(papyrusView);
+ if (result == null) {
+ result = caseModelKind(papyrusView);
+ }
+ if (result == null) {
+ result = caseADElement(papyrusView);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_DIAGRAM: {
+ PapyrusDiagram papyrusDiagram = (PapyrusDiagram) theEObject;
+ T result = casePapyrusDiagram(papyrusDiagram);
+ if (result == null) {
+ result = casePapyrusView(papyrusDiagram);
+ }
+ if (result == null) {
+ result = caseModelKind(papyrusDiagram);
+ }
+ if (result == null) {
+ result = caseADElement(papyrusDiagram);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_SYNC_TABLE: {
+ PapyrusSyncTable papyrusSyncTable = (PapyrusSyncTable) theEObject;
+ T result = casePapyrusSyncTable(papyrusSyncTable);
+ if (result == null) {
+ result = casePapyrusView(papyrusSyncTable);
+ }
+ if (result == null) {
+ result = caseModelKind(papyrusSyncTable);
+ }
+ if (result == null) {
+ result = caseADElement(papyrusSyncTable);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PAPYRUS_TABLE: {
+ PapyrusTable papyrusTable = (PapyrusTable) theEObject;
+ T result = casePapyrusTable(papyrusTable);
+ if (result == null) {
+ result = casePapyrusView(papyrusTable);
+ }
+ if (result == null) {
+ result = caseModelKind(papyrusTable);
+ }
+ if (result == null) {
+ result = caseADElement(papyrusTable);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.RULE: {
+ Rule rule = (Rule) theEObject;
+ T result = caseRule(rule);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.MODEL_RULE: {
+ ModelRule modelRule = (ModelRule) theEObject;
+ T result = caseModelRule(modelRule);
+ if (result == null) {
+ result = caseRule(modelRule);
+ }
+ if (result == null) {
+ result = caseDisplayUnit(modelRule);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.OWNING_RULE: {
+ OwningRule owningRule = (OwningRule) theEObject;
+ T result = caseOwningRule(owningRule);
+ if (result == null) {
+ result = caseRule(owningRule);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.CHILD_RULE: {
+ ChildRule childRule = (ChildRule) theEObject;
+ T result = caseChildRule(childRule);
+ if (result == null) {
+ result = caseRule(childRule);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PALETTE_RULE: {
+ PaletteRule paletteRule = (PaletteRule) theEObject;
+ T result = casePaletteRule(paletteRule);
+ if (result == null) {
+ result = caseRule(paletteRule);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.PATH_ELEMENT: {
+ PathElement pathElement = (PathElement) theEObject;
+ T result = casePathElement(pathElement);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.CATEGORY: {
+ Category category = (Category) theEObject;
+ T result = caseCategory(category);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.MODEL_AUTO_CREATE: {
+ ModelAutoCreate modelAutoCreate = (ModelAutoCreate) theEObject;
+ T result = caseModelAutoCreate(modelAutoCreate);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.ROOT_AUTO_SELECT: {
+ RootAutoSelect rootAutoSelect = (RootAutoSelect) theEObject;
+ T result = caseRootAutoSelect(rootAutoSelect);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ case ConfigurationPackage.ASSISTANT_RULE: {
+ AssistantRule assistantRule = (AssistantRule) theEObject;
+ T result = caseAssistantRule(assistantRule);
+ if (result == null) {
+ result = caseRule(assistantRule);
+ }
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
}
}
@@ -423,6 +504,21 @@ public class ConfigurationSwitch<T> extends Switch<T> {
}
/**
+ * Returns the result of interpreting the object as an instance of '<em>Assistant Rule</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>Assistant Rule</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseAssistantRule(AssistantRule object) {
+ return null;
+ }
+
+ /**
* Returns the result of interpreting the object as an instance of '<em>Architecture Framework</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java
index afeb2f9efd7..fdf602e8008 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/Activator.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,37 +9,71 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.configuration;
-import org.osgi.framework.BundleActivator;
-import org.osgi.framework.BundleContext;
+import org.eclipse.emf.common.EMFPlugin;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
-public class Activator implements BundleActivator {
+public class Activator extends EMFPlugin {
+ /**
+ * Keep track of the singleton.
+ */
+ public static final Activator INSTANCE = new Activator();
+
+ /** Logging helper */
+ public static LogHelper log = new LogHelper();
- private static BundleContext context;
+ /**
+ * Keep track of the singleton.
+ */
+ private static Implementation plugin;
- static BundleContext getContext() {
- return context;
+ /**
+ * Create the instance.
+ */
+ public Activator() {
+ super(new ResourceLocator[] {});
}
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
*/
- public void start(BundleContext bundleContext) throws Exception {
- Activator.context = bundleContext;
+ @Override
+ public ResourceLocator getPluginResourceLocator() {
+ return plugin;
}
- /*
- * (non-Javadoc)
- *
- * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+ /**
+ * Returns the singleton instance of the Eclipse plugin.
+ *
+ * @return the singleton instance.
*/
- public void stop(BundleContext bundleContext) throws Exception {
- Activator.context = null;
+ public static Implementation getPlugin() {
+ return plugin;
}
+ /**
+ * The actual implementation of the Eclipse <b>Plugin</b>.
+ */
+ public static class Implementation extends EclipsePlugin {
+ /**
+ * Creates an instance.
+ */
+ public Implementation() {
+ super();
+
+ // Remember the static instance.
+ //
+ plugin = this;
+
+ // register the log helper
+ log.setPlugin(plugin);
+ }
+ }
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleCustomImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleCustomImpl.java
new file mode 100644
index 00000000000..c88993a04c7
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/AssistantRuleCustomImpl.java
@@ -0,0 +1,115 @@
+/*****************************************************************************
+ * Copyright (c) 2015 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
+
+import java.util.regex.Pattern;
+import java.util.regex.PatternSyntaxException;
+
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.viewpoints.configuration.Activator;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
+
+/**
+ * Implementation of derived features and operations for the {@link AssistantRule} model class.
+ */
+public class AssistantRuleCustomImpl extends AssistantRuleImpl {
+
+ // A pattern that cannot match any string
+ private static final Pattern IMPOSSIBLE_PATTERN = Pattern.compile("^(?<=x)$"); //$NON-NLS-1$
+
+ // A pattern that matches any string
+ private static final Pattern WILDCARD_PATTERN = Pattern.compile(".*"); //$NON-NLS-1$
+
+ private Pattern elementTypeIDPattern;
+
+ protected AssistantRuleCustomImpl() {
+ super();
+ }
+
+ @Override
+ public boolean matches(IElementType elementType) {
+ String actualID = elementType.getId();
+ return (actualID != null) && getElementTypeIDPattern().matcher(actualID).matches();
+ }
+
+ Pattern getElementTypeIDPattern() {
+ if (elementTypeIDPattern == null) {
+ try {
+ String elementTypeID = getElementTypeID();
+ elementTypeIDPattern = (elementTypeID == null) ? WILDCARD_PATTERN : Pattern.compile(asRegex(elementTypeID));
+ } catch (PatternSyntaxException e) {
+ Activator.INSTANCE.log(e);
+ elementTypeIDPattern = IMPOSSIBLE_PATTERN;
+ }
+ }
+
+ return elementTypeIDPattern;
+ }
+
+ @Override
+ public void setElementTypeID(String newElementTypeID) {
+ // Forget the regex, to recompute it when next needed
+ elementTypeIDPattern = null;
+ super.setElementTypeID(newElementTypeID);
+ }
+
+ static String asRegex(String elementTypeIDPattern) {
+ StringBuilder result = new StringBuilder(elementTypeIDPattern);
+
+ for (int i = 0; i < result.length(); i++) {
+ char ch = result.charAt(i);
+ switch (ch) {
+ case '.':
+ case '?':
+ case '[':
+ case ']':
+ case '(':
+ case ')':
+ case '{':
+ case '}':
+ case '^':
+ case '$':
+ if (!escaped(result, i)) {
+ result.insert(i, '\\');
+ i++;
+ }
+ break;
+ case '*':
+ if (!escaped(result, i)) {
+ result.insert(i, '.');
+ i++;
+ }
+ break;
+ }
+ }
+
+ return result.toString();
+ }
+
+ /**
+ * Is the character at an {@code offset} of a sequence escaped?
+ */
+ private static boolean escaped(CharSequence chars, int offset) {
+ boolean result = (offset > 0) && (chars.charAt(offset - 1) == '\\');
+
+ if (result) {
+ // make sure the escape character isn't, itself, escaped
+ for (int i = offset - 2; (i >= 0) && (chars.charAt(i) == '\\'); i--) {
+ result = !result;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryCustomImpl.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryCustomImpl.java
index fb90c878b38..a3de46c9ba0 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryCustomImpl.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration/src/org/eclipse/papyrus/infra/viewpoints/configuration/impl/ConfigurationFactoryCustomImpl.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2015 CEA LIST.
+ * Copyright (c) 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,12 +8,14 @@
*
* Contributors:
* Benoit Maggi benoit.maggi@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 463156
*
*/
package org.eclipse.papyrus.infra.viewpoints.configuration.impl;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationFactory;
import org.eclipse.papyrus.infra.viewpoints.configuration.ConfigurationPackage;
import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
@@ -24,12 +26,11 @@ public class ConfigurationFactoryCustomImpl extends ConfigurationFactoryImpl imp
public static ConfigurationFactory init() {
try {
- ConfigurationFactory theConfigurationFactory = (ConfigurationFactory)EPackage.Registry.INSTANCE.getEFactory(ConfigurationPackage.eNS_URI);
+ ConfigurationFactory theConfigurationFactory = (ConfigurationFactory) EPackage.Registry.INSTANCE.getEFactory(ConfigurationPackage.eNS_URI);
if (theConfigurationFactory != null) {
return theConfigurationFactory;
}
- }
- catch (Exception exception) {
+ } catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new ConfigurationFactoryImpl();
@@ -39,6 +40,7 @@ public class ConfigurationFactoryCustomImpl extends ConfigurationFactoryImpl imp
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
+ *
* @generated
*/
public ConfigurationFactoryCustomImpl() {
@@ -56,6 +58,10 @@ public class ConfigurationFactoryCustomImpl extends ConfigurationFactoryImpl imp
PathElementImpl pathElement = new PathElementCustomImpl();
return pathElement;
}
-
-}
+ @Override
+ public AssistantRule createAssistantRule() {
+ AssistantRuleImpl assistantRule = new AssistantRuleCustomImpl();
+ return assistantRule;
+ }
+}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
index ea0c50a8dd7..b6f5db99843 100644
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/PolicyChecker.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
+ * Copyright (c) 2013, 2015 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -10,6 +10,7 @@
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus - bug 463156
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.policy;
@@ -17,7 +18,6 @@ package org.eclipse.papyrus.infra.viewpoints.policy;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -36,10 +36,12 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.papyrus.infra.core.pluginexplorer.Plugin;
import org.eclipse.papyrus.infra.core.pluginexplorer.PluginEntry;
+import org.eclipse.papyrus.infra.viewpoints.configuration.AssistantRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ChildRule;
import org.eclipse.papyrus.infra.viewpoints.configuration.ModelAutoCreate;
import org.eclipse.papyrus.infra.viewpoints.configuration.ModelRule;
@@ -49,7 +51,6 @@ import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusConfiguration;
import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusDiagram;
import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusView;
import org.eclipse.papyrus.infra.viewpoints.configuration.PapyrusViewpoint;
-import org.eclipse.papyrus.infra.viewpoints.configuration.RootAutoSelect;
import org.eclipse.papyrus.infra.viewpoints.iso42010.ArchitectureViewpoint;
import org.eclipse.papyrus.infra.viewpoints.iso42010.ModelKind;
import org.eclipse.papyrus.infra.viewpoints.iso42010.Stakeholder;
@@ -140,9 +141,9 @@ public class PolicyChecker {
}
Resource res = CONFIGURATIONS_RESOURCE_SET.getResource(uri, true);
EList<EObject> contents = res.getContents();
- if (contents.size() >0){
+ if (contents.size() > 0) {
config = (PapyrusConfiguration) contents.get(0);
- CONFIGURATIONS_CACHE.put(location, config);
+ CONFIGURATIONS_CACHE.put(location, config);
}
return config;
}
@@ -582,6 +583,35 @@ public class PolicyChecker {
}
/**
+ * Determines whether the given diagram can have a modeling assistant creating the specified element type.
+ *
+ * @param diagram
+ * The diagram
+ * @param elementType
+ * A modeling assistant element type
+ * @return whether the modeling assistant is allowed
+ */
+ public boolean isInModelingAssistants(Diagram diagram, IElementType elementType) {
+ ViewPrototype prototype = ViewPrototype.get(diagram);
+ if (prototype == null) {
+ // This diagram is not in the current policy
+ return false;
+ }
+
+ PapyrusDiagram config = (PapyrusDiagram) prototype.configuration;
+ while (config != null) {
+ for (AssistantRule rule : config.getAssistantRules()) {
+ int result = allows(rule, elementType);
+ if (result != RESULT_UNKNOWN) {
+ return (result == RESULT_PERMIT);
+ }
+ }
+ config = (PapyrusDiagram) config.getParent();
+ }
+ return DEFAULT_POLICY_UNKNWON_PALETTE;
+ }
+
+ /**
* Determines whether the given view configuration element is part of the current viewpoint
*
* @param config
@@ -648,7 +678,7 @@ public class PolicyChecker {
if (rule.getNewModelPath() != null && !rule.getNewModelPath().isEmpty()) {
// Auto-created root => always OK
result.add(proto);
- } else if (rule.getSelectDiagramRoot() != null && !rule.getSelectDiagramRoot().isEmpty()){
+ } else if (rule.getSelectDiagramRoot() != null && !rule.getSelectDiagramRoot().isEmpty()) {
result.add(proto);
} else {
// We have to check if the owner can also be a root
@@ -1029,4 +1059,19 @@ public class PolicyChecker {
}
return RESULT_UNKNOWN;
}
+
+ /**
+ * Checks a modeling assistant element against a rule.
+ *
+ * @param rule
+ * The assistant rule
+ * @param elementType
+ * The modeling assistant element type
+ * @return The check result
+ */
+ private int allows(AssistantRule rule, IElementType elementType) {
+ return rule.matches(elementType)
+ ? (rule.isPermit() ? RESULT_PERMIT : RESULT_DENY)
+ : RESULT_UNKNOWN;
+ }
}

Back to the top