Browse Source

Added mapping metamodel and generated code.

master
Arnaud Dieumegard 6 years ago
parent
commit
a85ade0b42
  1. 5
      eclipse/plugins/com.irtsaintexupery.pseim.edit/META-INF/MANIFEST.MF
  2. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_cardinalityValues_CardinalityValue.gif
  3. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_modelElement_GraphElementMapping.gif
  4. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_multiplicityValueSet_CardinalityValueSetting.gif
  5. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_portMapping_PortMapping.gif
  6. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/CardinalityValue.gif
  7. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/CardinalityValueSetting.gif
  8. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/GraphElementMapping.gif
  9. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/PatternApplication.gif
  10. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/PortMapping.gif
  11. 19
      eclipse/plugins/com.irtsaintexupery.pseim.edit/plugin.properties
  12. 13
      eclipse/plugins/com.irtsaintexupery.pseim.edit/plugin.xml
  13. 179
      eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/CardinalityValueItemProvider.java
  14. 169
      eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/GraphElementMappingItemProvider.java
  15. 95
      eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/MappingEditPlugin.java
  16. 271
      eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/MappingItemProviderAdapterFactory.java
  17. 229
      eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/PatternApplicationItemProvider.java
  18. 169
      eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/PortMappingItemProvider.java
  19. 25
      eclipse/plugins/com.irtsaintexupery.pseim.editor/META-INF/MANIFEST.MF
  20. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.editor/icons/full/obj16/MappingModelFile.gif
  21. BIN
      eclipse/plugins/com.irtsaintexupery.pseim.editor/icons/full/wizban/NewMapping.gif
  22. 7
      eclipse/plugins/com.irtsaintexupery.pseim.editor/plugin.properties
  23. 75
      eclipse/plugins/com.irtsaintexupery.pseim.editor/plugin.xml
  24. 423
      eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingActionBarContributor.java
  25. 1826
      eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingEditor.java
  26. 97
      eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingEditorPlugin.java
  27. 627
      eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingModelWizard.java
  28. 5
      eclipse/plugins/com.irtsaintexupery.pseim/META-INF/MANIFEST.MF
  29. 48
      eclipse/plugins/com.irtsaintexupery.pseim/model/mapping.ecore
  30. 32
      eclipse/plugins/com.irtsaintexupery.pseim/model/mapping.genmodel
  31. 4
      eclipse/plugins/com.irtsaintexupery.pseim/model/pseim.ecore
  32. 2
      eclipse/plugins/com.irtsaintexupery.pseim/model/pseim.genmodel
  33. 2
      eclipse/plugins/com.irtsaintexupery.pseim/model/seim.aird
  34. 2
      eclipse/plugins/com.irtsaintexupery.pseim/model/seim.ecore
  35. 8
      eclipse/plugins/com.irtsaintexupery.pseim/plugin.xml
  36. 79
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/CardinalityValue.java
  37. 79
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/CardinalityValueSetting.java
  38. 70
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/GraphElementMapping.java
  39. 69
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/MappingFactory.java
  40. 587
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/MappingPackage.java
  41. 135
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/PatternApplication.java
  42. 70
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/PortMapping.java
  43. 226
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/CardinalityValueImpl.java
  44. 196
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/GraphElementMappingImpl.java
  45. 128
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/MappingFactoryImpl.java
  46. 440
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/MappingPackageImpl.java
  47. 352
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/PatternApplicationImpl.java
  48. 196
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/PortMappingImpl.java
  49. 174
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/util/MappingAdapterFactory.java
  50. 173
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/util/MappingSwitch.java
  51. 240
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/util/MappingValidator.java
  52. 2
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/pseim/PatternLink.java
  53. 4
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/pseim/impl/PseimPackageImpl.java
  54. 4
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/pseim/util/PseimValidator.java
  55. 2
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/seim/NamedElement.java
  56. 2
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/seim/impl/SeimPackageImpl.java
  57. 12
      eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/seim/util/SeimValidator.java

5
eclipse/plugins/com.irtsaintexupery.pseim.edit/META-INF/MANIFEST.MF

@ -4,12 +4,13 @@ Bundle-Name: %pluginName @@ -4,12 +4,13 @@ Bundle-Name: %pluginName
Bundle-SymbolicName: com.irtsaintexupery.pseim.edit;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: com.irtsaintexupery.pseim.pseim.provider.PseimEditPlugin$Implementation
Bundle-Activator: com.irtsaintexupery.pseim.seim.provider.SeimEditPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.irtsaintexupery.pseim.seim.provider,
com.irtsaintexupery.pseim.pseim.provider
com.irtsaintexupery.pseim.pseim.provider,
com.irtsaintexupery.pseim.mapping.provider
Require-Bundle: org.eclipse.core.runtime,
com.irtsaintexupery.pseim;visibility:=reexport,
org.eclipse.emf.edit;visibility:=reexport,

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_cardinalityValues_CardinalityValue.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_modelElement_GraphElementMapping.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_multiplicityValueSet_CardinalityValueSetting.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/ctool16/CreatePatternApplication_portMapping_PortMapping.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/CardinalityValue.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/CardinalityValueSetting.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/GraphElementMapping.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/PatternApplication.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.edit/icons/full/obj16/PortMapping.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 B

19
eclipse/plugins/com.irtsaintexupery.pseim.edit/plugin.properties

@ -111,3 +111,22 @@ _UI_LinkType_FORKP_literal = FORKP @@ -111,3 +111,22 @@ _UI_LinkType_FORKP_literal = FORKP
_UI_LinkType_SHIFTP_literal = SHIFTP
_UI_LinkType_FLATTENC_literal = FLATTENC
_UI_LinkType_LAST_literal = LAST
_UI_PatternApplication_type = Pattern Application
_UI_CardinalityValueSetting_type = Cardinality Value Setting
_UI_PortMapping_type = Port Mapping
_UI_GraphElementMapping_type = Graph Element Mapping
_UI_PatternApplication_multiplicityValueSet_feature = Multiplicity Value Set
_UI_PatternApplication_portMapping_feature = Port Mapping
_UI_PatternApplication_pattern_feature = Pattern
_UI_PatternApplication_modelElement_feature = Model Element
_UI_PatternApplication_model_feature = Model
_UI_CardinalityValueSetting_cardinalityElement_feature = Cardinality Element
_UI_CardinalityValueSetting_value_feature = Value
_UI_PortMapping_modelPort_feature = Model Port
_UI_PortMapping_patternPort_feature = Pattern Port
_UI_GraphElementMapping_modelGraphElement_feature = Model Graph Element
_UI_GraphElementMapping_patternGraphElement_feature = Pattern Graph Element
_UI_CardinalityValue_type = Cardinality Value
_UI_PatternApplication_cardinalityValues_feature = Cardinality Values
_UI_CardinalityValue_cardinalityElement_feature = Cardinality Element
_UI_CardinalityValue_value_feature = Value

13
eclipse/plugins/com.irtsaintexupery.pseim.edit/plugin.xml

@ -32,4 +32,17 @@ @@ -32,4 +32,17 @@
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
<extension point="org.eclipse.emf.edit.itemProviderAdapterFactories">
<!-- @generated mapping -->
<factory
uri="http://www.irit.fr/patterns/mapping/0.1"
class="com.irtsaintexupery.pseim.mapping.provider.MappingItemProviderAdapterFactory"
supportedTypes=
"org.eclipse.emf.edit.provider.IEditingDomainItemProvider
org.eclipse.emf.edit.provider.IStructuredItemContentProvider
org.eclipse.emf.edit.provider.ITreeItemContentProvider
org.eclipse.emf.edit.provider.IItemLabelProvider
org.eclipse.emf.edit.provider.IItemPropertySource"/>
</extension>
</plugin>

179
eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/CardinalityValueItemProvider.java

@ -0,0 +1,179 @@ @@ -0,0 +1,179 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.provider;
import com.irtsaintexupery.pseim.mapping.CardinalityValue;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
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.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.mapping.CardinalityValue} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class CardinalityValueItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityValueItemProvider(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);
addCardinalityElementPropertyDescriptor(object);
addValuePropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Cardinality Element feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addCardinalityElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CardinalityValue_cardinalityElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CardinalityValue_cardinalityElement_feature", "_UI_CardinalityValue_type"),
MappingPackage.Literals.CARDINALITY_VALUE__CARDINALITY_ELEMENT,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Value feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addValuePropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_CardinalityValue_value_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_CardinalityValue_value_feature", "_UI_CardinalityValue_type"),
MappingPackage.Literals.CARDINALITY_VALUE__VALUE,
true,
false,
false,
ItemPropertyDescriptor.INTEGRAL_VALUE_IMAGE,
null,
null));
}
/**
* This returns CardinalityValue.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/CardinalityValue"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
CardinalityValue cardinalityValue = (CardinalityValue)object;
return getString("_UI_CardinalityValue_type") + " " + cardinalityValue.getValue();
}
/**
* 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(CardinalityValue.class)) {
case MappingPackage.CARDINALITY_VALUE__VALUE:
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);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return MappingEditPlugin.INSTANCE;
}
}

169
eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/GraphElementMappingItemProvider.java

@ -0,0 +1,169 @@ @@ -0,0 +1,169 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.provider;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
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.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.mapping.GraphElementMapping} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class GraphElementMappingItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GraphElementMappingItemProvider(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);
addModelGraphElementPropertyDescriptor(object);
addPatternGraphElementPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Model Graph Element feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addModelGraphElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GraphElementMapping_modelGraphElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GraphElementMapping_modelGraphElement_feature", "_UI_GraphElementMapping_type"),
MappingPackage.Literals.GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Pattern Graph Element feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addPatternGraphElementPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_GraphElementMapping_patternGraphElement_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_GraphElementMapping_patternGraphElement_feature", "_UI_GraphElementMapping_type"),
MappingPackage.Literals.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT,
true,
false,
true,
null,
null,
null));
}
/**
* This returns GraphElementMapping.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/GraphElementMapping"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
return getString("_UI_GraphElementMapping_type");
}
/**
* 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);
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);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return MappingEditPlugin.INSTANCE;
}
}

95
eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/MappingEditPlugin.java

@ -0,0 +1,95 @@ @@ -0,0 +1,95 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.provider;
import com.irtsaintexupery.pseim.pseim.provider.PseimEditPlugin;
import com.irtsaintexupery.pseim.seim.provider.SeimEditPlugin;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
/**
* This is the central singleton for the Mapping edit plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public final class MappingEditPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final MappingEditPlugin INSTANCE = new MappingEditPlugin();
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static Implementation plugin;
/**
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingEditPlugin() {
super
(new ResourceLocator [] {
PseimEditPlugin.INSTANCE,
SeimEditPlugin.INSTANCE,
});
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
@Override
public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
public static Implementation getPlugin() {
return plugin;
}
/**
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static class Implementation extends EclipsePlugin {
/**
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Implementation() {
super();
// Remember the static instance.
//
plugin = this;
}
}
}

271
eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/MappingItemProviderAdapterFactory.java

@ -0,0 +1,271 @@ @@ -0,0 +1,271 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.provider;
import com.irtsaintexupery.pseim.mapping.util.MappingAdapterFactory;
import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.edit.provider.ChangeNotifier;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
import org.eclipse.emf.edit.provider.IChangeNotifier;
import org.eclipse.emf.edit.provider.IDisposable;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.INotifyChangedListener;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
/**
* This is the factory that is used to provide the interfaces needed to support Viewers.
* The adapters generated by this factory convert EMF adapter notifications into calls to {@link #fireNotifyChanged fireNotifyChanged}.
* The adapters also support Eclipse property sheets.
* Note that most of the adapters are shared among multiple instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MappingItemProviderAdapterFactory extends MappingAdapterFactory implements ComposeableAdapterFactory, IChangeNotifier, IDisposable {
/**
* This keeps track of the root adapter factory that delegates to this adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ComposedAdapterFactory parentAdapterFactory;
/**
* This is used to implement {@link org.eclipse.emf.edit.provider.IChangeNotifier}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IChangeNotifier changeNotifier = new ChangeNotifier();
/**
* This keeps track of all the supported types checked by {@link #isFactoryForType isFactoryForType}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<Object> supportedTypes = new ArrayList<Object>();
/**
* This constructs an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingItemProviderAdapterFactory() {
supportedTypes.add(IEditingDomainItemProvider.class);
supportedTypes.add(IStructuredItemContentProvider.class);
supportedTypes.add(ITreeItemContentProvider.class);
supportedTypes.add(IItemLabelProvider.class);
supportedTypes.add(IItemPropertySource.class);
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.mapping.PatternApplication} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PatternApplicationItemProvider patternApplicationItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.pseim.mapping.PatternApplication}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createPatternApplicationAdapter() {
if (patternApplicationItemProvider == null) {
patternApplicationItemProvider = new PatternApplicationItemProvider(this);
}
return patternApplicationItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.mapping.CardinalityValue} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CardinalityValueItemProvider cardinalityValueItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.pseim.mapping.CardinalityValue}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createCardinalityValueAdapter() {
if (cardinalityValueItemProvider == null) {
cardinalityValueItemProvider = new CardinalityValueItemProvider(this);
}
return cardinalityValueItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.mapping.PortMapping} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PortMappingItemProvider portMappingItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.pseim.mapping.PortMapping}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createPortMappingAdapter() {
if (portMappingItemProvider == null) {
portMappingItemProvider = new PortMappingItemProvider(this);
}
return portMappingItemProvider;
}
/**
* This keeps track of the one adapter used for all {@link com.irtsaintexupery.pseim.mapping.GraphElementMapping} instances.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected GraphElementMappingItemProvider graphElementMappingItemProvider;
/**
* This creates an adapter for a {@link com.irtsaintexupery.pseim.mapping.GraphElementMapping}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter createGraphElementMappingAdapter() {
if (graphElementMappingItemProvider == null) {
graphElementMappingItemProvider = new GraphElementMappingItemProvider(this);
}
return graphElementMappingItemProvider;
}
/**
* This returns the root adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public ComposeableAdapterFactory getRootAdapterFactory() {
return parentAdapterFactory == null ? this : parentAdapterFactory.getRootAdapterFactory();
}
/**
* This sets the composed adapter factory that contains this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setParentAdapterFactory(ComposedAdapterFactory parentAdapterFactory) {
this.parentAdapterFactory = parentAdapterFactory;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean isFactoryForType(Object type) {
return supportedTypes.contains(type) || super.isFactoryForType(type);
}
/**
* This implementation substitutes the factory itself as the key for the adapter.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Adapter adapt(Notifier notifier, Object type) {
return super.adapt(notifier, this);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object adapt(Object object, Object type) {
if (isFactoryForType(type)) {
Object adapter = super.adapt(object, type);
if (!(type instanceof Class<?>) || (((Class<?>)type).isInstance(adapter))) {
return adapter;
}
}
return null;
}
/**
* This adds a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void addListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.addListener(notifyChangedListener);
}
/**
* This removes a listener.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void removeListener(INotifyChangedListener notifyChangedListener) {
changeNotifier.removeListener(notifyChangedListener);
}
/**
* This delegates to {@link #changeNotifier} and to {@link #parentAdapterFactory}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void fireNotifyChanged(Notification notification) {
changeNotifier.fireNotifyChanged(notification);
if (parentAdapterFactory != null) {
parentAdapterFactory.fireNotifyChanged(notification);
}
}
/**
* This disposes all of the item providers created by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void dispose() {
if (patternApplicationItemProvider != null) patternApplicationItemProvider.dispose();
if (cardinalityValueItemProvider != null) cardinalityValueItemProvider.dispose();
if (portMappingItemProvider != null) portMappingItemProvider.dispose();
if (graphElementMappingItemProvider != null) graphElementMappingItemProvider.dispose();
}
}

229
eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/PatternApplicationItemProvider.java

@ -0,0 +1,229 @@ @@ -0,0 +1,229 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.provider;
import com.irtsaintexupery.pseim.mapping.MappingFactory;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.PatternApplication;
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.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.mapping.PatternApplication} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class PatternApplicationItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternApplicationItemProvider(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);
addPatternPropertyDescriptor(object);
addModelPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Pattern feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addPatternPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PatternApplication_pattern_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PatternApplication_pattern_feature", "_UI_PatternApplication_type"),
MappingPackage.Literals.PATTERN_APPLICATION__PATTERN,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Model feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addModelPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PatternApplication_model_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PatternApplication_model_feature", "_UI_PatternApplication_type"),
MappingPackage.Literals.PATTERN_APPLICATION__MODEL,
true,
false,
true,
null,
null,
null));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(MappingPackage.Literals.PATTERN_APPLICATION__CARDINALITY_VALUES);
childrenFeatures.add(MappingPackage.Literals.PATTERN_APPLICATION__PORT_MAPPING);
childrenFeatures.add(MappingPackage.Literals.PATTERN_APPLICATION__MODEL_ELEMENT);
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns PatternApplication.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/PatternApplication"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
return getString("_UI_PatternApplication_type");
}
/**
* 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(PatternApplication.class)) {
case MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES:
case MappingPackage.PATTERN_APPLICATION__PORT_MAPPING:
case MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
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);
newChildDescriptors.add
(createChildParameter
(MappingPackage.Literals.PATTERN_APPLICATION__CARDINALITY_VALUES,
MappingFactory.eINSTANCE.createCardinalityValue()));
newChildDescriptors.add
(createChildParameter
(MappingPackage.Literals.PATTERN_APPLICATION__PORT_MAPPING,
MappingFactory.eINSTANCE.createPortMapping()));
newChildDescriptors.add
(createChildParameter
(MappingPackage.Literals.PATTERN_APPLICATION__MODEL_ELEMENT,
MappingFactory.eINSTANCE.createGraphElementMapping()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return MappingEditPlugin.INSTANCE;
}
}

169
eclipse/plugins/com.irtsaintexupery.pseim.edit/src-gen/com/irtsaintexupery/pseim/mapping/provider/PortMappingItemProvider.java

@ -0,0 +1,169 @@ @@ -0,0 +1,169 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.provider;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
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.common.util.ResourceLocator;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
/**
* This is the item provider adapter for a {@link com.irtsaintexupery.pseim.mapping.PortMapping} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class PortMappingItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PortMappingItemProvider(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);
addModelPortPropertyDescriptor(object);
addPatternPortPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Model Port feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addModelPortPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PortMapping_modelPort_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PortMapping_modelPort_feature", "_UI_PortMapping_type"),
MappingPackage.Literals.PORT_MAPPING__MODEL_PORT,
true,
false,
true,
null,
null,
null));
}
/**
* This adds a property descriptor for the Pattern Port feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addPatternPortPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_PortMapping_patternPort_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_PortMapping_patternPort_feature", "_UI_PortMapping_type"),
MappingPackage.Literals.PORT_MAPPING__PATTERN_PORT,
true,
false,
true,
null,
null,
null));
}
/**
* This returns PortMapping.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/PortMapping"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
return getString("_UI_PortMapping_type");
}
/**
* 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);
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);
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return MappingEditPlugin.INSTANCE;
}
}

25
eclipse/plugins/com.irtsaintexupery.pseim.editor/META-INF/MANIFEST.MF

@ -1,19 +1,22 @@ @@ -1,19 +1,22 @@
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: com.irtsaintexupery.pseim.editor;singleton:=true
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Activator: com.irtsaintexupery.pseim.pseim.presentation.PseimEditorPlugin$Implementation
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Export-Package: com.irtsaintexupery.pseim.seim.presentation,
com.irtsaintexupery.pseim.pseim.presentation
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.core.resources;visibility:=reexport,
com.irtsaintexupery.pseim.edit;visibility:=reexport,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.emf.edit.ui;visibility:=reexport,
org.eclipse.ui.ide;visibility:=reexport
org.eclipse.ui.ide;visibility:=reexport,
org.eclipse.emfforms.editor;bundle-version="1.8.0"
Bundle-ManifestVersion: 2
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-ActivationPolicy: lazy
Bundle-Vendor: %providerName
Export-Package: com.irtsaintexupery.pseim.seim.presentation,
com.irtsaintexupery.pseim.pseim.presentation,
com.irtsaintexupery.pseim.mapping.presentation
Bundle-Name: %pluginName
Bundle-Version: 1.0.0.qualifier
Bundle-ClassPath: .
Bundle-Localization: plugin
Bundle-Activator: com.irtsaintexupery.pseim.seim.presentation.SeimEditorPlugin$Implementation

BIN
eclipse/plugins/com.irtsaintexupery.pseim.editor/icons/full/obj16/MappingModelFile.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 346 B

BIN
eclipse/plugins/com.irtsaintexupery.pseim.editor/icons/full/wizban/NewMapping.gif

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

7
eclipse/plugins/com.irtsaintexupery.pseim.editor/plugin.properties

@ -58,3 +58,10 @@ _UI_PseimModelWizard_description = Create a new Pseim model @@ -58,3 +58,10 @@ _UI_PseimModelWizard_description = Create a new Pseim model
_UI_PseimEditorFilenameDefaultBase = My
_UI_PseimEditorFilenameExtensions = pseim
_UI_MappingEditor_menu = &Mapping Editor
_UI_MappingModelWizard_label = Mapping Model
_UI_MappingModelWizard_description = Create a new Mapping model
_UI_MappingEditor_label = Mapping Model Editor
_UI_MappingEditorFilenameDefaultBase = My
_UI_MappingEditorFilenameExtensions = mapping

75
eclipse/plugins/com.irtsaintexupery.pseim.editor/plugin.xml

@ -1,64 +1,73 @@ @@ -1,64 +1,73 @@
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?eclipse version="3.0"?><!--
--><plugin>
<!--
-->
<plugin>
<extension point="org.eclipse.ui.newWizards">
<!-- @generated pseim -->
<category id="org.eclipse.emf.ecore.Wizard.category.ID" name="%_UI_Wizard_category"/>
<wizard category="org.eclipse.emf.ecore.Wizard.category.ID" class="com.irtsaintexupery.pseim.pseim.presentation.PseimModelWizard" icon="icons/full/obj16/PseimModelFile.gif" id="com.irtsaintexupery.pseim.pseim.presentation.PseimModelWizardID" name="%_UI_PseimModelWizard_label">
<description>%_UI_PseimModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
</extension>
<extension point="org.eclipse.ui.editors">
<!-- @generated pseim -->
<editor class="com.irtsaintexupery.pseim.pseim.presentation.PseimEditor" contributorClass="com.irtsaintexupery.pseim.pseim.presentation.PseimActionBarContributor" extensions="pseim" icon="icons/full/obj16/PseimModelFile.gif" id="com.irtsaintexupery.pseim.pseim.presentation.PseimEditorID" name="%_UI_PseimEditor_label">
</editor>
</extension>
<extension point="org.eclipse.ui.editors"><editor class="org.eclipse.emfforms.spi.editor.GenericEditor" default="false" extensions="mapping" icon="icons/full/obj16/MappingModelFile.gif" id="com.irtsaintexupery.pseim.editor.Mapping.emfformseditor" name="EMFForms Editor"/></extension>
<extension point="org.eclipse.ui.newWizards">
<!-- @generated seim -->
<!-- @generated mapping -->
<category
id="org.eclipse.emf.ecore.Wizard.category.ID"
name="%_UI_Wizard_category"/>
<wizard
id="com.irtsaintexupery.pseim.seim.presentation.SeimModelWizardID"
name="%_UI_SeimModelWizard_label"
class="com.irtsaintexupery.pseim.seim.presentation.SeimModelWizard"
id="com.irtsaintexupery.pseim.mapping.presentation.MappingModelWizardID"
name="%_UI_MappingModelWizard_label"
class="com.irtsaintexupery.pseim.mapping.presentation.MappingModelWizard"
category="org.eclipse.emf.ecore.Wizard.category.ID"
icon="icons/full/obj16/SeimModelFile.gif">
<description>%_UI_SeimModelWizard_description</description>
icon="icons/full/obj16/MappingModelFile.gif">
<description>%_UI_MappingModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
</extension>
<extension point="org.eclipse.ui.editors">
<!-- @generated seim -->
<!-- @generated mapping -->
<editor
id="com.irtsaintexupery.pseim.seim.presentation.SeimEditorID"
name="%_UI_SeimEditor_label"
icon="icons/full/obj16/SeimModelFile.gif"
extensions="seim"
class="com.irtsaintexupery.pseim.seim.presentation.SeimEditor"
contributorClass="com.irtsaintexupery.pseim.seim.presentation.SeimActionBarContributor">
id="com.irtsaintexupery.pseim.mapping.presentation.MappingEditorID"
name="%_UI_MappingEditor_label"
icon="icons/full/obj16/MappingModelFile.gif"
extensions="mapping"
class="com.irtsaintexupery.pseim.mapping.presentation.MappingEditor"
contributorClass="com.irtsaintexupery.pseim.mapping.presentation.MappingActionBarContributor">
</editor>
</extension>
<extension point="org.eclipse.ui.newWizards">
<!-- @generated pseim -->
<!-- @generated seim -->
<category
id="org.eclipse.emf.ecore.Wizard.category.ID"
name="%_UI_Wizard_category"/>
<wizard
id="com.irtsaintexupery.pseim.pseim.presentation.PseimModelWizardID"
name="%_UI_PseimModelWizard_label"
class="com.irtsaintexupery.pseim.pseim.presentation.PseimModelWizard"
id="com.irtsaintexupery.pseim.seim.presentation.SeimModelWizardID"
name="%_UI_SeimModelWizard_label"
class="com.irtsaintexupery.pseim.seim.presentation.SeimModelWizard"
category="org.eclipse.emf.ecore.Wizard.category.ID"
icon="icons/full/obj16/PseimModelFile.gif">
<description>%_UI_PseimModelWizard_description</description>
icon="icons/full/obj16/SeimModelFile.gif">
<description>%_UI_SeimModelWizard_description</description>
<selection class="org.eclipse.core.resources.IResource"/>
</wizard>
</extension>
<extension point="org.eclipse.ui.editors">
<!-- @generated pseim -->
<!-- @generated seim -->
<editor
id="com.irtsaintexupery.pseim.pseim.presentation.PseimEditorID"
name="%_UI_PseimEditor_label"
icon="icons/full/obj16/PseimModelFile.gif"
extensions="pseim"
class="com.irtsaintexupery.pseim.pseim.presentation.PseimEditor"
contributorClass="com.irtsaintexupery.pseim.pseim.presentation.PseimActionBarContributor">
id="com.irtsaintexupery.pseim.seim.presentation.SeimEditorID"
name="%_UI_SeimEditor_label"
icon="icons/full/obj16/SeimModelFile.gif"
extensions="seim"
class="com.irtsaintexupery.pseim.seim.presentation.SeimEditor"
contributorClass="com.irtsaintexupery.pseim.seim.presentation.SeimActionBarContributor">
</editor>
</extension>
</plugin>

423
eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingActionBarContributor.java

@ -0,0 +1,423 @@ @@ -0,0 +1,423 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.presentation;
import java.util.ArrayList;
import java.util.Collection;
import org.eclipse.emf.common.ui.viewer.IViewerProvider;
import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.edit.domain.IEditingDomainProvider;
import org.eclipse.emf.edit.ui.action.ControlAction;
import org.eclipse.emf.edit.ui.action.CreateChildAction;
import org.eclipse.emf.edit.ui.action.CreateSiblingAction;
import org.eclipse.emf.edit.ui.action.EditingDomainActionBarContributor;
import org.eclipse.emf.edit.ui.action.LoadResourceAction;
import org.eclipse.emf.edit.ui.action.ValidateAction;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IContributionManager;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.SubContributionItem;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.PartInitException;
/**
* This is the action bar contributor for the Mapping model editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MappingActionBarContributor
extends EditingDomainActionBarContributor
implements ISelectionChangedListener {
/**
* This keeps track of the active editor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IEditorPart activeEditorPart;
/**
* This keeps track of the current selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ISelectionProvider selectionProvider;
/**
* This action opens the Properties view.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IAction showPropertiesViewAction =
new Action(MappingEditorPlugin.INSTANCE.getString("_UI_ShowPropertiesView_menu_item")) {
@Override
public void run() {
try {
getPage().showView("org.eclipse.ui.views.PropertySheet");
}
catch (PartInitException exception) {
MappingEditorPlugin.INSTANCE.log(exception);
}
}
};
/**
* This action refreshes the viewer of the current editor if the editor
* implements {@link org.eclipse.emf.common.ui.viewer.IViewerProvider}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IAction refreshViewerAction =
new Action(MappingEditorPlugin.INSTANCE.getString("_UI_RefreshViewer_menu_item")) {
@Override
public boolean isEnabled() {
return activeEditorPart instanceof IViewerProvider;
}
@Override
public void run() {
if (activeEditorPart instanceof IViewerProvider) {
Viewer viewer = ((IViewerProvider)activeEditorPart).getViewer();
if (viewer != null) {
viewer.refresh();
}
}
}
};
/**
* This will contain one {@link org.eclipse.emf.edit.ui.action.CreateChildAction} corresponding to each descriptor
* generated for the current selection by the item provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<IAction> createChildActions;
/**
* This is the menu manager into which menu contribution items should be added for CreateChild actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IMenuManager createChildMenuManager;
/**
* This will contain one {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} corresponding to each descriptor
* generated for the current selection by the item provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<IAction> createSiblingActions;
/**
* This is the menu manager into which menu contribution items should be added for CreateSibling actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IMenuManager createSiblingMenuManager;
/**
* This creates an instance of the contributor.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingActionBarContributor() {
super(ADDITIONS_LAST_STYLE);
loadResourceAction = new LoadResourceAction();
validateAction = new ValidateAction();
controlAction = new ControlAction();
}
/**
* This adds Separators for editor additions to the tool bar.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToToolBar(IToolBarManager toolBarManager) {
toolBarManager.add(new Separator("mapping-settings"));
toolBarManager.add(new Separator("mapping-additions"));
}
/**
* This adds to the menu bar a menu and some separators for editor additions,
* as well as the sub-menus for object creation items.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void contributeToMenu(IMenuManager menuManager) {
super.contributeToMenu(menuManager);
IMenuManager submenuManager = new MenuManager(MappingEditorPlugin.INSTANCE.getString("_UI_MappingEditor_menu"), "com.irtsaintexupery.pseim.mappingMenuID");
menuManager.insertAfter("additions", submenuManager);
submenuManager.add(new Separator("settings"));
submenuManager.add(new Separator("actions"));
submenuManager.add(new Separator("additions"));
submenuManager.add(new Separator("additions-end"));
// Prepare for CreateChild item addition or removal.
//
createChildMenuManager = new MenuManager(MappingEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
submenuManager.insertBefore("additions", createChildMenuManager);
// Prepare for CreateSibling item addition or removal.
//
createSiblingMenuManager = new MenuManager(MappingEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
submenuManager.insertBefore("additions", createSiblingMenuManager);
// Force an update because Eclipse hides empty menus now.
//
submenuManager.addMenuListener
(new IMenuListener() {
public void menuAboutToShow(IMenuManager menuManager) {
menuManager.updateAll(true);
}
});
addGlobalActions(submenuManager);
}
/**
* When the active editor changes, this remembers the change and registers with it as a selection provider.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setActiveEditor(IEditorPart part) {
super.setActiveEditor(part);
activeEditorPart = part;
// Switch to the new selection provider.
//
if (selectionProvider != null) {
selectionProvider.removeSelectionChangedListener(this);
}
if (part == null) {
selectionProvider = null;
}
else {
selectionProvider = part.getSite().getSelectionProvider();
selectionProvider.addSelectionChangedListener(this);
// Fake a selection changed event to update the menus.
//
if (selectionProvider.getSelection() != null) {
selectionChanged(new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection()));
}
}
}
/**
* This implements {@link org.eclipse.jface.viewers.ISelectionChangedListener},
* handling {@link org.eclipse.jface.viewers.SelectionChangedEvent}s by querying for the children and siblings
* that can be added to the selected object and updating the menus accordingly.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void selectionChanged(SelectionChangedEvent event) {
// Remove any menu items for old selection.
//
if (createChildMenuManager != null) {
depopulateManager(createChildMenuManager, createChildActions);
}
if (createSiblingMenuManager != null) {
depopulateManager(createSiblingMenuManager, createSiblingActions);
}
// Query the new selection for appropriate new child/sibling descriptors
//
Collection<?> newChildDescriptors = null;
Collection<?> newSiblingDescriptors = null;
ISelection selection = event.getSelection();
if (selection instanceof IStructuredSelection && ((IStructuredSelection)selection).size() == 1) {
Object object = ((IStructuredSelection)selection).getFirstElement();
EditingDomain domain = ((IEditingDomainProvider)activeEditorPart).getEditingDomain();
newChildDescriptors = domain.getNewChildDescriptors(object, null);
newSiblingDescriptors = domain.getNewChildDescriptors(null, object);
}
// Generate actions for selection; populate and redraw the menus.
//
createChildActions = generateCreateChildActions(newChildDescriptors, selection);
createSiblingActions = generateCreateSiblingActions(newSiblingDescriptors, selection);
if (createChildMenuManager != null) {
populateManager(createChildMenuManager, createChildActions, null);
createChildMenuManager.update(true);
}
if (createSiblingMenuManager != null) {
populateManager(createSiblingMenuManager, createSiblingActions, null);
createSiblingMenuManager.update(true);
}
}
/**
* This generates a {@link org.eclipse.emf.edit.ui.action.CreateChildAction} for each object in <code>descriptors</code>,
* and returns the collection of these actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<IAction> generateCreateChildActions(Collection<?> descriptors, ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
if (descriptors != null) {
for (Object descriptor : descriptors) {
actions.add(new CreateChildAction(activeEditorPart, selection, descriptor));
}
}
return actions;
}
/**
* This generates a {@link org.eclipse.emf.edit.ui.action.CreateSiblingAction} for each object in <code>descriptors</code>,
* and returns the collection of these actions.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<IAction> generateCreateSiblingActions(Collection<?> descriptors, ISelection selection) {
Collection<IAction> actions = new ArrayList<IAction>();
if (descriptors != null) {
for (Object descriptor : descriptors) {
actions.add(new CreateSiblingAction(activeEditorPart, selection, descriptor));
}
}
return actions;
}
/**
* This populates the specified <code>manager</code> with {@link org.eclipse.jface.action.ActionContributionItem}s
* based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection,
* by inserting them before the specified contribution item <code>contributionID</code>.
* If <code>contributionID</code> is <code>null</code>, they are simply added.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void populateManager(IContributionManager manager, Collection<? extends IAction> actions, String contributionID) {
if (actions != null) {
for (IAction action : actions) {
if (contributionID != null) {
manager.insertBefore(contributionID, action);
}
else {
manager.add(action);
}
}
}
}
/**
* This removes from the specified <code>manager</code> all {@link org.eclipse.jface.action.ActionContributionItem}s
* based on the {@link org.eclipse.jface.action.IAction}s contained in the <code>actions</code> collection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void depopulateManager(IContributionManager manager, Collection<? extends IAction> actions) {
if (actions != null) {
IContributionItem[] items = manager.getItems();
for (int i = 0; i < items.length; i++) {
// Look into SubContributionItems
//
IContributionItem contributionItem = items[i];
while (contributionItem instanceof SubContributionItem) {
contributionItem = ((SubContributionItem)contributionItem).getInnerItem();
}
// Delete the ActionContributionItems with matching action.
//
if (contributionItem instanceof ActionContributionItem) {
IAction action = ((ActionContributionItem)contributionItem).getAction();
if (actions.contains(action)) {
manager.remove(contributionItem);
}
}
}
}
}
/**
* This populates the pop-up menu before it appears.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void menuAboutToShow(IMenuManager menuManager) {
super.menuAboutToShow(menuManager);
MenuManager submenuManager = null;
submenuManager = new MenuManager(MappingEditorPlugin.INSTANCE.getString("_UI_CreateChild_menu_item"));
populateManager(submenuManager, createChildActions, null);
menuManager.insertBefore("edit", submenuManager);
submenuManager = new MenuManager(MappingEditorPlugin.INSTANCE.getString("_UI_CreateSibling_menu_item"));
populateManager(submenuManager, createSiblingActions, null);
menuManager.insertBefore("edit", submenuManager);
}
/**
* This inserts global actions before the "additions-end" separator.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void addGlobalActions(IMenuManager menuManager) {
menuManager.insertAfter("additions-end", new Separator("ui-actions"));
menuManager.insertAfter("ui-actions", showPropertiesViewAction);
refreshViewerAction.setEnabled(refreshViewerAction.isEnabled());
menuManager.insertAfter("ui-actions", refreshViewerAction);
super.addGlobalActions(menuManager);
}
/**
* This ensures that a delete action will clean up all references to deleted objects.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean removeAllReferencesOnDelete() {
return true;
}
}

1826
eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingEditor.java

File diff suppressed because it is too large Load Diff

97
eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingEditorPlugin.java

@ -0,0 +1,97 @@ @@ -0,0 +1,97 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.presentation;
import com.irtsaintexupery.pseim.pseim.provider.PseimEditPlugin;
import com.irtsaintexupery.pseim.seim.provider.SeimEditPlugin;
import org.eclipse.emf.common.EMFPlugin;
import org.eclipse.emf.common.ui.EclipseUIPlugin;
import org.eclipse.emf.common.util.ResourceLocator;
/**
* This is the central singleton for the Mapping editor plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public final class MappingEditorPlugin extends EMFPlugin {
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final MappingEditorPlugin INSTANCE = new MappingEditorPlugin();
/**
* Keep track of the singleton.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static Implementation plugin;
/**
* Create the instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingEditorPlugin() {
super
(new ResourceLocator [] {
PseimEditPlugin.INSTANCE,
SeimEditPlugin.INSTANCE,
});
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
@Override
public ResourceLocator getPluginResourceLocator() {
return plugin;
}
/**
* Returns the singleton instance of the Eclipse plugin.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the singleton instance.
* @generated
*/
public static Implementation getPlugin() {
return plugin;
}
/**
* The actual implementation of the Eclipse <b>Plugin</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static class Implementation extends EclipseUIPlugin {
/**
* Creates an instance.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Implementation() {
super();
// Remember the static instance.
//
plugin = this;
}
}
}

627
eclipse/plugins/com.irtsaintexupery.pseim.editor/src-gen/com/irtsaintexupery/pseim/mapping/presentation/MappingModelWizard.java

@ -0,0 +1,627 @@ @@ -0,0 +1,627 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.presentation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.StringTokenizer;
import org.eclipse.emf.common.CommonPlugin;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EClassifier;
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.EObject;
import org.eclipse.emf.ecore.xmi.XMLResource;
import org.eclipse.emf.edit.ui.provider.ExtendedImageRegistry;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.actions.WorkspaceModifyOperation;
import org.eclipse.ui.dialogs.WizardNewFileCreationPage;
import org.eclipse.ui.part.FileEditorInput;
import org.eclipse.ui.part.ISetSelectionTarget;
import com.irtsaintexupery.pseim.mapping.MappingFactory;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.provider.MappingEditPlugin;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
/**
* This is a simple wizard for creating a new model file.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MappingModelWizard extends Wizard implements INewWizard {
/**
* The supported extensions for created files.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final List<String> FILE_EXTENSIONS =
Collections.unmodifiableList(Arrays.asList(MappingEditorPlugin.INSTANCE.getString("_UI_MappingEditorFilenameExtensions").split("\\s*,\\s*")));
/**
* A formatted list of supported file extensions, suitable for display.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final String FORMATTED_FILE_EXTENSIONS =
MappingEditorPlugin.INSTANCE.getString("_UI_MappingEditorFilenameExtensions").replaceAll("\\s*,\\s*", ", ");
/**
* This caches an instance of the model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MappingPackage mappingPackage = MappingPackage.eINSTANCE;
/**
* This caches an instance of the model factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MappingFactory mappingFactory = mappingPackage.getMappingFactory();
/**
* This is the file creation page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MappingModelWizardNewFileCreationPage newFileCreationPage;
/**
* This is the initial object creation page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MappingModelWizardInitialObjectCreationPage initialObjectCreationPage;
/**
* Remember the selection during initialization for populating the default container.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IStructuredSelection selection;
/**
* Remember the workbench during initialization.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected IWorkbench workbench;
/**
* Caches the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected List<String> initialObjectNames;
/**
* This just records the information.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void init(IWorkbench workbench, IStructuredSelection selection) {
this.workbench = workbench;
this.selection = selection;
setWindowTitle(MappingEditorPlugin.INSTANCE.getString("_UI_Wizard_label"));
setDefaultPageImageDescriptor(ExtendedImageRegistry.INSTANCE.getImageDescriptor(MappingEditorPlugin.INSTANCE.getImage("full/wizban/NewMapping")));
}
/**
* Returns the names of the types that can be created as the root object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<String> getInitialObjectNames() {
if (initialObjectNames == null) {
initialObjectNames = new ArrayList<String>();
for (EClassifier eClassifier : mappingPackage.getEClassifiers()) {
if (eClassifier instanceof EClass) {
EClass eClass = (EClass)eClassifier;
if (!eClass.isAbstract()) {
initialObjectNames.add(eClass.getName());
}
}
}
Collections.sort(initialObjectNames, CommonPlugin.INSTANCE.getComparator());
}
return initialObjectNames;
}
/**
* Create a new model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected EObject createInitialModel() {
EClass eClass = (EClass)mappingPackage.getEClassifier(initialObjectCreationPage.getInitialObjectName());
EObject rootObject = mappingFactory.create(eClass);
return rootObject;
}
/**
* Do the work after everything is specified.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean performFinish() {
try {
// Remember the file.
//
final IFile modelFile = getModelFile();
// Do the work within an operation.
//
WorkspaceModifyOperation operation =
new WorkspaceModifyOperation() {
@Override
protected void execute(IProgressMonitor progressMonitor) {
try {
// Create a resource set
//
ResourceSet resourceSet = new ResourceSetImpl();
// Get the URI of the model file.
//
URI fileURI = URI.createPlatformResourceURI(modelFile.getFullPath().toString(), true);
// Create a resource for this file.
//
Resource resource = resourceSet.createResource(fileURI);
// Add the initial model object to the contents.
//
EObject rootObject = createInitialModel();
if (rootObject != null) {
resource.getContents().add(rootObject);
}
// Save the contents of the resource to the file system.
//
Map<Object, Object> options = new HashMap<Object, Object>();
options.put(XMLResource.OPTION_ENCODING, initialObjectCreationPage.getEncoding());
resource.save(options);
}
catch (Exception exception) {
MappingEditorPlugin.INSTANCE.log(exception);
}
finally {
progressMonitor.done();
}
}
};
getContainer().run(false, false, operation);
// Select the new file resource in the current view.
//
IWorkbenchWindow workbenchWindow = workbench.getActiveWorkbenchWindow();
IWorkbenchPage page = workbenchWindow.getActivePage();
final IWorkbenchPart activePart = page.getActivePart();
if (activePart instanceof ISetSelectionTarget) {
final ISelection targetSelection = new StructuredSelection(modelFile);
getShell().getDisplay().asyncExec
(new Runnable() {
public void run() {
((ISetSelectionTarget)activePart).selectReveal(targetSelection);
}
});
}
// Open an editor on the new file.
//
try {
page.openEditor
(new FileEditorInput(modelFile),
workbench.getEditorRegistry().getDefaultEditor(modelFile.getFullPath().toString()).getId());
}
catch (PartInitException exception) {
MessageDialog.openError(workbenchWindow.getShell(), MappingEditorPlugin.INSTANCE.getString("_UI_OpenEditorError_label"), exception.getMessage());
return false;
}
return true;
}
catch (Exception exception) {
MappingEditorPlugin.INSTANCE.log(exception);
return false;
}
}
/**
* This is the one page of the wizard.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MappingModelWizardNewFileCreationPage extends WizardNewFileCreationPage {
/**
* Pass in the selection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingModelWizardNewFileCreationPage(String pageId, IStructuredSelection selection) {
super(pageId, selection);
}
/**
* The framework calls this to see if the file is correct.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean validatePage() {
if (super.validatePage()) {
String extension = new Path(getFileName()).getFileExtension();
if (extension == null || !FILE_EXTENSIONS.contains(extension)) {
String key = FILE_EXTENSIONS.size() > 1 ? "_WARN_FilenameExtensions" : "_WARN_FilenameExtension";
setErrorMessage(MappingEditorPlugin.INSTANCE.getString(key, new Object [] { FORMATTED_FILE_EXTENSIONS }));
return false;
}
return true;
}
return false;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IFile getModelFile() {
return ResourcesPlugin.getWorkspace().getRoot().getFile(getContainerFullPath().append(getFileName()));
}
}
/**
* This is the page where the type of object to create is selected.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class MappingModelWizardInitialObjectCreationPage extends WizardPage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Combo initialObjectField;
/**
* @generated
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
*/
protected List<String> encodings;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Combo encodingField;
/**
* Pass in the selection.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingModelWizardInitialObjectCreationPage(String pageId) {
super(pageId);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createControl(Composite parent) {
Composite composite = new Composite(parent, SWT.NONE); {
GridLayout layout = new GridLayout();
layout.numColumns = 1;
layout.verticalSpacing = 12;
composite.setLayout(layout);
GridData data = new GridData();
data.verticalAlignment = GridData.FILL;
data.grabExcessVerticalSpace = true;
data.horizontalAlignment = GridData.FILL;
composite.setLayoutData(data);
}
Label containerLabel = new Label(composite, SWT.LEFT);
{
containerLabel.setText(MappingEditorPlugin.INSTANCE.getString("_UI_ModelObject"));
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
containerLabel.setLayoutData(data);
}
initialObjectField = new Combo(composite, SWT.BORDER);
{
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
initialObjectField.setLayoutData(data);
}
for (String objectName : getInitialObjectNames()) {
initialObjectField.add(getLabel(objectName));
}
if (initialObjectField.getItemCount() == 1) {
initialObjectField.select(0);
}
initialObjectField.addModifyListener(validator);
Label encodingLabel = new Label(composite, SWT.LEFT);
{
encodingLabel.setText(MappingEditorPlugin.INSTANCE.getString("_UI_XMLEncoding"));
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
encodingLabel.setLayoutData(data);
}
encodingField = new Combo(composite, SWT.BORDER);
{
GridData data = new GridData();
data.horizontalAlignment = GridData.FILL;
data.grabExcessHorizontalSpace = true;
encodingField.setLayoutData(data);
}
for (String encoding : getEncodings()) {
encodingField.add(encoding);
}
encodingField.select(0);
encodingField.addModifyListener(validator);
setPageComplete(validatePage());
setControl(composite);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected ModifyListener validator =
new ModifyListener() {
public void modifyText(ModifyEvent e) {
setPageComplete(validatePage());
}
};
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected boolean validatePage() {
return getInitialObjectName() != null && getEncodings().contains(encodingField.getText());
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void setVisible(boolean visible) {
super.setVisible(visible);
if (visible) {
if (initialObjectField.getItemCount() == 1) {
initialObjectField.clearSelection();
encodingField.setFocus();
}
else {
encodingField.clearSelection();
initialObjectField.setFocus();
}
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getInitialObjectName() {
String label = initialObjectField.getText();
for (String name : getInitialObjectNames()) {
if (getLabel(name).equals(label)) {
return name;
}
}
return null;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public String getEncoding() {
return encodingField.getText();
}
/**
* Returns the label for the specified type name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected String getLabel(String typeName) {
try {
return MappingEditPlugin.INSTANCE.getString("_UI_" + typeName + "_type");
}
catch(MissingResourceException mre) {
MappingEditorPlugin.INSTANCE.log(mre);
}
return typeName;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected Collection<String> getEncodings() {
if (encodings == null) {
encodings = new ArrayList<String>();
for (StringTokenizer stringTokenizer = new StringTokenizer(MappingEditorPlugin.INSTANCE.getString("_UI_XMLEncodingChoices")); stringTokenizer.hasMoreTokens(); ) {
encodings.add(stringTokenizer.nextToken());
}
}
return encodings;
}
}
/**
* The framework calls this to create the contents of the wizard.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void addPages() {
// Create a page, set the title, and the initial model file name.
//
newFileCreationPage = new MappingModelWizardNewFileCreationPage("Whatever", selection);
newFileCreationPage.setTitle(MappingEditorPlugin.INSTANCE.getString("_UI_MappingModelWizard_label"));
newFileCreationPage.setDescription(MappingEditorPlugin.INSTANCE.getString("_UI_MappingModelWizard_description"));
newFileCreationPage.setFileName(MappingEditorPlugin.INSTANCE.getString("_UI_MappingEditorFilenameDefaultBase") + "." + FILE_EXTENSIONS.get(0));
addPage(newFileCreationPage);
// Try and get the resource selection to determine a current directory for the file dialog.
//
if (selection != null && !selection.isEmpty()) {
// Get the resource...
//
Object selectedElement = selection.iterator().next();
if (selectedElement instanceof IResource) {
// Get the resource parent, if its a file.
//
IResource selectedResource = (IResource)selectedElement;
if (selectedResource.getType() == IResource.FILE) {
selectedResource = selectedResource.getParent();
}
// This gives us a directory...
//
if (selectedResource instanceof IFolder || selectedResource instanceof IProject) {
// Set this for the container.
//
newFileCreationPage.setContainerFullPath(selectedResource.getFullPath());
// Make up a unique new name here.
//
String defaultModelBaseFilename = MappingEditorPlugin.INSTANCE.getString("_UI_MappingEditorFilenameDefaultBase");
String defaultModelFilenameExtension = FILE_EXTENSIONS.get(0);
String modelFilename = defaultModelBaseFilename + "." + defaultModelFilenameExtension;
for (int i = 1; ((IContainer)selectedResource).findMember(modelFilename) != null; ++i) {
modelFilename = defaultModelBaseFilename + i + "." + defaultModelFilenameExtension;
}
newFileCreationPage.setFileName(modelFilename);
}
}
}
initialObjectCreationPage = new MappingModelWizardInitialObjectCreationPage("Whatever2");
initialObjectCreationPage.setTitle(MappingEditorPlugin.INSTANCE.getString("_UI_MappingModelWizard_label"));
initialObjectCreationPage.setDescription(MappingEditorPlugin.INSTANCE.getString("_UI_Wizard_initial_object_description"));
addPage(initialObjectCreationPage);
}
/**
* Get the file from the page.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public IFile getModelFile() {
return newFileCreationPage.getModelFile();
}
}

5
eclipse/plugins/com.irtsaintexupery.pseim/META-INF/MANIFEST.MF

@ -12,7 +12,10 @@ Export-Package: com.irtsaintexupery.pseim.seim, @@ -12,7 +12,10 @@ Export-Package: com.irtsaintexupery.pseim.seim,
com.irtsaintexupery.pseim.seim.util,
com.irtsaintexupery.pseim.pseim,
com.irtsaintexupery.pseim.pseim.impl,
com.irtsaintexupery.pseim.pseim.util
com.irtsaintexupery.pseim.pseim.util,
com.irtsaintexupery.pseim.mapping,
com.irtsaintexupery.pseim.mapping.impl,
com.irtsaintexupery.pseim.mapping.util
Require-Bundle: org.eclipse.emf.ecore;visibility:=reexport,
com.irtsaintexupery.pseim;visibility:=reexport,
org.eclipse.core.runtime

48
eclipse/plugins/com.irtsaintexupery.pseim/model/mapping.ecore

@ -0,0 +1,48 @@ @@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<ecore:EPackage xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" name="mapping" nsURI="http://www.irit.fr/patterns/mapping/0.1" nsPrefix="mapping">
<eAnnotations source="http://www.eclipse.org/OCL/Import">
<details key="ecore" value="http://www.eclipse.org/emf/2002/Ecore"/>
<details key="pseim" value="pseim.ecore#/"/>
<details key="seim" value="seim.ecore#/"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="invocationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
<details key="settingDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
<details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"/>
</eAnnotations>
<eClassifiers xsi:type="ecore:EClass" name="PatternApplication">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
<details key="constraints" value="InvariantName"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="InvariantName" value="true"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EReference" name="cardinalityValues" upperBound="-1"
eType="#//CardinalityValue" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="portMapping" upperBound="-1"
eType="#//PortMapping" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="pattern" lowerBound="1"
eType="ecore:EClass pseim.ecore#//Pattern"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="modelElement" lowerBound="1"
upperBound="-1" eType="#//GraphElementMapping" containment="true"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="model" lowerBound="1" eType="ecore:EClass seim.ecore#//Model"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CardinalityValue">
<eStructuralFeatures xsi:type="ecore:EReference" name="cardinalityElement" lowerBound="1"
eType="ecore:EClass pseim.ecore#//CardinalityElement"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="value" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="PortMapping">
<eStructuralFeatures xsi:type="ecore:EReference" name="modelPort" ordered="false"
upperBound="-1" eType="ecore:EClass seim.ecore#//BorderElement"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="patternPort" lowerBound="1"
eType="ecore:EClass seim.ecore#//BorderElement"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="GraphElementMapping">
<eStructuralFeatures xsi:type="ecore:EReference" name="modelGraphElement" ordered="false"
upperBound="-1" eType="ecore:EClass seim.ecore#//GraphElement"/>
<eStructuralFeatures xsi:type="ecore:EReference" name="patternGraphElement" lowerBound="1"
eType="ecore:EClass seim.ecore#//GraphElement"/>
</eClassifiers>
</ecore:EPackage>

32
eclipse/plugins/com.irtsaintexupery.pseim/model/mapping.genmodel

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
<?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" modelDirectory="/com.irtsaintexupery.pseim/src-gen" editDirectory="/com.irtsaintexupery.pseim.edit/src-gen"
editorDirectory="/com.irtsaintexupery.pseim.editor/src-gen" modelPluginID="com.irtsaintexupery.pseim"
templateDirectory="" modelName="Mapping" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
testsDirectory="/com.irtsaintexupery.pseim.tests/src-gen" importerID="org.eclipse.emf.importer.ecore"
complianceLevel="8.0" copyrightFields="false" usedGenPackages="pseim.genmodel#//pseim seim.genmodel#//seim"
operationReflection="true" importOrganizing="true">
<foreignModel>mapping.ecore</foreignModel>
<genPackages prefix="Mapping" basePackage="com.irtsaintexupery.pseim" disposableProviderFactory="true"
ecorePackage="mapping.ecore#/">
<genClasses ecoreClass="mapping.ecore#//PatternApplication">
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mapping.ecore#//PatternApplication/cardinalityValues"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mapping.ecore#//PatternApplication/portMapping"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//PatternApplication/pattern"/>
<genFeatures property="None" children="true" createChild="true" ecoreFeature="ecore:EReference mapping.ecore#//PatternApplication/modelElement"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//PatternApplication/model"/>
</genClasses>
<genClasses ecoreClass="mapping.ecore#//CardinalityValue">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//CardinalityValue/cardinalityElement"/>
<genFeatures createChild="false" ecoreFeature="ecore:EAttribute mapping.ecore#//CardinalityValue/value"/>
</genClasses>
<genClasses ecoreClass="mapping.ecore#//PortMapping">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//PortMapping/modelPort"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//PortMapping/patternPort"/>
</genClasses>
<genClasses ecoreClass="mapping.ecore#//GraphElementMapping">
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//GraphElementMapping/modelGraphElement"/>
<genFeatures notify="false" createChild="false" propertySortChoices="true" ecoreFeature="ecore:EReference mapping.ecore#//GraphElementMapping/patternGraphElement"/>
</genClasses>
</genPackages>
</genmodel:GenModel>

4
eclipse/plugins/com.irtsaintexupery.pseim/model/pseim.ecore

@ -98,8 +98,8 @@ @@ -98,8 +98,8 @@
<details key="constraints" value="srcIsPatternPort dstIsPatternPort"/>
</eAnnotations>
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="srcIsPatternPort" value="src.oclIsTypeOf(PatternLink)"/>
<details key="dstIsPatternPort" value="dst.oclIsTypeOf(PatternLink)"/>
<details key="srcIsPatternPort" value="src.oclIsTypeOf(PatternPort)"/>
<details key="dstIsPatternPort" value="dst.oclIsTypeOf(PatternPort)"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="linkType" lowerBound="1"
eType="#//LinkType"/>

2
eclipse/plugins/com.irtsaintexupery.pseim/model/pseim.genmodel

@ -3,7 +3,7 @@ @@ -3,7 +3,7 @@
xmlns:genmodel="http://www.eclipse.org/emf/2002/GenModel" copyrightText="Copyright (c) 2018 IRT AESE (IRT Saint Exupéry).&#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v2.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;https://www.eclipse.org/legal/epl-2.0"
modelDirectory="/com.irtsaintexupery.pseim/src-gen" editDirectory="/com.irtsaintexupery.pseim.edit/src-gen"
editorDirectory="/com.irtsaintexupery.pseim.editor/src-gen" modelPluginID="com.irtsaintexupery.pseim"
redirection="" modelName="Pseim" editPluginClass="com.irtsaintexupery.pseim.pseim.provider.PseimEditPlugin"
redirection="" modelName="Pseim" modelPluginClass="" editPluginClass="com.irtsaintexupery.pseim.pseim.provider.PseimEditPlugin"
editorPluginClass="com.irtsaintexupery.pseim.pseim.presentation.PseimEditorPlugin"
rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container" codeFormatting="true"
testsDirectory="/com.irtsaintexupery.pseim.tests/src-gen" testSuiteClass="com.irtsaintexupery.pseim.pseim.tests.PseimAllTests"

2
eclipse/plugins/com.irtsaintexupery.pseim/model/seim.aird

@ -6,6 +6,8 @@ @@ -6,6 +6,8 @@
<semanticResources>http://www.eclipse.org/emf/2002/Ecore</semanticResources>
<semanticResources>pseim.ecore</semanticResources>
<semanticResources>pseim.genmodel</semanticResources>
<semanticResources>mapping.ecore</semanticResources>
<semanticResources>mapping.genmodel</semanticResources>
<ownedViews xmi:type="viewpoint:DView" xmi:id="_2M5gcCtyEei2HetS0nQhKw">
<viewpoint xmi:type="description:Viewpoint" href="platform:/plugin/org.eclipse.emf.ecoretools.design/description/ecore.odesign#//@ownedViewpoints[name='Design']"/>
<ownedRepresentationDescriptors xmi:type="viewpoint:DRepresentationDescriptor" xmi:id="_FZgtNyt2Eei2HetS0nQhKw" name="seim class diagram" repPath="#_FY63UCt2Eei2HetS0nQhKw">

2
eclipse/plugins/com.irtsaintexupery.pseim/model/seim.ecore

@ -69,7 +69,7 @@ @@ -69,7 +69,7 @@
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot">
<details key="nameNotEmpty" value="name &lt;> ''"/>
</eAnnotations>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
<eStructuralFeatures xsi:type="ecore:EAttribute" name="name" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="IdentifiedElement" abstract="true" interface="true">
<eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">

8
eclipse/plugins/com.irtsaintexupery.pseim/plugin.xml

@ -22,4 +22,12 @@ @@ -22,4 +22,12 @@
genModel="model/pseim.genmodel"/>
</extension>
<extension point="org.eclipse.emf.ecore.generated_package">
<!-- @generated mapping -->
<package
uri="http://www.irit.fr/patterns/mapping/0.1"
class="com.irtsaintexupery.pseim.mapping.MappingPackage"
genModel="model/mapping.genmodel"/>
</extension>
</plugin>

79
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/CardinalityValue.java

@ -0,0 +1,79 @@ @@ -0,0 +1,79 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Cardinality Value</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.CardinalityValue#getCardinalityElement <em>Cardinality Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.CardinalityValue#getValue <em>Value</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getCardinalityValue()
* @model
* @generated
*/
public interface CardinalityValue extends EObject {
/**
* Returns the value of the '<em><b>Cardinality Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Cardinality Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Cardinality Element</em>' reference.
* @see #setCardinalityElement(CardinalityElement)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getCardinalityValue_CardinalityElement()
* @model required="true"
* @generated
*/
CardinalityElement getCardinalityElement();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.CardinalityValue#getCardinalityElement <em>Cardinality Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Cardinality Element</em>' reference.
* @see #getCardinalityElement()
* @generated
*/
void setCardinalityElement(CardinalityElement value);
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(int)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getCardinalityValue_Value()
* @model required="true"
* @generated
*/
int getValue();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.CardinalityValue#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #getValue()
* @generated
*/
void setValue(int value);
} // CardinalityValue

79
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/CardinalityValueSetting.java

@ -0,0 +1,79 @@ @@ -0,0 +1,79 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Cardinality Value Setting</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.CardinalityValueSetting#getCardinalityElement <em>Cardinality Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.CardinalityValueSetting#getValue <em>Value</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getCardinalityValueSetting()
* @model
* @generated
*/
public interface CardinalityValueSetting extends EObject {
/**
* Returns the value of the '<em><b>Cardinality Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Cardinality Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Cardinality Element</em>' reference.
* @see #setCardinalityElement(CardinalityElement)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getCardinalityValueSetting_CardinalityElement()
* @model required="true"
* @generated
*/
CardinalityElement getCardinalityElement();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.CardinalityValueSetting#getCardinalityElement <em>Cardinality Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Cardinality Element</em>' reference.
* @see #getCardinalityElement()
* @generated
*/
void setCardinalityElement(CardinalityElement value);
/**
* Returns the value of the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Value</em>' attribute isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Value</em>' attribute.
* @see #setValue(int)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getCardinalityValueSetting_Value()
* @model required="true"
* @generated
*/
int getValue();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.CardinalityValueSetting#getValue <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Value</em>' attribute.
* @see #getValue()
* @generated
*/
void setValue(int value);
} // CardinalityValueSetting

70
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/GraphElementMapping.java

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import com.irtsaintexupery.pseim.seim.GraphElement;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Graph Element Mapping</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping#getModelGraphElement <em>Model Graph Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping#getPatternGraphElement <em>Pattern Graph Element</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getGraphElementMapping()
* @model
* @generated
*/
public interface GraphElementMapping extends EObject {
/**
* Returns the value of the '<em><b>Model Graph Element</b></em>' reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.GraphElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Model Graph Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Model Graph Element</em>' reference list.
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getGraphElementMapping_ModelGraphElement()
* @model ordered="false"
* @generated
*/
EList<GraphElement> getModelGraphElement();
/**
* Returns the value of the '<em><b>Pattern Graph Element</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Pattern Graph Element</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Pattern Graph Element</em>' reference.
* @see #setPatternGraphElement(GraphElement)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getGraphElementMapping_PatternGraphElement()
* @model required="true"
* @generated
*/
GraphElement getPatternGraphElement();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping#getPatternGraphElement <em>Pattern Graph Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Pattern Graph Element</em>' reference.
* @see #getPatternGraphElement()
* @generated
*/
void setPatternGraphElement(GraphElement value);
} // GraphElementMapping

69
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/MappingFactory.java

@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import org.eclipse.emf.ecore.EFactory;
/**
* <!-- begin-user-doc -->
* The <b>Factory</b> for the model.
* It provides a create method for each non-abstract class of the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.MappingPackage
* @generated
*/
public interface MappingFactory extends EFactory {
/**
* The singleton instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
MappingFactory eINSTANCE = com.irtsaintexupery.pseim.mapping.impl.MappingFactoryImpl.init();
/**
* Returns a new object of class '<em>Pattern Application</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Pattern Application</em>'.
* @generated
*/
PatternApplication createPatternApplication();
/**
* Returns a new object of class '<em>Cardinality Value</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Cardinality Value</em>'.
* @generated
*/
CardinalityValue createCardinalityValue();
/**
* Returns a new object of class '<em>Port Mapping</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Port Mapping</em>'.
* @generated
*/
PortMapping createPortMapping();
/**
* Returns a new object of class '<em>Graph Element Mapping</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return a new object of class '<em>Graph Element Mapping</em>'.
* @generated
*/
GraphElementMapping createGraphElementMapping();
/**
* Returns the package supported by this factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the package supported by this factory.
* @generated
*/
MappingPackage getMappingPackage();
} //MappingFactory

587
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/MappingPackage.java

@ -0,0 +1,587 @@ @@ -0,0 +1,587 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
/**
* <!-- begin-user-doc -->
* The <b>Package</b> for the model.
* It contains accessors for the meta objects to represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.MappingFactory
* @model kind="package"
* annotation="http://www.eclipse.org/OCL/Import ecore='http://www.eclipse.org/emf/2002/Ecore' pseim='pseim.ecore#/' seim='seim.ecore#/'"
* annotation="http://www.eclipse.org/emf/2002/Ecore invocationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot' settingDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot' validationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot'"
* @generated
*/
public interface MappingPackage extends EPackage {
/**
* The package name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNAME = "mapping";
/**
* The package namespace URI.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_URI = "http://www.irit.fr/patterns/mapping/0.1";
/**
* The package namespace name.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
String eNS_PREFIX = "mapping";
/**
* The singleton instance of the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
MappingPackage eINSTANCE = com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl.init();
/**
* The meta object id for the '{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl <em>Pattern Application</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getPatternApplication()
* @generated
*/
int PATTERN_APPLICATION = 0;
/**
* The feature id for the '<em><b>Cardinality Values</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION__CARDINALITY_VALUES = 0;
/**
* The feature id for the '<em><b>Port Mapping</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION__PORT_MAPPING = 1;
/**
* The feature id for the '<em><b>Pattern</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION__PATTERN = 2;
/**
* The feature id for the '<em><b>Model Element</b></em>' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION__MODEL_ELEMENT = 3;
/**
* The feature id for the '<em><b>Model</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION__MODEL = 4;
/**
* The number of structural features of the '<em>Pattern Application</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION_FEATURE_COUNT = 5;
/**
* The number of operations of the '<em>Pattern Application</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PATTERN_APPLICATION_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link com.irtsaintexupery.pseim.mapping.impl.CardinalityValueImpl <em>Cardinality Value</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.CardinalityValueImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getCardinalityValue()
* @generated
*/
int CARDINALITY_VALUE = 1;
/**
* The feature id for the '<em><b>Cardinality Element</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CARDINALITY_VALUE__CARDINALITY_ELEMENT = 0;
/**
* The feature id for the '<em><b>Value</b></em>' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CARDINALITY_VALUE__VALUE = 1;
/**
* The number of structural features of the '<em>Cardinality Value</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CARDINALITY_VALUE_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Cardinality Value</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int CARDINALITY_VALUE_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link com.irtsaintexupery.pseim.mapping.impl.PortMappingImpl <em>Port Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.PortMappingImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getPortMapping()
* @generated
*/
int PORT_MAPPING = 2;
/**
* The feature id for the '<em><b>Model Port</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PORT_MAPPING__MODEL_PORT = 0;
/**
* The feature id for the '<em><b>Pattern Port</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PORT_MAPPING__PATTERN_PORT = 1;
/**
* The number of structural features of the '<em>Port Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PORT_MAPPING_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Port Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int PORT_MAPPING_OPERATION_COUNT = 0;
/**
* The meta object id for the '{@link com.irtsaintexupery.pseim.mapping.impl.GraphElementMappingImpl <em>Graph Element Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.GraphElementMappingImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getGraphElementMapping()
* @generated
*/
int GRAPH_ELEMENT_MAPPING = 3;
/**
* The feature id for the '<em><b>Model Graph Element</b></em>' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT = 0;
/**
* The feature id for the '<em><b>Pattern Graph Element</b></em>' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT = 1;
/**
* The number of structural features of the '<em>Graph Element Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GRAPH_ELEMENT_MAPPING_FEATURE_COUNT = 2;
/**
* The number of operations of the '<em>Graph Element Mapping</em>' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @ordered
*/
int GRAPH_ELEMENT_MAPPING_OPERATION_COUNT = 0;
/**
* Returns the meta object for class '{@link com.irtsaintexupery.pseim.mapping.PatternApplication <em>Pattern Application</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Pattern Application</em>'.
* @see com.irtsaintexupery.pseim.mapping.PatternApplication
* @generated
*/
EClass getPatternApplication();
/**
* Returns the meta object for the containment reference list '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getCardinalityValues <em>Cardinality Values</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Cardinality Values</em>'.
* @see com.irtsaintexupery.pseim.mapping.PatternApplication#getCardinalityValues()
* @see #getPatternApplication()
* @generated
*/
EReference getPatternApplication_CardinalityValues();
/**
* Returns the meta object for the containment reference list '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getPortMapping <em>Port Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Port Mapping</em>'.
* @see com.irtsaintexupery.pseim.mapping.PatternApplication#getPortMapping()
* @see #getPatternApplication()
* @generated
*/
EReference getPatternApplication_PortMapping();
/**
* Returns the meta object for the reference '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getPattern <em>Pattern</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Pattern</em>'.
* @see com.irtsaintexupery.pseim.mapping.PatternApplication#getPattern()
* @see #getPatternApplication()
* @generated
*/
EReference getPatternApplication_Pattern();
/**
* Returns the meta object for the containment reference list '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getModelElement <em>Model Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the containment reference list '<em>Model Element</em>'.
* @see com.irtsaintexupery.pseim.mapping.PatternApplication#getModelElement()
* @see #getPatternApplication()
* @generated
*/
EReference getPatternApplication_ModelElement();
/**
* Returns the meta object for the reference '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getModel <em>Model</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Model</em>'.
* @see com.irtsaintexupery.pseim.mapping.PatternApplication#getModel()
* @see #getPatternApplication()
* @generated
*/
EReference getPatternApplication_Model();
/**
* Returns the meta object for class '{@link com.irtsaintexupery.pseim.mapping.CardinalityValue <em>Cardinality Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Cardinality Value</em>'.
* @see com.irtsaintexupery.pseim.mapping.CardinalityValue
* @generated
*/
EClass getCardinalityValue();
/**
* Returns the meta object for the reference '{@link com.irtsaintexupery.pseim.mapping.CardinalityValue#getCardinalityElement <em>Cardinality Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Cardinality Element</em>'.
* @see com.irtsaintexupery.pseim.mapping.CardinalityValue#getCardinalityElement()
* @see #getCardinalityValue()
* @generated
*/
EReference getCardinalityValue_CardinalityElement();
/**
* Returns the meta object for the attribute '{@link com.irtsaintexupery.pseim.mapping.CardinalityValue#getValue <em>Value</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the attribute '<em>Value</em>'.
* @see com.irtsaintexupery.pseim.mapping.CardinalityValue#getValue()
* @see #getCardinalityValue()
* @generated
*/
EAttribute getCardinalityValue_Value();
/**
* Returns the meta object for class '{@link com.irtsaintexupery.pseim.mapping.PortMapping <em>Port Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Port Mapping</em>'.
* @see com.irtsaintexupery.pseim.mapping.PortMapping
* @generated
*/
EClass getPortMapping();
/**
* Returns the meta object for the reference list '{@link com.irtsaintexupery.pseim.mapping.PortMapping#getModelPort <em>Model Port</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Model Port</em>'.
* @see com.irtsaintexupery.pseim.mapping.PortMapping#getModelPort()
* @see #getPortMapping()
* @generated
*/
EReference getPortMapping_ModelPort();
/**
* Returns the meta object for the reference '{@link com.irtsaintexupery.pseim.mapping.PortMapping#getPatternPort <em>Pattern Port</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Pattern Port</em>'.
* @see com.irtsaintexupery.pseim.mapping.PortMapping#getPatternPort()
* @see #getPortMapping()
* @generated
*/
EReference getPortMapping_PatternPort();
/**
* Returns the meta object for class '{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping <em>Graph Element Mapping</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for class '<em>Graph Element Mapping</em>'.
* @see com.irtsaintexupery.pseim.mapping.GraphElementMapping
* @generated
*/
EClass getGraphElementMapping();
/**
* Returns the meta object for the reference list '{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping#getModelGraphElement <em>Model Graph Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference list '<em>Model Graph Element</em>'.
* @see com.irtsaintexupery.pseim.mapping.GraphElementMapping#getModelGraphElement()
* @see #getGraphElementMapping()
* @generated
*/
EReference getGraphElementMapping_ModelGraphElement();
/**
* Returns the meta object for the reference '{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping#getPatternGraphElement <em>Pattern Graph Element</em>}'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the meta object for the reference '<em>Pattern Graph Element</em>'.
* @see com.irtsaintexupery.pseim.mapping.GraphElementMapping#getPatternGraphElement()
* @see #getGraphElementMapping()
* @generated
*/
EReference getGraphElementMapping_PatternGraphElement();
/**
* Returns the factory that creates the instances of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the factory that creates the instances of the model.
* @generated
*/
MappingFactory getMappingFactory();
/**
* <!-- begin-user-doc -->
* Defines literals for the meta objects that represent
* <ul>
* <li>each class,</li>
* <li>each feature of each class,</li>
* <li>each operation of each class,</li>
* <li>each enum,</li>
* <li>and each data type</li>
* </ul>
* <!-- end-user-doc -->
* @generated
*/
interface Literals {
/**
* The meta object literal for the '{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl <em>Pattern Application</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getPatternApplication()
* @generated
*/
EClass PATTERN_APPLICATION = eINSTANCE.getPatternApplication();
/**
* The meta object literal for the '<em><b>Cardinality Values</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PATTERN_APPLICATION__CARDINALITY_VALUES = eINSTANCE.getPatternApplication_CardinalityValues();
/**
* The meta object literal for the '<em><b>Port Mapping</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PATTERN_APPLICATION__PORT_MAPPING = eINSTANCE.getPatternApplication_PortMapping();
/**
* The meta object literal for the '<em><b>Pattern</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PATTERN_APPLICATION__PATTERN = eINSTANCE.getPatternApplication_Pattern();
/**
* The meta object literal for the '<em><b>Model Element</b></em>' containment reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PATTERN_APPLICATION__MODEL_ELEMENT = eINSTANCE.getPatternApplication_ModelElement();
/**
* The meta object literal for the '<em><b>Model</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PATTERN_APPLICATION__MODEL = eINSTANCE.getPatternApplication_Model();
/**
* The meta object literal for the '{@link com.irtsaintexupery.pseim.mapping.impl.CardinalityValueImpl <em>Cardinality Value</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.CardinalityValueImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getCardinalityValue()
* @generated
*/
EClass CARDINALITY_VALUE = eINSTANCE.getCardinalityValue();
/**
* The meta object literal for the '<em><b>Cardinality Element</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference CARDINALITY_VALUE__CARDINALITY_ELEMENT = eINSTANCE.getCardinalityValue_CardinalityElement();
/**
* The meta object literal for the '<em><b>Value</b></em>' attribute feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EAttribute CARDINALITY_VALUE__VALUE = eINSTANCE.getCardinalityValue_Value();
/**
* The meta object literal for the '{@link com.irtsaintexupery.pseim.mapping.impl.PortMappingImpl <em>Port Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.PortMappingImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getPortMapping()
* @generated
*/
EClass PORT_MAPPING = eINSTANCE.getPortMapping();
/**
* The meta object literal for the '<em><b>Model Port</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PORT_MAPPING__MODEL_PORT = eINSTANCE.getPortMapping_ModelPort();
/**
* The meta object literal for the '<em><b>Pattern Port</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference PORT_MAPPING__PATTERN_PORT = eINSTANCE.getPortMapping_PatternPort();
/**
* The meta object literal for the '{@link com.irtsaintexupery.pseim.mapping.impl.GraphElementMappingImpl <em>Graph Element Mapping</em>}' class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.impl.GraphElementMappingImpl
* @see com.irtsaintexupery.pseim.mapping.impl.MappingPackageImpl#getGraphElementMapping()
* @generated
*/
EClass GRAPH_ELEMENT_MAPPING = eINSTANCE.getGraphElementMapping();
/**
* The meta object literal for the '<em><b>Model Graph Element</b></em>' reference list feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT = eINSTANCE.getGraphElementMapping_ModelGraphElement();
/**
* The meta object literal for the '<em><b>Pattern Graph Element</b></em>' reference feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
EReference GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT = eINSTANCE.getGraphElementMapping_PatternGraphElement();
}
} //MappingPackage

135
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/PatternApplication.java

@ -0,0 +1,135 @@ @@ -0,0 +1,135 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import com.irtsaintexupery.pseim.pseim.Pattern;
import com.irtsaintexupery.pseim.seim.Model;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Pattern Application</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getCardinalityValues <em>Cardinality Values</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getPortMapping <em>Port Mapping</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getPattern <em>Pattern</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getModelElement <em>Model Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getModel <em>Model</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPatternApplication()
* @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='InvariantName'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot InvariantName='true'"
* @generated
*/
public interface PatternApplication extends EObject {
/**
* Returns the value of the '<em><b>Cardinality Values</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.mapping.CardinalityValue}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Cardinality Values</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Cardinality Values</em>' containment reference list.
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPatternApplication_CardinalityValues()
* @model containment="true"
* @generated
*/
EList<CardinalityValue> getCardinalityValues();
/**
* Returns the value of the '<em><b>Port Mapping</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.mapping.PortMapping}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Port Mapping</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Port Mapping</em>' containment reference list.
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPatternApplication_PortMapping()
* @model containment="true"
* @generated
*/
EList<PortMapping> getPortMapping();
/**
* Returns the value of the '<em><b>Pattern</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Pattern</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Pattern</em>' reference.
* @see #setPattern(Pattern)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPatternApplication_Pattern()
* @model required="true"
* @generated
*/
Pattern getPattern();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getPattern <em>Pattern</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Pattern</em>' reference.
* @see #getPattern()
* @generated
*/
void setPattern(Pattern value);
/**
* Returns the value of the '<em><b>Model Element</b></em>' containment reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.mapping.GraphElementMapping}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Model Element</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Model Element</em>' containment reference list.
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPatternApplication_ModelElement()
* @model containment="true" required="true"
* @generated
*/
EList<GraphElementMapping> getModelElement();
/**
* Returns the value of the '<em><b>Model</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Model</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Model</em>' reference.
* @see #setModel(Model)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPatternApplication_Model()
* @model required="true"
* @generated
*/
Model getModel();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.PatternApplication#getModel <em>Model</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Model</em>' reference.
* @see #getModel()
* @generated
*/
void setModel(Model value);
} // PatternApplication

70
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/PortMapping.java

@ -0,0 +1,70 @@ @@ -0,0 +1,70 @@
/**
*/
package com.irtsaintexupery.pseim.mapping;
import com.irtsaintexupery.pseim.seim.BorderElement;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Port Mapping</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.PortMapping#getModelPort <em>Model Port</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.PortMapping#getPatternPort <em>Pattern Port</em>}</li>
* </ul>
*
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPortMapping()
* @model
* @generated
*/
public interface PortMapping extends EObject {
/**
* Returns the value of the '<em><b>Model Port</b></em>' reference list.
* The list contents are of type {@link com.irtsaintexupery.pseim.seim.BorderElement}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Model Port</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Model Port</em>' reference list.
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPortMapping_ModelPort()
* @model ordered="false"
* @generated
*/
EList<BorderElement> getModelPort();
/**
* Returns the value of the '<em><b>Pattern Port</b></em>' reference.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Pattern Port</em>' reference isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Pattern Port</em>' reference.
* @see #setPatternPort(BorderElement)
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#getPortMapping_PatternPort()
* @model required="true"
* @generated
*/
BorderElement getPatternPort();
/**
* Sets the value of the '{@link com.irtsaintexupery.pseim.mapping.PortMapping#getPatternPort <em>Pattern Port</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param value the new value of the '<em>Pattern Port</em>' reference.
* @see #getPatternPort()
* @generated
*/
void setPatternPort(BorderElement value);
} // PortMapping

226
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/CardinalityValueImpl.java

@ -0,0 +1,226 @@ @@ -0,0 +1,226 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.impl;
import com.irtsaintexupery.pseim.mapping.CardinalityValue;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.pseim.CardinalityElement;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Cardinality Value</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.CardinalityValueImpl#getCardinalityElement <em>Cardinality Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.CardinalityValueImpl#getValue <em>Value</em>}</li>
* </ul>
*
* @generated
*/
public class CardinalityValueImpl extends MinimalEObjectImpl.Container implements CardinalityValue {
/**
* The cached value of the '{@link #getCardinalityElement() <em>Cardinality Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCardinalityElement()
* @generated
* @ordered
*/
protected CardinalityElement cardinalityElement;
/**
* The default value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected static final int VALUE_EDEFAULT = 0;
/**
* The cached value of the '{@link #getValue() <em>Value</em>}' attribute.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getValue()
* @generated
* @ordered
*/
protected int value = VALUE_EDEFAULT;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected CardinalityValueImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MappingPackage.Literals.CARDINALITY_VALUE;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement getCardinalityElement() {
if (cardinalityElement != null && cardinalityElement.eIsProxy()) {
InternalEObject oldCardinalityElement = (InternalEObject)cardinalityElement;
cardinalityElement = (CardinalityElement)eResolveProxy(oldCardinalityElement);
if (cardinalityElement != oldCardinalityElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.CARDINALITY_VALUE__CARDINALITY_ELEMENT, oldCardinalityElement, cardinalityElement));
}
}
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityElement basicGetCardinalityElement() {
return cardinalityElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setCardinalityElement(CardinalityElement newCardinalityElement) {
CardinalityElement oldCardinalityElement = cardinalityElement;
cardinalityElement = newCardinalityElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.CARDINALITY_VALUE__CARDINALITY_ELEMENT, oldCardinalityElement, cardinalityElement));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public int getValue() {
return value;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setValue(int newValue) {
int oldValue = value;
value = newValue;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.CARDINALITY_VALUE__VALUE, oldValue, value));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MappingPackage.CARDINALITY_VALUE__CARDINALITY_ELEMENT:
if (resolve) return getCardinalityElement();
return basicGetCardinalityElement();
case MappingPackage.CARDINALITY_VALUE__VALUE:
return getValue();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MappingPackage.CARDINALITY_VALUE__CARDINALITY_ELEMENT:
setCardinalityElement((CardinalityElement)newValue);
return;
case MappingPackage.CARDINALITY_VALUE__VALUE:
setValue((Integer)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MappingPackage.CARDINALITY_VALUE__CARDINALITY_ELEMENT:
setCardinalityElement((CardinalityElement)null);
return;
case MappingPackage.CARDINALITY_VALUE__VALUE:
setValue(VALUE_EDEFAULT);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MappingPackage.CARDINALITY_VALUE__CARDINALITY_ELEMENT:
return cardinalityElement != null;
case MappingPackage.CARDINALITY_VALUE__VALUE:
return value != VALUE_EDEFAULT;
}
return super.eIsSet(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String toString() {
if (eIsProxy()) return super.toString();
StringBuffer result = new StringBuffer(super.toString());
result.append(" (value: ");
result.append(value);
result.append(')');
return result.toString();
}
} //CardinalityValueImpl

196
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/GraphElementMappingImpl.java

@ -0,0 +1,196 @@ @@ -0,0 +1,196 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.impl;
import com.irtsaintexupery.pseim.mapping.GraphElementMapping;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.seim.GraphElement;
import java.util.Collection;
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.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Graph Element Mapping</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.GraphElementMappingImpl#getModelGraphElement <em>Model Graph Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.GraphElementMappingImpl#getPatternGraphElement <em>Pattern Graph Element</em>}</li>
* </ul>
*
* @generated
*/
public class GraphElementMappingImpl extends MinimalEObjectImpl.Container implements GraphElementMapping {
/**
* The cached value of the '{@link #getModelGraphElement() <em>Model Graph Element</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModelGraphElement()
* @generated
* @ordered
*/
protected EList<GraphElement> modelGraphElement;
/**
* The cached value of the '{@link #getPatternGraphElement() <em>Pattern Graph Element</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPatternGraphElement()
* @generated
* @ordered
*/
protected GraphElement patternGraphElement;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected GraphElementMappingImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MappingPackage.Literals.GRAPH_ELEMENT_MAPPING;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<GraphElement> getModelGraphElement() {
if (modelGraphElement == null) {
modelGraphElement = new EObjectResolvingEList<GraphElement>(GraphElement.class, this, MappingPackage.GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT);
}
return modelGraphElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GraphElement getPatternGraphElement() {
if (patternGraphElement != null && patternGraphElement.eIsProxy()) {
InternalEObject oldPatternGraphElement = (InternalEObject)patternGraphElement;
patternGraphElement = (GraphElement)eResolveProxy(oldPatternGraphElement);
if (patternGraphElement != oldPatternGraphElement) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT, oldPatternGraphElement, patternGraphElement));
}
}
return patternGraphElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GraphElement basicGetPatternGraphElement() {
return patternGraphElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPatternGraphElement(GraphElement newPatternGraphElement) {
GraphElement oldPatternGraphElement = patternGraphElement;
patternGraphElement = newPatternGraphElement;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT, oldPatternGraphElement, patternGraphElement));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MappingPackage.GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT:
return getModelGraphElement();
case MappingPackage.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT:
if (resolve) return getPatternGraphElement();
return basicGetPatternGraphElement();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MappingPackage.GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT:
getModelGraphElement().clear();
getModelGraphElement().addAll((Collection<? extends GraphElement>)newValue);
return;
case MappingPackage.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT:
setPatternGraphElement((GraphElement)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MappingPackage.GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT:
getModelGraphElement().clear();
return;
case MappingPackage.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT:
setPatternGraphElement((GraphElement)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MappingPackage.GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT:
return modelGraphElement != null && !modelGraphElement.isEmpty();
case MappingPackage.GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT:
return patternGraphElement != null;
}
return super.eIsSet(featureID);
}
} //GraphElementMappingImpl

128
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/MappingFactoryImpl.java

@ -0,0 +1,128 @@ @@ -0,0 +1,128 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.impl;
import com.irtsaintexupery.pseim.mapping.*;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.impl.EFactoryImpl;
import org.eclipse.emf.ecore.plugin.EcorePlugin;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Factory</b>.
* <!-- end-user-doc -->
* @generated
*/
public class MappingFactoryImpl extends EFactoryImpl implements MappingFactory {
/**
* Creates the default factory implementation.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static MappingFactory init() {
try {
MappingFactory theMappingFactory = (MappingFactory)EPackage.Registry.INSTANCE.getEFactory(MappingPackage.eNS_URI);
if (theMappingFactory != null) {
return theMappingFactory;
}
}
catch (Exception exception) {
EcorePlugin.INSTANCE.log(exception);
}
return new MappingFactoryImpl();
}
/**
* Creates an instance of the factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingFactoryImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public EObject create(EClass eClass) {
switch (eClass.getClassifierID()) {
case MappingPackage.PATTERN_APPLICATION: return createPatternApplication();
case MappingPackage.CARDINALITY_VALUE: return createCardinalityValue();
case MappingPackage.PORT_MAPPING: return createPortMapping();
case MappingPackage.GRAPH_ELEMENT_MAPPING: return createGraphElementMapping();
default:
throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier");
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PatternApplication createPatternApplication() {
PatternApplicationImpl patternApplication = new PatternApplicationImpl();
return patternApplication;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public CardinalityValue createCardinalityValue() {
CardinalityValueImpl cardinalityValue = new CardinalityValueImpl();
return cardinalityValue;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public PortMapping createPortMapping() {
PortMappingImpl portMapping = new PortMappingImpl();
return portMapping;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public GraphElementMapping createGraphElementMapping() {
GraphElementMappingImpl graphElementMapping = new GraphElementMappingImpl();
return graphElementMapping;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingPackage getMappingPackage() {
return (MappingPackage)getEPackage();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @deprecated
* @generated
*/
@Deprecated
public static MappingPackage getPackage() {
return MappingPackage.eINSTANCE;
}
} //MappingFactoryImpl

440
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/MappingPackageImpl.java

@ -0,0 +1,440 @@ @@ -0,0 +1,440 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.impl;
import com.irtsaintexupery.pseim.mapping.CardinalityValue;
import com.irtsaintexupery.pseim.mapping.GraphElementMapping;
import com.irtsaintexupery.pseim.mapping.MappingFactory;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.PatternApplication;
import com.irtsaintexupery.pseim.mapping.PortMapping;
import com.irtsaintexupery.pseim.mapping.util.MappingValidator;
import com.irtsaintexupery.pseim.pseim.PseimPackage;
import com.irtsaintexupery.pseim.seim.SeimPackage;
import org.eclipse.emf.ecore.EAttribute;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EValidator;
import org.eclipse.emf.ecore.impl.EPackageImpl;
/**
* <!-- begin-user-doc -->
* An implementation of the model <b>Package</b>.
* <!-- end-user-doc -->
* @generated
*/
public class MappingPackageImpl extends EPackageImpl implements MappingPackage {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass patternApplicationEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass cardinalityValueEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass portMappingEClass = null;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private EClass graphElementMappingEClass = 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.
* <p>Note: the correct way to create the package is via the static
* factory method {@link #init init()}, which also performs
* initialization of the package, or returns the registered package,
* if one already exists.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.ecore.EPackage.Registry
* @see com.irtsaintexupery.pseim.mapping.MappingPackage#eNS_URI
* @see #init()
* @generated
*/
private MappingPackageImpl() {
super(eNS_URI, MappingFactory.eINSTANCE);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static boolean isInited = false;
/**
* Creates, registers, and initializes the <b>Package</b> for this model, and for any others upon which it depends.
*
* <p>This method is used to initialize {@link MappingPackage#eINSTANCE} when that field is accessed.
* Clients should not invoke it directly. Instead, they should simply access that field to obtain the package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #eNS_URI
* @see #createPackageContents()
* @see #initializePackageContents()
* @generated
*/
public static MappingPackage init() {
if (isInited) return (MappingPackage)EPackage.Registry.INSTANCE.getEPackage(MappingPackage.eNS_URI);
// Obtain or create and register package
MappingPackageImpl theMappingPackage = (MappingPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof MappingPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new MappingPackageImpl());
isInited = true;
// Initialize simple dependencies
PseimPackage.eINSTANCE.eClass();
SeimPackage.eINSTANCE.eClass();
// Create package meta-data objects
theMappingPackage.createPackageContents();
// Initialize created meta-data
theMappingPackage.initializePackageContents();
// Register package validator
EValidator.Registry.INSTANCE.put
(theMappingPackage,
new EValidator.Descriptor() {
public EValidator getEValidator() {
return MappingValidator.INSTANCE;
}
});
// Mark meta-data to indicate it can't be changed
theMappingPackage.freeze();
// Update the registry and return the package
EPackage.Registry.INSTANCE.put(MappingPackage.eNS_URI, theMappingPackage);
return theMappingPackage;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPatternApplication() {
return patternApplicationEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPatternApplication_CardinalityValues() {
return (EReference)patternApplicationEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPatternApplication_PortMapping() {
return (EReference)patternApplicationEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPatternApplication_Pattern() {
return (EReference)patternApplicationEClass.getEStructuralFeatures().get(2);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPatternApplication_ModelElement() {
return (EReference)patternApplicationEClass.getEStructuralFeatures().get(3);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPatternApplication_Model() {
return (EReference)patternApplicationEClass.getEStructuralFeatures().get(4);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getCardinalityValue() {
return cardinalityValueEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getCardinalityValue_CardinalityElement() {
return (EReference)cardinalityValueEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EAttribute getCardinalityValue_Value() {
return (EAttribute)cardinalityValueEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getPortMapping() {
return portMappingEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPortMapping_ModelPort() {
return (EReference)portMappingEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getPortMapping_PatternPort() {
return (EReference)portMappingEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EClass getGraphElementMapping() {
return graphElementMappingEClass;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getGraphElementMapping_ModelGraphElement() {
return (EReference)graphElementMappingEClass.getEStructuralFeatures().get(0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EReference getGraphElementMapping_PatternGraphElement() {
return (EReference)graphElementMappingEClass.getEStructuralFeatures().get(1);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingFactory getMappingFactory() {
return (MappingFactory)getEFactoryInstance();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isCreated = false;
/**
* Creates the meta-model objects for the package. This method is
* guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void createPackageContents() {
if (isCreated) return;
isCreated = true;
// Create classes and their features
patternApplicationEClass = createEClass(PATTERN_APPLICATION);
createEReference(patternApplicationEClass, PATTERN_APPLICATION__CARDINALITY_VALUES);
createEReference(patternApplicationEClass, PATTERN_APPLICATION__PORT_MAPPING);
createEReference(patternApplicationEClass, PATTERN_APPLICATION__PATTERN);
createEReference(patternApplicationEClass, PATTERN_APPLICATION__MODEL_ELEMENT);
createEReference(patternApplicationEClass, PATTERN_APPLICATION__MODEL);
cardinalityValueEClass = createEClass(CARDINALITY_VALUE);
createEReference(cardinalityValueEClass, CARDINALITY_VALUE__CARDINALITY_ELEMENT);
createEAttribute(cardinalityValueEClass, CARDINALITY_VALUE__VALUE);
portMappingEClass = createEClass(PORT_MAPPING);
createEReference(portMappingEClass, PORT_MAPPING__MODEL_PORT);
createEReference(portMappingEClass, PORT_MAPPING__PATTERN_PORT);
graphElementMappingEClass = createEClass(GRAPH_ELEMENT_MAPPING);
createEReference(graphElementMappingEClass, GRAPH_ELEMENT_MAPPING__MODEL_GRAPH_ELEMENT);
createEReference(graphElementMappingEClass, GRAPH_ELEMENT_MAPPING__PATTERN_GRAPH_ELEMENT);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private boolean isInitialized = false;
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) return;
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
PseimPackage thePseimPackage = (PseimPackage)EPackage.Registry.INSTANCE.getEPackage(PseimPackage.eNS_URI);
SeimPackage theSeimPackage = (SeimPackage)EPackage.Registry.INSTANCE.getEPackage(SeimPackage.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
// Initialize classes, features, and operations; add parameters
initEClass(patternApplicationEClass, PatternApplication.class, "PatternApplication", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getPatternApplication_CardinalityValues(), this.getCardinalityValue(), null, "cardinalityValues", null, 0, -1, PatternApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPatternApplication_PortMapping(), this.getPortMapping(), null, "portMapping", null, 0, -1, PatternApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPatternApplication_Pattern(), thePseimPackage.getPattern(), null, "pattern", null, 1, 1, PatternApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPatternApplication_ModelElement(), this.getGraphElementMapping(), null, "modelElement", null, 1, -1, PatternApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getPatternApplication_Model(), theSeimPackage.getModel(), null, "model", null, 1, 1, PatternApplication.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(cardinalityValueEClass, CardinalityValue.class, "CardinalityValue", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getCardinalityValue_CardinalityElement(), thePseimPackage.getCardinalityElement(), null, "cardinalityElement", null, 1, 1, CardinalityValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(getCardinalityValue_Value(), ecorePackage.getEInt(), "value", null, 1, 1, CardinalityValue.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(portMappingEClass, PortMapping.class, "PortMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getPortMapping_ModelPort(), theSeimPackage.getBorderElement(), null, "modelPort", null, 0, -1, PortMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getPortMapping_PatternPort(), theSeimPackage.getBorderElement(), null, "patternPort", null, 1, 1, PortMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(graphElementMappingEClass, GraphElementMapping.class, "GraphElementMapping", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getGraphElementMapping_ModelGraphElement(), theSeimPackage.getGraphElement(), null, "modelGraphElement", null, 0, -1, GraphElementMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getGraphElementMapping_PatternGraphElement(), theSeimPackage.getGraphElement(), null, "patternGraphElement", null, 1, 1, GraphElementMapping.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://www.eclipse.org/OCL/Import
createImportAnnotations();
// http://www.eclipse.org/emf/2002/Ecore
createEcoreAnnotations();
// http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot
createPivotAnnotations();
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/OCL/Import</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createImportAnnotations() {
String source = "http://www.eclipse.org/OCL/Import";
addAnnotation
(this,
source,
new String[] {
"ecore", "http://www.eclipse.org/emf/2002/Ecore",
"pseim", "pseim.ecore#/",
"seim", "seim.ecore#/"
});
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createEcoreAnnotations() {
String source = "http://www.eclipse.org/emf/2002/Ecore";
addAnnotation
(this,
source,
new String[] {
"invocationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
"settingDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
"validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot"
});
addAnnotation
(patternApplicationEClass,
source,
new String[] {
"constraints", "InvariantName"
});
}
/**
* Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot</b>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void createPivotAnnotations() {
String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot";
addAnnotation
(patternApplicationEClass,
source,
new String[] {
"InvariantName", "true"
});
}
} //MappingPackageImpl

352
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/PatternApplicationImpl.java

@ -0,0 +1,352 @@ @@ -0,0 +1,352 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.impl;
import com.irtsaintexupery.pseim.mapping.CardinalityValue;
import com.irtsaintexupery.pseim.mapping.GraphElementMapping;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.PatternApplication;
import com.irtsaintexupery.pseim.mapping.PortMapping;
import com.irtsaintexupery.pseim.pseim.Pattern;
import com.irtsaintexupery.pseim.seim.Model;
import java.util.Collection;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.NotificationChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectContainmentEList;
import org.eclipse.emf.ecore.util.InternalEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Pattern Application</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl#getCardinalityValues <em>Cardinality Values</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl#getPortMapping <em>Port Mapping</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl#getPattern <em>Pattern</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl#getModelElement <em>Model Element</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PatternApplicationImpl#getModel <em>Model</em>}</li>
* </ul>
*
* @generated
*/
public class PatternApplicationImpl extends MinimalEObjectImpl.Container implements PatternApplication {
/**
* The cached value of the '{@link #getCardinalityValues() <em>Cardinality Values</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getCardinalityValues()
* @generated
* @ordered
*/
protected EList<CardinalityValue> cardinalityValues;
/**
* The cached value of the '{@link #getPortMapping() <em>Port Mapping</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPortMapping()
* @generated
* @ordered
*/
protected EList<PortMapping> portMapping;
/**
* The cached value of the '{@link #getPattern() <em>Pattern</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPattern()
* @generated
* @ordered
*/
protected Pattern pattern;
/**
* The cached value of the '{@link #getModelElement() <em>Model Element</em>}' containment reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModelElement()
* @generated
* @ordered
*/
protected EList<GraphElementMapping> modelElement;
/**
* The cached value of the '{@link #getModel() <em>Model</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModel()
* @generated
* @ordered
*/
protected Model model;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PatternApplicationImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MappingPackage.Literals.PATTERN_APPLICATION;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<CardinalityValue> getCardinalityValues() {
if (cardinalityValues == null) {
cardinalityValues = new EObjectContainmentEList<CardinalityValue>(CardinalityValue.class, this, MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES);
}
return cardinalityValues;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<PortMapping> getPortMapping() {
if (portMapping == null) {
portMapping = new EObjectContainmentEList<PortMapping>(PortMapping.class, this, MappingPackage.PATTERN_APPLICATION__PORT_MAPPING);
}
return portMapping;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Pattern getPattern() {
if (pattern != null && pattern.eIsProxy()) {
InternalEObject oldPattern = (InternalEObject)pattern;
pattern = (Pattern)eResolveProxy(oldPattern);
if (pattern != oldPattern) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.PATTERN_APPLICATION__PATTERN, oldPattern, pattern));
}
}
return pattern;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Pattern basicGetPattern() {
return pattern;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPattern(Pattern newPattern) {
Pattern oldPattern = pattern;
pattern = newPattern;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.PATTERN_APPLICATION__PATTERN, oldPattern, pattern));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<GraphElementMapping> getModelElement() {
if (modelElement == null) {
modelElement = new EObjectContainmentEList<GraphElementMapping>(GraphElementMapping.class, this, MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT);
}
return modelElement;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Model getModel() {
if (model != null && model.eIsProxy()) {
InternalEObject oldModel = (InternalEObject)model;
model = (Model)eResolveProxy(oldModel);
if (model != oldModel) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.PATTERN_APPLICATION__MODEL, oldModel, model));
}
}
return model;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public Model basicGetModel() {
return model;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setModel(Model newModel) {
Model oldModel = model;
model = newModel;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.PATTERN_APPLICATION__MODEL, oldModel, model));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public NotificationChain eInverseRemove(InternalEObject otherEnd, int featureID, NotificationChain msgs) {
switch (featureID) {
case MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES:
return ((InternalEList<?>)getCardinalityValues()).basicRemove(otherEnd, msgs);
case MappingPackage.PATTERN_APPLICATION__PORT_MAPPING:
return ((InternalEList<?>)getPortMapping()).basicRemove(otherEnd, msgs);
case MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT:
return ((InternalEList<?>)getModelElement()).basicRemove(otherEnd, msgs);
}
return super.eInverseRemove(otherEnd, featureID, msgs);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES:
return getCardinalityValues();
case MappingPackage.PATTERN_APPLICATION__PORT_MAPPING:
return getPortMapping();
case MappingPackage.PATTERN_APPLICATION__PATTERN:
if (resolve) return getPattern();
return basicGetPattern();
case MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT:
return getModelElement();
case MappingPackage.PATTERN_APPLICATION__MODEL:
if (resolve) return getModel();
return basicGetModel();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES:
getCardinalityValues().clear();
getCardinalityValues().addAll((Collection<? extends CardinalityValue>)newValue);
return;
case MappingPackage.PATTERN_APPLICATION__PORT_MAPPING:
getPortMapping().clear();
getPortMapping().addAll((Collection<? extends PortMapping>)newValue);
return;
case MappingPackage.PATTERN_APPLICATION__PATTERN:
setPattern((Pattern)newValue);
return;
case MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT:
getModelElement().clear();
getModelElement().addAll((Collection<? extends GraphElementMapping>)newValue);
return;
case MappingPackage.PATTERN_APPLICATION__MODEL:
setModel((Model)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES:
getCardinalityValues().clear();
return;
case MappingPackage.PATTERN_APPLICATION__PORT_MAPPING:
getPortMapping().clear();
return;
case MappingPackage.PATTERN_APPLICATION__PATTERN:
setPattern((Pattern)null);
return;
case MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT:
getModelElement().clear();
return;
case MappingPackage.PATTERN_APPLICATION__MODEL:
setModel((Model)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MappingPackage.PATTERN_APPLICATION__CARDINALITY_VALUES:
return cardinalityValues != null && !cardinalityValues.isEmpty();
case MappingPackage.PATTERN_APPLICATION__PORT_MAPPING:
return portMapping != null && !portMapping.isEmpty();
case MappingPackage.PATTERN_APPLICATION__PATTERN:
return pattern != null;
case MappingPackage.PATTERN_APPLICATION__MODEL_ELEMENT:
return modelElement != null && !modelElement.isEmpty();
case MappingPackage.PATTERN_APPLICATION__MODEL:
return model != null;
}
return super.eIsSet(featureID);
}
} //PatternApplicationImpl

196
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/impl/PortMappingImpl.java

@ -0,0 +1,196 @@ @@ -0,0 +1,196 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.impl;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.PortMapping;
import com.irtsaintexupery.pseim.seim.BorderElement;
import java.util.Collection;
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.InternalEObject;
import org.eclipse.emf.ecore.impl.ENotificationImpl;
import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
import org.eclipse.emf.ecore.util.EObjectResolvingEList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Port Mapping</b></em>'.
* <!-- end-user-doc -->
* <p>
* The following features are implemented:
* </p>
* <ul>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PortMappingImpl#getModelPort <em>Model Port</em>}</li>
* <li>{@link com.irtsaintexupery.pseim.mapping.impl.PortMappingImpl#getPatternPort <em>Pattern Port</em>}</li>
* </ul>
*
* @generated
*/
public class PortMappingImpl extends MinimalEObjectImpl.Container implements PortMapping {
/**
* The cached value of the '{@link #getModelPort() <em>Model Port</em>}' reference list.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getModelPort()
* @generated
* @ordered
*/
protected EList<BorderElement> modelPort;
/**
* The cached value of the '{@link #getPatternPort() <em>Pattern Port</em>}' reference.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see #getPatternPort()
* @generated
* @ordered
*/
protected BorderElement patternPort;
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected PortMappingImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MappingPackage.Literals.PORT_MAPPING;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public EList<BorderElement> getModelPort() {
if (modelPort == null) {
modelPort = new EObjectResolvingEList<BorderElement>(BorderElement.class, this, MappingPackage.PORT_MAPPING__MODEL_PORT);
}
return modelPort;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BorderElement getPatternPort() {
if (patternPort != null && patternPort.eIsProxy()) {
InternalEObject oldPatternPort = (InternalEObject)patternPort;
patternPort = (BorderElement)eResolveProxy(oldPatternPort);
if (patternPort != oldPatternPort) {
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.RESOLVE, MappingPackage.PORT_MAPPING__PATTERN_PORT, oldPatternPort, patternPort));
}
}
return patternPort;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public BorderElement basicGetPatternPort() {
return patternPort;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void setPatternPort(BorderElement newPatternPort) {
BorderElement oldPatternPort = patternPort;
patternPort = newPatternPort;
if (eNotificationRequired())
eNotify(new ENotificationImpl(this, Notification.SET, MappingPackage.PORT_MAPPING__PATTERN_PORT, oldPatternPort, patternPort));
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object eGet(int featureID, boolean resolve, boolean coreType) {
switch (featureID) {
case MappingPackage.PORT_MAPPING__MODEL_PORT:
return getModelPort();
case MappingPackage.PORT_MAPPING__PATTERN_PORT:
if (resolve) return getPatternPort();
return basicGetPatternPort();
}
return super.eGet(featureID, resolve, coreType);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@SuppressWarnings("unchecked")
@Override
public void eSet(int featureID, Object newValue) {
switch (featureID) {
case MappingPackage.PORT_MAPPING__MODEL_PORT:
getModelPort().clear();
getModelPort().addAll((Collection<? extends BorderElement>)newValue);
return;
case MappingPackage.PORT_MAPPING__PATTERN_PORT:
setPatternPort((BorderElement)newValue);
return;
}
super.eSet(featureID, newValue);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void eUnset(int featureID) {
switch (featureID) {
case MappingPackage.PORT_MAPPING__MODEL_PORT:
getModelPort().clear();
return;
case MappingPackage.PORT_MAPPING__PATTERN_PORT:
setPatternPort((BorderElement)null);
return;
}
super.eUnset(featureID);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public boolean eIsSet(int featureID) {
switch (featureID) {
case MappingPackage.PORT_MAPPING__MODEL_PORT:
return modelPort != null && !modelPort.isEmpty();
case MappingPackage.PORT_MAPPING__PATTERN_PORT:
return patternPort != null;
}
return super.eIsSet(featureID);
}
} //PortMappingImpl

174
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/util/MappingAdapterFactory.java

@ -0,0 +1,174 @@ @@ -0,0 +1,174 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.util;
import com.irtsaintexupery.pseim.mapping.*;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notifier;
import org.eclipse.emf.common.notify.impl.AdapterFactoryImpl;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* The <b>Adapter Factory</b> for the model.
* It provides an adapter <code>createXXX</code> method for each class of the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.MappingPackage
* @generated
*/
public class MappingAdapterFactory extends AdapterFactoryImpl {
/**
* The cached model package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static MappingPackage modelPackage;
/**
* Creates an instance of the adapter factory.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingAdapterFactory() {
if (modelPackage == null) {
modelPackage = MappingPackage.eINSTANCE;
}
}
/**
* Returns whether this factory is applicable for the type of the object.
* <!-- begin-user-doc -->
* This implementation returns <code>true</code> if the object is either the model's package or is an instance object of the model.
* <!-- end-user-doc -->
* @return whether this factory is applicable for the type of the object.
* @generated
*/
@Override
public boolean isFactoryForType(Object object) {
if (object == modelPackage) {
return true;
}
if (object instanceof EObject) {
return ((EObject)object).eClass().getEPackage() == modelPackage;
}
return false;
}
/**
* The switch that delegates to the <code>createXXX</code> methods.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected MappingSwitch<Adapter> modelSwitch =
new MappingSwitch<Adapter>() {
@Override
public Adapter casePatternApplication(PatternApplication object) {
return createPatternApplicationAdapter();
}
@Override
public Adapter caseCardinalityValue(CardinalityValue object) {
return createCardinalityValueAdapter();
}
@Override
public Adapter casePortMapping(PortMapping object) {
return createPortMappingAdapter();
}
@Override
public Adapter caseGraphElementMapping(GraphElementMapping object) {
return createGraphElementMappingAdapter();
}
@Override
public Adapter defaultCase(EObject object) {
return createEObjectAdapter();
}
};
/**
* Creates an adapter for the <code>target</code>.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param target the object to adapt.
* @return the adapter for the <code>target</code>.
* @generated
*/
@Override
public Adapter createAdapter(Notifier target) {
return modelSwitch.doSwitch((EObject)target);
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.mapping.PatternApplication <em>Pattern Application</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 com.irtsaintexupery.pseim.mapping.PatternApplication
* @generated
*/
public Adapter createPatternApplicationAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.mapping.CardinalityValue <em>Cardinality Value</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 com.irtsaintexupery.pseim.mapping.CardinalityValue
* @generated
*/
public Adapter createCardinalityValueAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.mapping.PortMapping <em>Port Mapping</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 com.irtsaintexupery.pseim.mapping.PortMapping
* @generated
*/
public Adapter createPortMappingAdapter() {
return null;
}
/**
* Creates a new adapter for an object of class '{@link com.irtsaintexupery.pseim.mapping.GraphElementMapping <em>Graph Element Mapping</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 com.irtsaintexupery.pseim.mapping.GraphElementMapping
* @generated
*/
public Adapter createGraphElementMappingAdapter() {
return null;
}
/**
* Creates a new adapter for the default case.
* <!-- begin-user-doc -->
* This default implementation returns null.
* <!-- end-user-doc -->
* @return the new adapter.
* @generated
*/
public Adapter createEObjectAdapter() {
return null;
}
} //MappingAdapterFactory

173
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/util/MappingSwitch.java

@ -0,0 +1,173 @@ @@ -0,0 +1,173 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.util;
import com.irtsaintexupery.pseim.mapping.*;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.Switch;
/**
* <!-- begin-user-doc -->
* The <b>Switch</b> for the model's inheritance hierarchy.
* It supports the call {@link #doSwitch(EObject) doSwitch(object)}
* to invoke the <code>caseXXX</code> method for each class of the model,
* starting with the actual class of the object
* and proceeding up the inheritance hierarchy
* until a non-null result is returned,
* which is the result of the switch.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.MappingPackage
* @generated
*/
public class MappingSwitch<T> extends Switch<T> {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static MappingPackage modelPackage;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingSwitch() {
if (modelPackage == null) {
modelPackage = MappingPackage.eINSTANCE;
}
}
/**
* Checks whether this is a switch for the given package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @param ePackage the package in question.
* @return whether this is a switch for the given package.
* @generated
*/
@Override
protected boolean isSwitchFor(EPackage ePackage) {
return ePackage == modelPackage;
}
/**
* Calls <code>caseXXX</code> for each class of the model until one returns a non null result; it yields that result.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @return the first non-null result returned by a <code>caseXXX</code> call.
* @generated
*/
@Override
protected T doSwitch(int classifierID, EObject theEObject) {
switch (classifierID) {
case MappingPackage.PATTERN_APPLICATION: {
PatternApplication patternApplication = (PatternApplication)theEObject;
T result = casePatternApplication(patternApplication);
if (result == null) result = defaultCase(theEObject);
return result;
}
case MappingPackage.CARDINALITY_VALUE: {
CardinalityValue cardinalityValue = (CardinalityValue)theEObject;
T result = caseCardinalityValue(cardinalityValue);
if (result == null) result = defaultCase(theEObject);
return result;
}
case MappingPackage.PORT_MAPPING: {
PortMapping portMapping = (PortMapping)theEObject;
T result = casePortMapping(portMapping);
if (result == null) result = defaultCase(theEObject);
return result;
}
case MappingPackage.GRAPH_ELEMENT_MAPPING: {
GraphElementMapping graphElementMapping = (GraphElementMapping)theEObject;
T result = caseGraphElementMapping(graphElementMapping);
if (result == null) result = defaultCase(theEObject);
return result;
}
default: return defaultCase(theEObject);
}
}
/**
* Returns the result of interpreting the object as an instance of '<em>Pattern Application</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>Pattern Application</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePatternApplication(PatternApplication object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Cardinality Value</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>Cardinality Value</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseCardinalityValue(CardinalityValue object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Port Mapping</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>Port Mapping</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T casePortMapping(PortMapping object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>Graph Element Mapping</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>Graph Element Mapping</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
* @generated
*/
public T caseGraphElementMapping(GraphElementMapping object) {
return null;
}
/**
* Returns the result of interpreting the object as an instance of '<em>EObject</em>'.
* <!-- begin-user-doc -->
* This implementation returns null;
* returning a non-null result will terminate the switch, but this is the last case anyway.
* <!-- end-user-doc -->
* @param object the target of the switch.
* @return the result of interpreting the object as an instance of '<em>EObject</em>'.
* @see #doSwitch(org.eclipse.emf.ecore.EObject)
* @generated
*/
@Override
public T defaultCase(EObject object) {
return null;
}
} //MappingSwitch

240
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/mapping/util/MappingValidator.java

@ -0,0 +1,240 @@ @@ -0,0 +1,240 @@
/**
*/
package com.irtsaintexupery.pseim.mapping.util;
import java.util.Map;
import org.eclipse.emf.common.util.Diagnostic;
import org.eclipse.emf.common.util.DiagnosticChain;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.emf.ecore.util.EObjectValidator;
import com.irtsaintexupery.pseim.mapping.CardinalityValue;
import com.irtsaintexupery.pseim.mapping.GraphElementMapping;
import com.irtsaintexupery.pseim.mapping.MappingPackage;
import com.irtsaintexupery.pseim.mapping.PatternApplication;
import com.irtsaintexupery.pseim.mapping.PortMapping;
import com.irtsaintexupery.pseim.pseim.Pattern;
import com.irtsaintexupery.pseim.seim.*;
/**
* <!-- begin-user-doc -->
* The <b>Validator</b> for the model.
* <!-- end-user-doc -->
* @see com.irtsaintexupery.pseim.mapping.MappingPackage
* @generated
*/
public class MappingValidator extends EObjectValidator {
/**
* The cached model package
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public static final MappingValidator INSTANCE = new MappingValidator();
/**
* A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @see org.eclipse.emf.common.util.Diagnostic#getSource()
* @see org.eclipse.emf.common.util.Diagnostic#getCode()
* @generated
*/
public static final String DIAGNOSTIC_SOURCE = "com.irtsaintexupery.pseim.mapping";
/**
* A constant with a fixed name that can be used as the base value for additional hand written constants.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
/**
* A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
/**
* Creates an instance of the switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public MappingValidator() {
super();
}
/**
* Returns the package of this validator switch.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EPackage getEPackage() {
return MappingPackage.eINSTANCE;
}
/**
* Calls <code>validateXXX</code> for the corresponding classifier of the model.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context) {
switch (classifierID) {
case MappingPackage.PATTERN_APPLICATION:
return validatePatternApplication((PatternApplication)value, diagnostics, context);
case MappingPackage.CARDINALITY_VALUE:
return validateCardinalityValue((CardinalityValue)value, diagnostics, context);
case MappingPackage.PORT_MAPPING:
return validatePortMapping((PortMapping)value, diagnostics, context);
case MappingPackage.GRAPH_ELEMENT_MAPPING:
return validateGraphElementMapping((GraphElementMapping)value, diagnostics, context);
default:
return true;
}
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternApplication(PatternApplication patternApplication, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(patternApplication, diagnostics, context)) return false;
boolean result = validate_EveryMultiplicityConforms(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryDataValueConforms(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryReferenceIsContained(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryBidirectionalReferenceIsPaired(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryProxyResolves(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_UniqueID(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryKeyUnique(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validate_EveryMapEntryUnique(patternApplication, diagnostics, context);
if (result || diagnostics != null) result &= validatePatternApplication_InvariantName(patternApplication, diagnostics, context);
return result;
}
/**
* The cached validation expression for the InvariantName constraint of '<em>Pattern Application</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected static final String PATTERN_APPLICATION__INVARIANT_NAME__EEXPRESSION = "true";
/**
* Validates the InvariantName constraint of '<em>Pattern Application</em>'.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validatePatternApplication_InvariantName(PatternApplication patternApplication, DiagnosticChain diagnostics, Map<Object, Object> context) {
return
validate
(MappingPackage.Literals.PATTERN_APPLICATION,
patternApplication,
diagnostics,
context,
"http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot",
"InvariantName",
PATTERN_APPLICATION__INVARIANT_NAME__EEXPRESSION,
Diagnostic.ERROR,
DIAGNOSTIC_SOURCE,
0);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public boolean validateCardinalityValue(CardinalityValue cardinalityValue, DiagnosticChain diagnostics, Map<Object, Object> context) {
return validate_EveryDefaultConstraint(cardinalityValue, diagnostics, context);
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validatePortMapping(PortMapping portMapping, DiagnosticChain diagnostics, Map<Object, Object> context) {
Model matchedModel = ((PatternApplication)portMapping.eContainer()).getModel();
TreeIterator<EObject> itM = matchedModel.eAllContents();
EList<BorderElement> ports = portMapping.getModelPort();
while (itM.hasNext()) {
Element current = (Element) itM.next();
if (ports.contains(current)) {
ports.remove(current);
}
}
Pattern matchedPattern = ((PatternApplication)portMapping.eContainer()).getPattern();
TreeIterator<EObject> itP = matchedPattern.eAllContents();
boolean patternFound = false;
while (itP.hasNext()) {
if (itP.next().equals(portMapping.getPatternPort())) {
patternFound = true;
break;
}
}
if (patternFound && ports.isEmpty())
return validate_EveryDefaultConstraint(portMapping, diagnostics, context);
else
return false;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public boolean validateGraphElementMapping(GraphElementMapping graphElementMapping, DiagnosticChain diagnostics, Map<Object, Object> context) {
Model matchedModel = ((PatternApplication)graphElementMapping.eContainer()).getModel();
TreeIterator<EObject> itM = matchedModel.eAllContents();
EList<GraphElement> elements = graphElementMapping.getModelGraphElement();
while (itM.hasNext()) {
Element current = (Element) itM.next();
if (elements.contains(current)) {
elements.remove(current);
}
}
Pattern matchedPattern = ((PatternApplication)graphElementMapping.eContainer()).getPattern();
TreeIterator<EObject> itP = matchedPattern.eAllContents();
boolean patternFound = false;
while (itP.hasNext()) {
if (itP.next().equals(graphElementMapping.getPatternGraphElement())) {
patternFound = true;
break;
}
}
if (patternFound && elements.isEmpty())
return validate_EveryDefaultConstraint(graphElementMapping, diagnostics, context);
else
return false;
}
/**
* Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
// TODO
// Specialize this to return a resource locator for messages specific to this validator.
// Ensure that you remove @generated or mark it @generated NOT
return super.getResourceLocator();
}
} //MappingValidator

2
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/pseim/PatternLink.java

@ -29,7 +29,7 @@ import com.irtsaintexupery.pseim.seim.Link; @@ -29,7 +29,7 @@ import com.irtsaintexupery.pseim.seim.Link;
*
* @see com.irtsaintexupery.pseim.pseim.PseimPackage#getPatternLink()
* @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='srcIsPatternPort dstIsPatternPort'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot srcIsPatternPort='src.oclIsTypeOf(PatternLink)' dstIsPatternPort='dst.oclIsTypeOf(PatternLink)'"
* annotation="http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot srcIsPatternPort='src.oclIsTypeOf(PatternPort)' dstIsPatternPort='dst.oclIsTypeOf(PatternPort)'"
* @generated
*/
public interface PatternLink extends IdentifiedElement, Link {

4
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/pseim/impl/PseimPackageImpl.java

@ -787,8 +787,8 @@ public class PseimPackageImpl extends EPackageImpl implements PseimPackage { @@ -787,8 +787,8 @@ public class PseimPackageImpl extends EPackageImpl implements PseimPackage {
String source = "http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot";
addAnnotation(patternComponentEClass, source, new String[] { "contentIsPatternContent",
"content->forAll(c | c.oclIsTypeOf(PatternComponent) or c.oclIsTypeOf(PatternPort) or c.oclIsTypeOf(PatternLink))" });
addAnnotation(patternLinkEClass, source, new String[] { "srcIsPatternPort", "src.oclIsTypeOf(PatternLink)",
"dstIsPatternPort", "dst.oclIsTypeOf(PatternLink)" });
addAnnotation(patternLinkEClass, source, new String[] { "srcIsPatternPort", "src.oclIsTypeOf(PatternPort)",
"dstIsPatternPort", "dst.oclIsTypeOf(PatternPort)" });
addAnnotation(multiplicityElementEClass, source, new String[] { "cardinalityAsElementOrMult",
"(not (cardinalityElement.oclIsUndefined())) implies multiplicityValue = 1" });
}

4
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/pseim/util/PseimValidator.java

@ -370,7 +370,7 @@ public class PseimValidator extends EObjectValidator { @@ -370,7 +370,7 @@ public class PseimValidator extends EObjectValidator {
* <!-- end-user-doc -->
* @generated
*/
protected static final String PATTERN_LINK__SRC_IS_PATTERN_PORT__EEXPRESSION = "src.oclIsTypeOf(PatternLink)";
protected static final String PATTERN_LINK__SRC_IS_PATTERN_PORT__EEXPRESSION = "src.oclIsTypeOf(PatternPort)";
/**
* Validates the srcIsPatternPort constraint of '<em>Pattern Link</em>'.
@ -391,7 +391,7 @@ public class PseimValidator extends EObjectValidator { @@ -391,7 +391,7 @@ public class PseimValidator extends EObjectValidator {
* <!-- end-user-doc -->
* @generated
*/
protected static final String PATTERN_LINK__DST_IS_PATTERN_PORT__EEXPRESSION = "dst.oclIsTypeOf(PatternLink)";
protected static final String PATTERN_LINK__DST_IS_PATTERN_PORT__EEXPRESSION = "dst.oclIsTypeOf(PatternPort)";
/**
* Validates the dstIsPatternPort constraint of '<em>Pattern Link</em>'.

2
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/seim/NamedElement.java

@ -45,7 +45,7 @@ public interface NamedElement extends IdentifiedElement { @@ -45,7 +45,7 @@ public interface NamedElement extends IdentifiedElement {
* @return the value of the '<em>Name</em>' attribute.
* @see #setName(String)
* @see com.irtsaintexupery.pseim.seim.SeimPackage#getNamedElement_Name()
* @model required="true"
* @model
* @generated
*/
String getName();

2
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/seim/impl/SeimPackageImpl.java

@ -693,7 +693,7 @@ public class SeimPackageImpl extends EPackageImpl implements SeimPackage { @@ -693,7 +693,7 @@ public class SeimPackageImpl extends EPackageImpl implements SeimPackage {
initEClass(namedElementEClass, NamedElement.class, "NamedElement", IS_ABSTRACT, IS_INTERFACE,
IS_GENERATED_INSTANCE_CLASS);
initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 1, 1, NamedElement.class,
initEAttribute(getNamedElement_Name(), ecorePackage.getEString(), "name", null, 0, 1, NamedElement.class,
!IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(identifiedElementEClass, IdentifiedElement.class, "IdentifiedElement", IS_ABSTRACT, IS_INTERFACE,

12
eclipse/plugins/com.irtsaintexupery.pseim/src-gen/com/irtsaintexupery/pseim/seim/util/SeimValidator.java

@ -142,7 +142,7 @@ public class SeimValidator extends EObjectValidator { @@ -142,7 +142,7 @@ public class SeimValidator extends EObjectValidator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @generated NOT
*/
public boolean validateComponent(Component component, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(component, diagnostics, context))
@ -168,13 +168,15 @@ public class SeimValidator extends EObjectValidator { @@ -168,13 +168,15 @@ public class SeimValidator extends EObjectValidator {
result &= validateNamedElement_nameNotEmpty(component, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(component, diagnostics, context);
if (result || diagnostics != null)
result &= (component.getName() != null);
return result;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @generated NOT
*/
public boolean validatePort(Port port, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(port, diagnostics, context))
@ -200,6 +202,8 @@ public class SeimValidator extends EObjectValidator { @@ -200,6 +202,8 @@ public class SeimValidator extends EObjectValidator {
result &= validateNamedElement_nameNotEmpty(port, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(port, diagnostics, context);
if (result || diagnostics != null)
result &= (port.getName() != null);
return result;
}
@ -633,7 +637,7 @@ public class SeimValidator extends EObjectValidator { @@ -633,7 +637,7 @@ public class SeimValidator extends EObjectValidator {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
* @generated NOT
*/
public boolean validateModel(Model model, DiagnosticChain diagnostics, Map<Object, Object> context) {
if (!validate_NoCircularContainment(model, diagnostics, context))
@ -659,6 +663,8 @@ public class SeimValidator extends EObjectValidator { @@ -659,6 +663,8 @@ public class SeimValidator extends EObjectValidator {
result &= validateNamedElement_nameNotEmpty(model, diagnostics, context);
if (result || diagnostics != null)
result &= validatePropertyHolder_uniqueKeys(model, diagnostics, context);
if (result || diagnostics != null)
result &= (model.getName() != null);
return result;
}

Loading…
Cancel
Save