Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2014-01-21 17:01:59 +0000
committerptessier2014-01-21 17:01:59 +0000
commit51da1fb49916dae221cd3f5e8535b5e1f27e96bb (patch)
treeb8faf3920dcd7359772dc549ec267dd1402b2751 /deprecated
parent85bda5e2acba745151607913b433adc3dc3406d1 (diff)
downloadorg.eclipse.papyrus-51da1fb49916dae221cd3f5e8535b5e1f27e96bb.tar.gz
org.eclipse.papyrus-51da1fb49916dae221cd3f5e8535b5e1f27e96bb.tar.xz
org.eclipse.papyrus-51da1fb49916dae221cd3f5e8535b5e1f27e96bb.zip
386118: [EMF Facet] Papyrus should progressively support EMF Facet 0.2
https://bugs.eclipse.org/bugs/show_bug.cgi?id=386118
Diffstat (limited to 'deprecated')
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/META-INF/MANIFEST.MF19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/about.html106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/build.properties23
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.ecore70
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.genmodel32
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.pdoc12
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.properties13
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.xml26
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/EObjectFacetRepresentation.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetFactory.java80
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetPackage.java1324
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetSet.java80
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypeFacet.java72
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyElement.java91
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetAttribute.java32
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetReference.java32
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetFactoryImpl.java141
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetPackageImpl.java363
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetSetImpl.java477
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypeFacetImpl.java402
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyElementImpl.java435
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetAttributeImpl.java485
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetReferenceImpl.java485
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetAdapterFactory.java489
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetSwitch.java483
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF36
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties3
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/about.html106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties11
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc12
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml41
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet189
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java69
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java227
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java57
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java93
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java43
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties8
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java47
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java34
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java34
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java74
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java76
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java75
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java137
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java37
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java90
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java22
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java49
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java229
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java29
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java62
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java235
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java582
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java345
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java170
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/META-INF/MANIFEST.MF34
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/OSGI-INF/l10n/bundle.properties3
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/build.properties9
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/plugin.pdoc4
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/plugin.xml61
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/Activator.java67
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/dialog/ColumnsToShowDialog.java558
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/editor/AbstractUMLTableEditor.java38
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/factory/PapyrusTableInstanceCommandFactory.java58
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/PasteInTableHandler.java326
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectAdditionColumnsPopupUpHandler.java206
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectColumnsHandler.java1038
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/listener/ApplyProfileTriggerListener.java36
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/menu/ContributionFactory.java77
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/Messages.java90
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/messages.properties32
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractAdditionalContentsProvider.java56
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractPasteInTableCommandProvider.java187
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/EMFFacetColumnsProvider.java65
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/IPasteInTableCommandProvider.java83
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/PasteInPapyrusTableCommandProvider.java720
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/ProfileFacetSetProvider.java158
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/SortedFeaturesContentProvider.java209
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/UMLTablePropertyTester.java43
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/status/AbstractWarningPasteResultStatus.java172
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/status/PasteWarningStatus.java42
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/status/StereotypeApplicationErrorStatus.java52
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/status/UnresolvedReferenceErrorInPasteStatus.java61
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/utils/MultiValueContainer.java57
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/utils/ValueContainer.java99
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/widget/FilteredCheckboxTree.java456
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/META-INF/MANIFEST.MF27
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/build.properties13
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/icons/table.gifbin0 -> 965 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/icons/table.pngbin0 -> 1347 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/icons/table_UML_default.gifbin0 -> 891 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/icons/table_UML_default.pngbin0 -> 1245 bytes
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/plugin.properties12
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/plugin.xml102
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/resources/default.tableconfiguration24
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/src/org/eclipse/papyrus/uml/table/defaultt/Activator.java135
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/src/org/eclipse/papyrus/uml/table/defaultt/editor/DefaultNattableEditor.java49
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/src/org/eclipse/papyrus/uml/table/defaultt/factory/NattableEditorFactory.java39
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.default/src/org/eclipse/papyrus/uml/table/defaultt/handlers/CreateNattableEditorCommand.java60
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/META-INF/MANIFEST.MF31
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/about.html28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/build.properties7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/plugin.properties3
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/plugin.xml11
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/resources/umlCellEditors.modelcelleditors33
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/Activator.java73
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/composite/EnumComposite.java144
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/composite/EnumerationComposite.java91
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/composite/PapyrusEnumeratorComposite.java63
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/composite/UnaryReferencePapyrusCellEditorComposite.java330
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/BooleanCellEditor.java78
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/EnumerationLiteralCellEditor.java66
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/EnumeratorEditor.java85
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/IntCellEditor.java64
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/LiteralUnlimitedNaturalCellEditor.java65
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/NaryReferencePapyrusCellEditor.java143
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/StringMultiCellEditor.java77
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/editors/UnaryReferencePapyrusCellEditor.java128
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/utils/NoReferencedElement.java60
-rw-r--r--deprecated/org.eclipse.papyrus.uml.table.widgets.celleditors/src/org/eclipse/papyrus/uml/table/widget/celleditors/utils/StereotypePropertyFacetElementUtils.java70
-rw-r--r--deprecated/papyrus-main-features/org.eclipse.papyrus.uml.table.feature/.project17
-rw-r--r--deprecated/papyrus-main-features/org.eclipse.papyrus.uml.table.feature/build.properties6
-rw-r--r--deprecated/papyrus-main-features/org.eclipse.papyrus.uml.table.feature/epl-v10.html304
-rw-r--r--deprecated/papyrus-main-features/org.eclipse.papyrus.uml.table.feature/feature.properties139
-rw-r--r--deprecated/papyrus-main-features/org.eclipse.papyrus.uml.table.feature/feature.xml28
-rw-r--r--deprecated/papyrus-main-features/org.eclipse.papyrus.uml.table.feature/license.html108
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/.classpath7
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/.project28
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/META-INF/MANIFEST.MF23
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/OSGI-INF/l10n/bundle.properties3
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/about.html106
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/build.properties9
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/plugin.pdoc12
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/src/org/eclipse/papyrus/uml/profilefacet/generation/Activator.java69
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/src/org/eclipse/papyrus/uml/profilefacet/generation/factory/ProfileFacetGenericFactory.java453
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/src/org/eclipse/papyrus/uml/profilefacet/generation/messages/Messages.java43
-rw-r--r--deprecated/profilefacet/org.eclipse.papyrus.uml.profilefacet.generation/src/org/eclipse/papyrus/uml/profilefacet/generation/messages/messages.properties7
186 files changed, 18502 insertions, 0 deletions
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.classpath b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.classpath
new file mode 100644
index 00000000000..cedf0d0d0b5
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src-gen"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.project b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.project
new file mode 100644
index 00000000000..2065cc68951
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.profilefacet.metamodel</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..bb16adcd2dd
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/META-INF/MANIFEST.MF
@@ -0,0 +1,19 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet,
+ org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl,
+ org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.util
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.emf.facet.infra.facet;visibility:=reexport,
+ org.eclipse.emf.facet.infra.query;visibility:=reexport
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-ClassPath: .
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.profilefacet.metamodel;si
+ ngleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/about.html b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/about.html
new file mode 100644
index 00000000000..34ab520eed4
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/about.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/build.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/build.properties
new file mode 100644
index 00000000000..072b7359b96
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/build.properties
@@ -0,0 +1,23 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+
+bin.includes = .,\
+ model/,\
+ META-INF/,\
+ plugin.xml,\
+ plugin.properties,\
+ about.html,\
+ build.properties,\
+ plugin.pdoc
+jars.compile.order = .
+source.. = src-gen/
+output.. = bin/
+src.includes = about.html
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.ecore b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.ecore
new file mode 100644
index 00000000000..0788230c297
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.ecore
@@ -0,0 +1,70 @@
+<?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="profilefacet" nsURI="http://www.eclipse.org/papyrus/0.9/profilefacet"
+ nsPrefix="profilefacet">
+ <eClassifiers xsi:type="ecore:EClass" name="ProfileFacetSet" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EPackage #//EObjectFacetRepresentation platform:/plugin/org.eclipse.emf.facet.infra.facet/model/facet.ecore#//FacetSet">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="a 'ProfileFacetSet' is used to represent a UML Profile"/>
+ </eAnnotations>
+ <eOperations name="getStereotypeFacets" upperBound="-1" eType="#//StereotypeFacet"/>
+ <eOperations name="getSubProfileFacetSet" upperBound="-1" eType="#//ProfileFacetSet"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="profileQualifiedName" lowerBound="1"
+ eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="the qualified name of the represented profile"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="StereotypeFacet" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EClass #//EObjectFacetRepresentation platform:/plugin/org.eclipse.emf.facet.infra.facet/model/facet.ecore#//Facet">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="a 'StereotypeFacet' is used to represent a UML Stereotype"/>
+ </eAnnotations>
+ <eOperations name="getStereotypePropertyElements" upperBound="-1" eType="#//StereotypePropertyElement"/>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="stereotypeQualifiedName"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="the qualified name of the represented stereotype"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="StereotypePropertyElement" abstract="true"
+ eSuperTypes="#//EObjectFacetRepresentation platform:/plugin/org.eclipse.emf.facet.infra.facet/model/facet.ecore#//FacetStructuralFeature">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="the abstract type used to represent the properties of the stereotype"/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="propertyQualifiedName"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="the name of the represented property of stereotype"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="isDerived" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EBoolean"
+ defaultValueLiteral="false">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="indicates if the property is Derived. This property will probably used by a customization on the header of the columns (to add a '/' to the name column). &#xD;&#xA;We need it because if we have columns representing a stereotype property and if the concerning profile is not applied on the model, we won' be able to refind the real &#xD;&#xA;property to know if this property is derived or not."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="StereotypePropertyFacetReference" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EReference #//StereotypePropertyElement platform:/plugin/org.eclipse.emf.facet.infra.facet/model/facet.ecore#//FacetReference">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="a 'StereotypePropertyFacetReference is used to represent a property typed by an EObject"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="StereotypePropertyFacetAttribute" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EAttribute #//StereotypePropertyElement platform:/plugin/org.eclipse.emf.facet.infra.facet/model/facet.ecore#//FacetAttribute">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="a 'StereotypePropertyFacetReference is used to represent a property typed by a DataType, a PrimitiveType or an Enumeration"/>
+ </eAnnotations>
+ </eClassifiers>
+ <eClassifiers xsi:type="ecore:EClass" name="EObjectFacetRepresentation" abstract="true"
+ interface="true" eSuperTypes="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.ecore#//EObject">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="This element is used to store the XMI_ID of the represented element."/>
+ </eAnnotations>
+ <eStructuralFeatures xsi:type="ecore:EAttribute" name="representedElement_XMI_ID"
+ lowerBound="1" eType="ecore:EDataType http://www.eclipse.org/emf/2002/Ecore#//EString">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="The XMI_ID of the represented element."/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.genmodel b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.genmodel
new file mode 100644
index 00000000000..6d2dd2fc2de
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/model/profilefacet.genmodel
@@ -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" copyrightText="Copyright (c) 2012 CEA LIST.&#xD;&#xA;&#xD;&#xA; &#xD;&#xA;All rights reserved. This program and the accompanying materials&#xD;&#xA;are made available under the terms of the Eclipse Public License v1.0&#xD;&#xA;which accompanies this distribution, and is available at&#xD;&#xA;http://www.eclipse.org/legal/epl-v10.html&#xD;&#xA;&#xD;&#xA;Contributors:&#xD;&#xA; Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen" editDirectory="/org.eclipse.papyrus.uml.profilefacet.metamodel.edit/src-gen"
+ editorDirectory="/org.eclipse.papyrus.uml.profilefacet.metamodel.editor/src-gen"
+ modelPluginID="org.eclipse.papyrus.uml.profilefacet.metamodel" modelName="Profilefacet"
+ nonNLSMarkers="true" testsDirectory="/org.eclipse.papyrus.uml.profilefacet.metamodel.tests/src-gen"
+ importerID="org.eclipse.emf.importer.ecore" complianceLevel="5.0" copyrightFields="false"
+ language="" usedGenPackages="platform:/plugin/org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore platform:/plugin/org.eclipse.emf.facet.infra.facet/model/facet.genmodel#//facet platform:/plugin/org.eclipse.emf.facet.infra.query/model/query.genmodel#//query">
+ <foreignModel>profilefacet.ecore</foreignModel>
+ <genPackages prefix="ProfileFacet" basePackage="org.eclipse.papyrus.uml.profilefacet.metamodel"
+ disposableProviderFactory="true" ecorePackage="profilefacet.ecore#/">
+ <genClasses ecoreClass="profilefacet.ecore#//ProfileFacetSet">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute profilefacet.ecore#//ProfileFacetSet/profileQualifiedName"/>
+ <genOperations ecoreOperation="profilefacet.ecore#//ProfileFacetSet/getStereotypeFacets"/>
+ <genOperations ecoreOperation="profilefacet.ecore#//ProfileFacetSet/getSubProfileFacetSet"/>
+ </genClasses>
+ <genClasses ecoreClass="profilefacet.ecore#//StereotypeFacet">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute profilefacet.ecore#//StereotypeFacet/stereotypeQualifiedName"/>
+ <genOperations ecoreOperation="profilefacet.ecore#//StereotypeFacet/getStereotypePropertyElements"/>
+ </genClasses>
+ <genClasses image="false" ecoreClass="profilefacet.ecore#//StereotypePropertyElement">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute profilefacet.ecore#//StereotypePropertyElement/propertyQualifiedName"/>
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute profilefacet.ecore#//StereotypePropertyElement/isDerived"/>
+ </genClasses>
+ <genClasses ecoreClass="profilefacet.ecore#//StereotypePropertyFacetReference"/>
+ <genClasses ecoreClass="profilefacet.ecore#//StereotypePropertyFacetAttribute"/>
+ <genClasses image="false" ecoreClass="profilefacet.ecore#//EObjectFacetRepresentation">
+ <genFeatures createChild="false" ecoreFeature="ecore:EAttribute profilefacet.ecore#//EObjectFacetRepresentation/representedElement_XMI_ID"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.pdoc b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.pdoc
new file mode 100644
index 00000000000..b302b5b13b7
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.pdoc
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation"
+ description="This plugins provides the profilefacet metamodel. This metamodel adds useful information on the profile represented by the&#xD;&#xA;the FacetSet (ProfileFacetSet indeed)">
+ <referent
+ firstName="vincent"
+ lastName="lorenzo"
+ eMail="vincent.lorenzo@cea.fr"
+ currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.properties
new file mode 100644
index 00000000000..7115b05cbf4
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.properties
@@ -0,0 +1,13 @@
+# Copyright (c) 2012 CEA LIST.
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+
+pluginName = Profilefacet Model (Incubation)
+providerName = Eclipse Modeling Project
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.xml b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.xml
new file mode 100644
index 00000000000..9429e85b09e
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/plugin.xml
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.0"?>
+
+<!--
+ Copyright (c) 2012 CEA LIST.
+
+
+ All rights reserved. This program and the accompanying materials
+ are made available under the terms of the Eclipse Public License v1.0
+ which accompanies this distribution, and is available at
+ http://www.eclipse.org/legal/epl-v10.html
+
+ Contributors:
+ Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+-->
+
+<plugin>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <package
+ uri="http://www.eclipse.org/papyrus/0.9/profilefacet"
+ class="org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage"
+ genModel="model/profilefacet.genmodel"/>
+ </extension>
+
+</plugin>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/EObjectFacetRepresentation.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/EObjectFacetRepresentation.java
new file mode 100644
index 00000000000..1492367f4e2
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/EObjectFacetRepresentation.java
@@ -0,0 +1,64 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.ecore.EObject;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>EObject Facet Representation</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * This element is used to store the XMI_ID of the represented element.
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getEObjectFacetRepresentation()
+ * @model interface="true" abstract="true"
+ * @generated
+ */
+public interface EObjectFacetRepresentation extends EObject {
+
+ /**
+ * Returns the value of the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * The XMI_ID of the represented element.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Represented Element XMI ID</em>' attribute.
+ * @see #setRepresentedElement_XMI_ID(String)
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getEObjectFacetRepresentation_RepresentedElement_XMI_ID()
+ * @model required="true"
+ * @generated
+ */
+ String getRepresentedElement_XMI_ID();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Represented Element XMI ID</em>' attribute.
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ */
+ void setRepresentedElement_XMI_ID(String value);
+
+} // EObjectFacetRepresentation
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetFactory.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetFactory.java
new file mode 100644
index 00000000000..d76e525a093
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetFactory.java
@@ -0,0 +1,80 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+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 org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage
+ * @generated
+ */
+public interface ProfileFacetFactory extends EFactory {
+
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ProfileFacetFactory eINSTANCE = org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Set</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Set</em>'.
+ * @generated
+ */
+ ProfileFacetSet createProfileFacetSet();
+
+ /**
+ * Returns a new object of class '<em>Stereotype Facet</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Stereotype Facet</em>'.
+ * @generated
+ */
+ StereotypeFacet createStereotypeFacet();
+
+ /**
+ * Returns a new object of class '<em>Stereotype Property Facet Reference</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Stereotype Property Facet Reference</em>'.
+ * @generated
+ */
+ StereotypePropertyFacetReference createStereotypePropertyFacetReference();
+
+ /**
+ * Returns a new object of class '<em>Stereotype Property Facet Attribute</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return a new object of class '<em>Stereotype Property Facet Attribute</em>'.
+ * @generated
+ */
+ StereotypePropertyFacetAttribute createStereotypePropertyFacetAttribute();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ProfileFacetPackage getProfileFacetPackage();
+
+} //ProfileFacetFactory
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetPackage.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetPackage.java
new file mode 100644
index 00000000000..a5c1a43cee4
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetPackage.java
@@ -0,0 +1,1324 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+
+/**
+ * <!-- 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 enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetFactory
+ * @model kind="package"
+ * @generated
+ */
+public interface ProfileFacetPackage extends EPackage {
+
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNAME = "profilefacet"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/papyrus/0.9/profilefacet"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ String eNS_PREFIX = "profilefacet"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ ProfileFacetPackage eINSTANCE = org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl <em>Set</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getProfileFacetSet()
+ * @generated
+ */
+ int PROFILE_FACET_SET = 0;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__EANNOTATIONS = EcorePackage.EPACKAGE__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__NAME = EcorePackage.EPACKAGE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Ns URI</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__NS_URI = EcorePackage.EPACKAGE__NS_URI;
+
+ /**
+ * The feature id for the '<em><b>Ns Prefix</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__NS_PREFIX = EcorePackage.EPACKAGE__NS_PREFIX;
+
+ /**
+ * The feature id for the '<em><b>EFactory Instance</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__EFACTORY_INSTANCE = EcorePackage.EPACKAGE__EFACTORY_INSTANCE;
+
+ /**
+ * The feature id for the '<em><b>EClassifiers</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__ECLASSIFIERS = EcorePackage.EPACKAGE__ECLASSIFIERS;
+
+ /**
+ * The feature id for the '<em><b>ESubpackages</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__ESUBPACKAGES = EcorePackage.EPACKAGE__ESUBPACKAGES;
+
+ /**
+ * The feature id for the '<em><b>ESuper Package</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__ESUPER_PACKAGE = EcorePackage.EPACKAGE__ESUPER_PACKAGE;
+
+ /**
+ * The feature id for the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID = EcorePackage.EPACKAGE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Extended Package</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__EXTENDED_PACKAGE = EcorePackage.EPACKAGE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Facets</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__FACETS = EcorePackage.EPACKAGE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Profile Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME = EcorePackage.EPACKAGE_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Set</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int PROFILE_FACET_SET_FEATURE_COUNT = EcorePackage.EPACKAGE_FEATURE_COUNT + 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl <em>Stereotype Facet</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypeFacet()
+ * @generated
+ */
+ int STEREOTYPE_FACET = 1;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EANNOTATIONS = EcorePackage.ECLASS__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__NAME = EcorePackage.ECLASS__NAME;
+
+ /**
+ * The feature id for the '<em><b>Instance Class Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__INSTANCE_CLASS_NAME = EcorePackage.ECLASS__INSTANCE_CLASS_NAME;
+
+ /**
+ * The feature id for the '<em><b>Instance Class</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__INSTANCE_CLASS = EcorePackage.ECLASS__INSTANCE_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Default Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__DEFAULT_VALUE = EcorePackage.ECLASS__DEFAULT_VALUE;
+
+ /**
+ * The feature id for the '<em><b>Instance Type Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__INSTANCE_TYPE_NAME = EcorePackage.ECLASS__INSTANCE_TYPE_NAME;
+
+ /**
+ * The feature id for the '<em><b>EPackage</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EPACKAGE = EcorePackage.ECLASS__EPACKAGE;
+
+ /**
+ * The feature id for the '<em><b>EType Parameters</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__ETYPE_PARAMETERS = EcorePackage.ECLASS__ETYPE_PARAMETERS;
+
+ /**
+ * The feature id for the '<em><b>Abstract</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__ABSTRACT = EcorePackage.ECLASS__ABSTRACT;
+
+ /**
+ * The feature id for the '<em><b>Interface</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__INTERFACE = EcorePackage.ECLASS__INTERFACE;
+
+ /**
+ * The feature id for the '<em><b>ESuper Types</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__ESUPER_TYPES = EcorePackage.ECLASS__ESUPER_TYPES;
+
+ /**
+ * The feature id for the '<em><b>EOperations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EOPERATIONS = EcorePackage.ECLASS__EOPERATIONS;
+
+ /**
+ * The feature id for the '<em><b>EAll Attributes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_ATTRIBUTES = EcorePackage.ECLASS__EALL_ATTRIBUTES;
+
+ /**
+ * The feature id for the '<em><b>EAll References</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_REFERENCES = EcorePackage.ECLASS__EALL_REFERENCES;
+
+ /**
+ * The feature id for the '<em><b>EReferences</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EREFERENCES = EcorePackage.ECLASS__EREFERENCES;
+
+ /**
+ * The feature id for the '<em><b>EAttributes</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EATTRIBUTES = EcorePackage.ECLASS__EATTRIBUTES;
+
+ /**
+ * The feature id for the '<em><b>EAll Containments</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_CONTAINMENTS = EcorePackage.ECLASS__EALL_CONTAINMENTS;
+
+ /**
+ * The feature id for the '<em><b>EAll Operations</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_OPERATIONS = EcorePackage.ECLASS__EALL_OPERATIONS;
+
+ /**
+ * The feature id for the '<em><b>EAll Structural Features</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_STRUCTURAL_FEATURES = EcorePackage.ECLASS__EALL_STRUCTURAL_FEATURES;
+
+ /**
+ * The feature id for the '<em><b>EAll Super Types</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_SUPER_TYPES = EcorePackage.ECLASS__EALL_SUPER_TYPES;
+
+ /**
+ * The feature id for the '<em><b>EID Attribute</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EID_ATTRIBUTE = EcorePackage.ECLASS__EID_ATTRIBUTE;
+
+ /**
+ * The feature id for the '<em><b>EStructural Features</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__ESTRUCTURAL_FEATURES = EcorePackage.ECLASS__ESTRUCTURAL_FEATURES;
+
+ /**
+ * The feature id for the '<em><b>EGeneric Super Types</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EGENERIC_SUPER_TYPES = EcorePackage.ECLASS__EGENERIC_SUPER_TYPES;
+
+ /**
+ * The feature id for the '<em><b>EAll Generic Super Types</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__EALL_GENERIC_SUPER_TYPES = EcorePackage.ECLASS__EALL_GENERIC_SUPER_TYPES;
+
+ /**
+ * The feature id for the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID = EcorePackage.ECLASS_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Condition Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__CONDITION_QUERY = EcorePackage.ECLASS_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Facet Set</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__FACET_SET = EcorePackage.ECLASS_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Stereotype Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME = EcorePackage.ECLASS_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Stereotype Facet</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_FACET_FEATURE_COUNT = EcorePackage.ECLASS_FEATURE_COUNT + 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl <em>Stereotype Property Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypePropertyElement()
+ * @generated
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT = 2;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl <em>Stereotype Property Facet Reference</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypePropertyFacetReference()
+ * @generated
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE = 3;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl <em>Stereotype Property Facet Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypePropertyFacetAttribute()
+ * @generated
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE = 4;
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation <em>EObject Facet Representation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getEObjectFacetRepresentation()
+ * @generated
+ */
+ int EOBJECT_FACET_REPRESENTATION = 5;
+
+ /**
+ * The feature id for the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID = EcorePackage.EOBJECT_FEATURE_COUNT + 0;
+
+ /**
+ * The number of structural features of the '<em>EObject Facet Representation</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int EOBJECT_FACET_REPRESENTATION_FEATURE_COUNT = EcorePackage.EOBJECT_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT__REPRESENTED_ELEMENT_XMI_ID = EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID;
+
+ /**
+ * The feature id for the '<em><b>Value Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY = EOBJECT_FACET_REPRESENTATION_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Set Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY = EOBJECT_FACET_REPRESENTATION_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Property Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME = EOBJECT_FACET_REPRESENTATION_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Is Derived</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED = EOBJECT_FACET_REPRESENTATION_FEATURE_COUNT + 3;
+
+ /**
+ * The number of structural features of the '<em>Stereotype Property Element</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_ELEMENT_FEATURE_COUNT = EOBJECT_FACET_REPRESENTATION_FEATURE_COUNT + 4;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__EANNOTATIONS = EcorePackage.EREFERENCE__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__NAME = EcorePackage.EREFERENCE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Ordered</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__ORDERED = EcorePackage.EREFERENCE__ORDERED;
+
+ /**
+ * The feature id for the '<em><b>Unique</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__UNIQUE = EcorePackage.EREFERENCE__UNIQUE;
+
+ /**
+ * The feature id for the '<em><b>Lower Bound</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__LOWER_BOUND = EcorePackage.EREFERENCE__LOWER_BOUND;
+
+ /**
+ * The feature id for the '<em><b>Upper Bound</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__UPPER_BOUND = EcorePackage.EREFERENCE__UPPER_BOUND;
+
+ /**
+ * The feature id for the '<em><b>Many</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__MANY = EcorePackage.EREFERENCE__MANY;
+
+ /**
+ * The feature id for the '<em><b>Required</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__REQUIRED = EcorePackage.EREFERENCE__REQUIRED;
+
+ /**
+ * The feature id for the '<em><b>EType</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__ETYPE = EcorePackage.EREFERENCE__ETYPE;
+
+ /**
+ * The feature id for the '<em><b>EGeneric Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__EGENERIC_TYPE = EcorePackage.EREFERENCE__EGENERIC_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Changeable</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__CHANGEABLE = EcorePackage.EREFERENCE__CHANGEABLE;
+
+ /**
+ * The feature id for the '<em><b>Volatile</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__VOLATILE = EcorePackage.EREFERENCE__VOLATILE;
+
+ /**
+ * The feature id for the '<em><b>Transient</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__TRANSIENT = EcorePackage.EREFERENCE__TRANSIENT;
+
+ /**
+ * The feature id for the '<em><b>Default Value Literal</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__DEFAULT_VALUE_LITERAL = EcorePackage.EREFERENCE__DEFAULT_VALUE_LITERAL;
+
+ /**
+ * The feature id for the '<em><b>Default Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__DEFAULT_VALUE = EcorePackage.EREFERENCE__DEFAULT_VALUE;
+
+ /**
+ * The feature id for the '<em><b>Unsettable</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__UNSETTABLE = EcorePackage.EREFERENCE__UNSETTABLE;
+
+ /**
+ * The feature id for the '<em><b>Derived</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__DERIVED = EcorePackage.EREFERENCE__DERIVED;
+
+ /**
+ * The feature id for the '<em><b>EContaining Class</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__ECONTAINING_CLASS = EcorePackage.EREFERENCE__ECONTAINING_CLASS;
+
+ /**
+ * The feature id for the '<em><b>Containment</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__CONTAINMENT = EcorePackage.EREFERENCE__CONTAINMENT;
+
+ /**
+ * The feature id for the '<em><b>Container</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__CONTAINER = EcorePackage.EREFERENCE__CONTAINER;
+
+ /**
+ * The feature id for the '<em><b>Resolve Proxies</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__RESOLVE_PROXIES = EcorePackage.EREFERENCE__RESOLVE_PROXIES;
+
+ /**
+ * The feature id for the '<em><b>EOpposite</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__EOPPOSITE = EcorePackage.EREFERENCE__EOPPOSITE;
+
+ /**
+ * The feature id for the '<em><b>EReference Type</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__EREFERENCE_TYPE = EcorePackage.EREFERENCE__EREFERENCE_TYPE;
+
+ /**
+ * The feature id for the '<em><b>EKeys</b></em>' reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__EKEYS = EcorePackage.EREFERENCE__EKEYS;
+
+ /**
+ * The feature id for the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID = EcorePackage.EREFERENCE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Value Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY = EcorePackage.EREFERENCE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Set Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY = EcorePackage.EREFERENCE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Property Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME = EcorePackage.EREFERENCE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Is Derived</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED = EcorePackage.EREFERENCE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Stereotype Property Facet Reference</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_REFERENCE_FEATURE_COUNT = EcorePackage.EREFERENCE_FEATURE_COUNT + 5;
+
+ /**
+ * The feature id for the '<em><b>EAnnotations</b></em>' containment reference list.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__EANNOTATIONS = EcorePackage.EATTRIBUTE__EANNOTATIONS;
+
+ /**
+ * The feature id for the '<em><b>Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__NAME = EcorePackage.EATTRIBUTE__NAME;
+
+ /**
+ * The feature id for the '<em><b>Ordered</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__ORDERED = EcorePackage.EATTRIBUTE__ORDERED;
+
+ /**
+ * The feature id for the '<em><b>Unique</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__UNIQUE = EcorePackage.EATTRIBUTE__UNIQUE;
+
+ /**
+ * The feature id for the '<em><b>Lower Bound</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__LOWER_BOUND = EcorePackage.EATTRIBUTE__LOWER_BOUND;
+
+ /**
+ * The feature id for the '<em><b>Upper Bound</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__UPPER_BOUND = EcorePackage.EATTRIBUTE__UPPER_BOUND;
+
+ /**
+ * The feature id for the '<em><b>Many</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__MANY = EcorePackage.EATTRIBUTE__MANY;
+
+ /**
+ * The feature id for the '<em><b>Required</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REQUIRED = EcorePackage.EATTRIBUTE__REQUIRED;
+
+ /**
+ * The feature id for the '<em><b>EType</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__ETYPE = EcorePackage.EATTRIBUTE__ETYPE;
+
+ /**
+ * The feature id for the '<em><b>EGeneric Type</b></em>' containment reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__EGENERIC_TYPE = EcorePackage.EATTRIBUTE__EGENERIC_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Changeable</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__CHANGEABLE = EcorePackage.EATTRIBUTE__CHANGEABLE;
+
+ /**
+ * The feature id for the '<em><b>Volatile</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VOLATILE = EcorePackage.EATTRIBUTE__VOLATILE;
+
+ /**
+ * The feature id for the '<em><b>Transient</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__TRANSIENT = EcorePackage.EATTRIBUTE__TRANSIENT;
+
+ /**
+ * The feature id for the '<em><b>Default Value Literal</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__DEFAULT_VALUE_LITERAL = EcorePackage.EATTRIBUTE__DEFAULT_VALUE_LITERAL;
+
+ /**
+ * The feature id for the '<em><b>Default Value</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__DEFAULT_VALUE = EcorePackage.EATTRIBUTE__DEFAULT_VALUE;
+
+ /**
+ * The feature id for the '<em><b>Unsettable</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__UNSETTABLE = EcorePackage.EATTRIBUTE__UNSETTABLE;
+
+ /**
+ * The feature id for the '<em><b>Derived</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__DERIVED = EcorePackage.EATTRIBUTE__DERIVED;
+
+ /**
+ * The feature id for the '<em><b>EContaining Class</b></em>' container reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__ECONTAINING_CLASS = EcorePackage.EATTRIBUTE__ECONTAINING_CLASS;
+
+ /**
+ * The feature id for the '<em><b>ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__ID = EcorePackage.EATTRIBUTE__ID;
+
+ /**
+ * The feature id for the '<em><b>EAttribute Type</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__EATTRIBUTE_TYPE = EcorePackage.EATTRIBUTE__EATTRIBUTE_TYPE;
+
+ /**
+ * The feature id for the '<em><b>Represented Element XMI ID</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 0;
+
+ /**
+ * The feature id for the '<em><b>Value Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 1;
+
+ /**
+ * The feature id for the '<em><b>Set Query</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 2;
+
+ /**
+ * The feature id for the '<em><b>Property Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 3;
+
+ /**
+ * The feature id for the '<em><b>Is Derived</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 4;
+
+ /**
+ * The number of structural features of the '<em>Stereotype Property Facet Attribute</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ * @ordered
+ */
+ int STEREOTYPE_PROPERTY_FACET_ATTRIBUTE_FEATURE_COUNT = EcorePackage.EATTRIBUTE_FEATURE_COUNT + 5;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet <em>Set</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Set</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet
+ * @generated
+ */
+ EClass getProfileFacetSet();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet#getProfileQualifiedName <em>Profile Qualified Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Profile Qualified Name</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet#getProfileQualifiedName()
+ * @see #getProfileFacetSet()
+ * @generated
+ */
+ EAttribute getProfileFacetSet_ProfileQualifiedName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet <em>Stereotype Facet</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Stereotype Facet</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet
+ * @generated
+ */
+ EClass getStereotypeFacet();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Stereotype Qualified Name</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet#getStereotypeQualifiedName()
+ * @see #getStereotypeFacet()
+ * @generated
+ */
+ EAttribute getStereotypeFacet_StereotypeQualifiedName();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement <em>Stereotype Property Element</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Stereotype Property Element</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement
+ * @generated
+ */
+ EClass getStereotypePropertyElement();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#getPropertyQualifiedName <em>Property Qualified Name</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Property Qualified Name</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#getPropertyQualifiedName()
+ * @see #getStereotypePropertyElement()
+ * @generated
+ */
+ EAttribute getStereotypePropertyElement_PropertyQualifiedName();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#isIsDerived <em>Is Derived</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Is Derived</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#isIsDerived()
+ * @see #getStereotypePropertyElement()
+ * @generated
+ */
+ EAttribute getStereotypePropertyElement_IsDerived();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference <em>Stereotype Property Facet Reference</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Stereotype Property Facet Reference</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference
+ * @generated
+ */
+ EClass getStereotypePropertyFacetReference();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute <em>Stereotype Property Facet Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>Stereotype Property Facet Attribute</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute
+ * @generated
+ */
+ EClass getStereotypePropertyFacetAttribute();
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation <em>EObject Facet Representation</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for class '<em>EObject Facet Representation</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation
+ * @generated
+ */
+ EClass getEObjectFacetRepresentation();
+
+ /**
+ * Returns the meta object for the attribute '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @return the meta object for the attribute '<em>Represented Element XMI ID</em>'.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation#getRepresentedElement_XMI_ID()
+ * @see #getEObjectFacetRepresentation()
+ * @generated
+ */
+ EAttribute getEObjectFacetRepresentation_RepresentedElement_XMI_ID();
+
+ /**
+ * 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
+ */
+ ProfileFacetFactory getProfileFacetFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ interface Literals {
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl <em>Set</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getProfileFacetSet()
+ * @generated
+ */
+ EClass PROFILE_FACET_SET = eINSTANCE.getProfileFacetSet();
+
+ /**
+ * The meta object literal for the '<em><b>Profile Qualified Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME = eINSTANCE.getProfileFacetSet_ProfileQualifiedName();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl <em>Stereotype Facet</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypeFacet()
+ * @generated
+ */
+ EClass STEREOTYPE_FACET = eINSTANCE.getStereotypeFacet();
+
+ /**
+ * The meta object literal for the '<em><b>Stereotype Qualified Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME = eINSTANCE.getStereotypeFacet_StereotypeQualifiedName();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl <em>Stereotype Property Element</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypePropertyElement()
+ * @generated
+ */
+ EClass STEREOTYPE_PROPERTY_ELEMENT = eINSTANCE.getStereotypePropertyElement();
+
+ /**
+ * The meta object literal for the '<em><b>Property Qualified Name</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME = eINSTANCE.getStereotypePropertyElement_PropertyQualifiedName();
+
+ /**
+ * The meta object literal for the '<em><b>Is Derived</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED = eINSTANCE.getStereotypePropertyElement_IsDerived();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl <em>Stereotype Property Facet Reference</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypePropertyFacetReference()
+ * @generated
+ */
+ EClass STEREOTYPE_PROPERTY_FACET_REFERENCE = eINSTANCE.getStereotypePropertyFacetReference();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl <em>Stereotype Property Facet Attribute</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getStereotypePropertyFacetAttribute()
+ * @generated
+ */
+ EClass STEREOTYPE_PROPERTY_FACET_ATTRIBUTE = eINSTANCE.getStereotypePropertyFacetAttribute();
+
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation <em>EObject Facet Representation</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetPackageImpl#getEObjectFacetRepresentation()
+ * @generated
+ */
+ EClass EOBJECT_FACET_REPRESENTATION = eINSTANCE.getEObjectFacetRepresentation();
+
+ /**
+ * The meta object literal for the '<em><b>Represented Element XMI ID</b></em>' attribute feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ EAttribute EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID = eINSTANCE.getEObjectFacetRepresentation_RepresentedElement_XMI_ID();
+
+ }
+
+} //ProfileFacetPackage
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetSet.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetSet.java
new file mode 100644
index 00000000000..7da843f21aa
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/ProfileFacetSet.java
@@ -0,0 +1,80 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Profile Facet Set</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * a 'ProfileFacetSet' is used to represent a UML Profile
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet#getProfileQualifiedName <em>Profile Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getProfileFacetSet()
+ * @model
+ * @generated
+ */
+public interface ProfileFacetSet extends EPackage, EObjectFacetRepresentation, FacetSet {
+ /**
+ * Returns the value of the '<em><b>Profile Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * the qualified name of the represented profile
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Profile Qualified Name</em>' attribute.
+ * @see #setProfileQualifiedName(String)
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getProfileFacetSet_ProfileQualifiedName()
+ * @model required="true"
+ * @generated
+ */
+ String getProfileQualifiedName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet#getProfileQualifiedName <em>Profile Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Profile Qualified Name</em>' attribute.
+ * @see #getProfileQualifiedName()
+ * @generated
+ */
+ void setProfileQualifiedName(String value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<StereotypeFacet> getStereotypeFacets();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<ProfileFacetSet> getSubProfileFacetSet();
+
+} // ProfileFacetSet
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypeFacet.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypeFacet.java
new file mode 100644
index 00000000000..d8abfc7952d
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypeFacet.java
@@ -0,0 +1,72 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.facet.infra.facet.Facet;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Stereotype Facet</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * a 'StereotypeFacet' is used to represent a UML Stereotype
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypeFacet()
+ * @model
+ * @generated
+ */
+public interface StereotypeFacet extends EClass, EObjectFacetRepresentation, Facet {
+ /**
+ * Returns the value of the '<em><b>Stereotype Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * the qualified name of the represented stereotype
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Stereotype Qualified Name</em>' attribute.
+ * @see #setStereotypeQualifiedName(String)
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypeFacet_StereotypeQualifiedName()
+ * @model required="true"
+ * @generated
+ */
+ String getStereotypeQualifiedName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Stereotype Qualified Name</em>' attribute.
+ * @see #getStereotypeQualifiedName()
+ * @generated
+ */
+ void setStereotypeQualifiedName(String value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @model kind="operation"
+ * @generated
+ */
+ EList<StereotypePropertyElement> getStereotypePropertyElements();
+
+} // StereotypeFacet
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyElement.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyElement.java
new file mode 100644
index 00000000000..d9e284ab705
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyElement.java
@@ -0,0 +1,91 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Stereotype Property Element</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * the abstract type used to represent the properties of the stereotype
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#getPropertyQualifiedName <em>Property Qualified Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#isIsDerived <em>Is Derived</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypePropertyElement()
+ * @model abstract="true"
+ * @generated
+ */
+public interface StereotypePropertyElement extends EObjectFacetRepresentation, FacetStructuralFeature {
+ /**
+ * Returns the value of the '<em><b>Property Qualified Name</b></em>' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * the name of the represented property of stereotype
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Property Qualified Name</em>' attribute.
+ * @see #setPropertyQualifiedName(String)
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypePropertyElement_PropertyQualifiedName()
+ * @model required="true"
+ * @generated
+ */
+ String getPropertyQualifiedName();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#getPropertyQualifiedName <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Property Qualified Name</em>' attribute.
+ * @see #getPropertyQualifiedName()
+ * @generated
+ */
+ void setPropertyQualifiedName(String value);
+
+ /**
+ * Returns the value of the '<em><b>Is Derived</b></em>' attribute.
+ * The default value is <code>"false"</code>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * <!-- begin-model-doc -->
+ * indicates if the property is Derived. This property will probably used by a customization on the header of the columns (to add a '/' to the name column).
+ * We need it because if we have columns representing a stereotype property and if the concerning profile is not applied on the model, we won' be able to refind the real
+ * property to know if this property is derived or not.
+ * <!-- end-model-doc -->
+ * @return the value of the '<em>Is Derived</em>' attribute.
+ * @see #setIsDerived(boolean)
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypePropertyElement_IsDerived()
+ * @model default="false"
+ * @generated
+ */
+ boolean isIsDerived();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement#isIsDerived <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @param value the new value of the '<em>Is Derived</em>' attribute.
+ * @see #isIsDerived()
+ * @generated
+ */
+ void setIsDerived(boolean value);
+
+} // StereotypePropertyElement
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetAttribute.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetAttribute.java
new file mode 100644
index 00000000000..79101204f41
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetAttribute.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.facet.infra.facet.FacetAttribute;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Stereotype Property Facet Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * a 'StereotypePropertyFacetReference is used to represent a property typed by a DataType, a PrimitiveType or an Enumeration
+ * <!-- end-model-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypePropertyFacetAttribute()
+ * @model
+ * @generated
+ */
+public interface StereotypePropertyFacetAttribute extends EAttribute, StereotypePropertyElement, FacetAttribute {
+} // StereotypePropertyFacetAttribute
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetReference.java
new file mode 100644
index 00000000000..be33afc4371
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/StereotypePropertyFacetReference.java
@@ -0,0 +1,32 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.facet.infra.facet.FacetReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Stereotype Property Facet Reference</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * a 'StereotypePropertyFacetReference is used to represent a property typed by an EObject
+ * <!-- end-model-doc -->
+ *
+ *
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#getStereotypePropertyFacetReference()
+ * @model
+ * @generated
+ */
+public interface StereotypePropertyFacetReference extends EReference, StereotypePropertyElement, FacetReference {
+} // StereotypePropertyFacetReference
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetFactoryImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetFactoryImpl.java
new file mode 100644
index 00000000000..60fda9323de
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetFactoryImpl.java
@@ -0,0 +1,141 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+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;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetFactory;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProfileFacetFactoryImpl extends EFactoryImpl implements ProfileFacetFactory {
+
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public static ProfileFacetFactory init() {
+ try {
+ ProfileFacetFactory theProfileFacetFactory = (ProfileFacetFactory)EPackage.Registry.INSTANCE.getEFactory("http://www.eclipse.org/papyrus/0.9/profilefacet"); //$NON-NLS-1$
+ if (theProfileFacetFactory != null) {
+ return theProfileFacetFactory;
+ }
+ }
+ catch (Exception exception) {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ProfileFacetFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProfileFacetFactoryImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass) {
+ switch (eClass.getClassifierID()) {
+ case ProfileFacetPackage.PROFILE_FACET_SET: return createProfileFacetSet();
+ case ProfileFacetPackage.STEREOTYPE_FACET: return createStereotypeFacet();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE: return createStereotypePropertyFacetReference();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE: return createStereotypePropertyFacetAttribute();
+ default:
+ throw new IllegalArgumentException("The class '" + eClass.getName() + "' is not a valid classifier"); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProfileFacetSet createProfileFacetSet() {
+ ProfileFacetSetImpl profileFacetSet = new ProfileFacetSetImpl();
+ return profileFacetSet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StereotypeFacet createStereotypeFacet() {
+ StereotypeFacetImpl stereotypeFacet = new StereotypeFacetImpl();
+ return stereotypeFacet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StereotypePropertyFacetReference createStereotypePropertyFacetReference() {
+ StereotypePropertyFacetReferenceImpl stereotypePropertyFacetReference = new StereotypePropertyFacetReferenceImpl();
+ return stereotypePropertyFacetReference;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public StereotypePropertyFacetAttribute createStereotypePropertyFacetAttribute() {
+ StereotypePropertyFacetAttributeImpl stereotypePropertyFacetAttribute = new StereotypePropertyFacetAttributeImpl();
+ return stereotypePropertyFacetAttribute;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProfileFacetPackage getProfileFacetPackage() {
+ return (ProfileFacetPackage)getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ProfileFacetPackage getPackage() {
+ return ProfileFacetPackage.eINSTANCE;
+ }
+
+} //ProfileFacetFactoryImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetPackageImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetPackageImpl.java
new file mode 100644
index 00000000000..253ee7a226a
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetPackageImpl.java
@@ -0,0 +1,363 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.facet.infra.facet.FacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetFactory;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ * @generated
+ */
+public class ProfileFacetPackageImpl extends EPackageImpl implements ProfileFacetPackage {
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass profileFacetSetEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stereotypeFacetEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stereotypePropertyElementEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stereotypePropertyFacetReferenceEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass stereotypePropertyFacetAttributeEClass = null;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ private EClass eObjectFacetRepresentationEClass = 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 org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ProfileFacetPackageImpl() {
+ super(eNS_URI, ProfileFacetFactory.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 ProfileFacetPackage#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 ProfileFacetPackage init() {
+ if (isInited) return (ProfileFacetPackage)EPackage.Registry.INSTANCE.getEPackage(ProfileFacetPackage.eNS_URI);
+
+ // Obtain or create and register package
+ ProfileFacetPackageImpl theProfileFacetPackage = (ProfileFacetPackageImpl)(EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ProfileFacetPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI) : new ProfileFacetPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ FacetPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theProfileFacetPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theProfileFacetPackage.initializePackageContents();
+
+ // Mark meta-data to indicate it can't be changed
+ theProfileFacetPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ProfileFacetPackage.eNS_URI, theProfileFacetPackage);
+ return theProfileFacetPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getProfileFacetSet() {
+ return profileFacetSetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getProfileFacetSet_ProfileQualifiedName() {
+ return (EAttribute)profileFacetSetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStereotypeFacet() {
+ return stereotypeFacetEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getStereotypeFacet_StereotypeQualifiedName() {
+ return (EAttribute)stereotypeFacetEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStereotypePropertyElement() {
+ return stereotypePropertyElementEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getStereotypePropertyElement_PropertyQualifiedName() {
+ return (EAttribute)stereotypePropertyElementEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getStereotypePropertyElement_IsDerived() {
+ return (EAttribute)stereotypePropertyElementEClass.getEStructuralFeatures().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStereotypePropertyFacetReference() {
+ return stereotypePropertyFacetReferenceEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getStereotypePropertyFacetAttribute() {
+ return stereotypePropertyFacetAttributeEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EClass getEObjectFacetRepresentation() {
+ return eObjectFacetRepresentationEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public EAttribute getEObjectFacetRepresentation_RepresentedElement_XMI_ID() {
+ return (EAttribute)eObjectFacetRepresentationEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProfileFacetFactory getProfileFacetFactory() {
+ return (ProfileFacetFactory)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
+ profileFacetSetEClass = createEClass(PROFILE_FACET_SET);
+ createEAttribute(profileFacetSetEClass, PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME);
+
+ stereotypeFacetEClass = createEClass(STEREOTYPE_FACET);
+ createEAttribute(stereotypeFacetEClass, STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME);
+
+ stereotypePropertyElementEClass = createEClass(STEREOTYPE_PROPERTY_ELEMENT);
+ createEAttribute(stereotypePropertyElementEClass, STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME);
+ createEAttribute(stereotypePropertyElementEClass, STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED);
+
+ stereotypePropertyFacetReferenceEClass = createEClass(STEREOTYPE_PROPERTY_FACET_REFERENCE);
+
+ stereotypePropertyFacetAttributeEClass = createEClass(STEREOTYPE_PROPERTY_FACET_ATTRIBUTE);
+
+ eObjectFacetRepresentationEClass = createEClass(EOBJECT_FACET_REPRESENTATION);
+ createEAttribute(eObjectFacetRepresentationEClass, EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID);
+ }
+
+ /**
+ * <!-- 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
+ EcorePackage theEcorePackage = (EcorePackage)EPackage.Registry.INSTANCE.getEPackage(EcorePackage.eNS_URI);
+ FacetPackage theFacetPackage = (FacetPackage)EPackage.Registry.INSTANCE.getEPackage(FacetPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+ profileFacetSetEClass.getESuperTypes().add(theEcorePackage.getEPackage());
+ profileFacetSetEClass.getESuperTypes().add(this.getEObjectFacetRepresentation());
+ profileFacetSetEClass.getESuperTypes().add(theFacetPackage.getFacetSet());
+ stereotypeFacetEClass.getESuperTypes().add(theEcorePackage.getEClass());
+ stereotypeFacetEClass.getESuperTypes().add(this.getEObjectFacetRepresentation());
+ stereotypeFacetEClass.getESuperTypes().add(theFacetPackage.getFacet());
+ stereotypePropertyElementEClass.getESuperTypes().add(this.getEObjectFacetRepresentation());
+ stereotypePropertyElementEClass.getESuperTypes().add(theFacetPackage.getFacetStructuralFeature());
+ stereotypePropertyFacetReferenceEClass.getESuperTypes().add(theEcorePackage.getEReference());
+ stereotypePropertyFacetReferenceEClass.getESuperTypes().add(this.getStereotypePropertyElement());
+ stereotypePropertyFacetReferenceEClass.getESuperTypes().add(theFacetPackage.getFacetReference());
+ stereotypePropertyFacetAttributeEClass.getESuperTypes().add(theEcorePackage.getEAttribute());
+ stereotypePropertyFacetAttributeEClass.getESuperTypes().add(this.getStereotypePropertyElement());
+ stereotypePropertyFacetAttributeEClass.getESuperTypes().add(theFacetPackage.getFacetAttribute());
+ eObjectFacetRepresentationEClass.getESuperTypes().add(theEcorePackage.getEObject());
+
+ // Initialize classes and features; add operations and parameters
+ initEClass(profileFacetSetEClass, ProfileFacetSet.class, "ProfileFacetSet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getProfileFacetSet_ProfileQualifiedName(), ecorePackage.getEString(), "profileQualifiedName", null, 1, 1, ProfileFacetSet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(profileFacetSetEClass, this.getStereotypeFacet(), "getStereotypeFacets", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(profileFacetSetEClass, this.getProfileFacetSet(), "getSubProfileFacetSet", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(stereotypeFacetEClass, StereotypeFacet.class, "StereotypeFacet", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getStereotypeFacet_StereotypeQualifiedName(), ecorePackage.getEString(), "stereotypeQualifiedName", null, 1, 1, StereotypeFacet.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ addEOperation(stereotypeFacetEClass, this.getStereotypePropertyElement(), "getStereotypePropertyElements", 0, -1, IS_UNIQUE, IS_ORDERED); //$NON-NLS-1$
+
+ initEClass(stereotypePropertyElementEClass, StereotypePropertyElement.class, "StereotypePropertyElement", IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getStereotypePropertyElement_PropertyQualifiedName(), ecorePackage.getEString(), "propertyQualifiedName", null, 1, 1, StereotypePropertyElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+ initEAttribute(getStereotypePropertyElement_IsDerived(), ecorePackage.getEBoolean(), "isDerived", "false", 0, 1, StereotypePropertyElement.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$ //$NON-NLS-2$
+
+ initEClass(stereotypePropertyFacetReferenceEClass, StereotypePropertyFacetReference.class, "StereotypePropertyFacetReference", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(stereotypePropertyFacetAttributeEClass, StereotypePropertyFacetAttribute.class, "StereotypePropertyFacetAttribute", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+
+ initEClass(eObjectFacetRepresentationEClass, EObjectFacetRepresentation.class, "EObjectFacetRepresentation", IS_ABSTRACT, IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEAttribute(getEObjectFacetRepresentation_RepresentedElement_XMI_ID(), ecorePackage.getEString(), "representedElement_XMI_ID", null, 1, 1, EObjectFacetRepresentation.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+ }
+
+} //ProfileFacetPackageImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetSetImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetSetImpl.java
new file mode 100644
index 00000000000..006cc119066
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/ProfileFacetSetImpl.java
@@ -0,0 +1,477 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.emf.ecore.util.EcoreEList;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetPackage;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Profile Facet Set</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl#getRepresentedElement_XMI_ID <em>Represented
+ * Element XMI ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl#getExtendedPackage <em>Extended Package</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl#getFacets <em>Facets</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.ProfileFacetSetImpl#getProfileQualifiedName <em>Profile Qualified Name
+ * </em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ProfileFacetSetImpl extends EPackageImpl implements ProfileFacetSet {
+
+ /**
+ * The default value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected static final String REPRESENTED_ELEMENT_XMI_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected String representedElement_XMI_ID = REPRESENTED_ELEMENT_XMI_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getExtendedPackage() <em>Extended Package</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getExtendedPackage()
+ * @generated
+ * @ordered
+ */
+ protected EPackage extendedPackage;
+
+ /**
+ * The default value of the '{@link #getProfileQualifiedName() <em>Profile Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getProfileQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String PROFILE_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getProfileQualifiedName() <em>Profile Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getProfileQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String profileQualifiedName = PROFILE_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ProfileFacetSetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProfileFacetPackage.Literals.PROFILE_FACET_SET;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getRepresentedElement_XMI_ID() {
+ return representedElement_XMI_ID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setRepresentedElement_XMI_ID(String newRepresentedElement_XMI_ID) {
+ String oldRepresentedElement_XMI_ID = representedElement_XMI_ID;
+ representedElement_XMI_ID = newRepresentedElement_XMI_ID;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID, oldRepresentedElement_XMI_ID, representedElement_XMI_ID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EPackage getExtendedPackage() {
+ if(extendedPackage != null && extendedPackage.eIsProxy()) {
+ InternalEObject oldExtendedPackage = (InternalEObject)extendedPackage;
+ extendedPackage = (EPackage)eResolveProxy(oldExtendedPackage);
+ if(extendedPackage != oldExtendedPackage) {
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE, oldExtendedPackage, extendedPackage));
+ }
+ }
+ return extendedPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public EPackage basicGetExtendedPackage() {
+ return extendedPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setExtendedPackage(EPackage newExtendedPackage) {
+ EPackage oldExtendedPackage = extendedPackage;
+ extendedPackage = newExtendedPackage;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE, oldExtendedPackage, extendedPackage));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public EList<Facet> getFacets() {
+ // DONE: implement this method to return the 'Facets' reference list
+ // Ensure that you remove @generated or mark it @generated NOT
+ // The list is expected to implement org.eclipse.emf.ecore.util.InternalEList and org.eclipse.emf.ecore.EStructuralFeature.Setting
+ // so it's likely that an appropriate subclass of org.eclipse.emf.ecore.util.EcoreEList should be used.
+ // throw new UnsupportedOperationException();
+ List<Facet> facets = new ArrayList<Facet>();
+ for(EClassifier eClassifier : getEClassifiers()) {
+ if(eClassifier instanceof Facet) {
+ facets.add((Facet)eClassifier);
+ }
+ }
+ return new EcoreEList.UnmodifiableEList<Facet>(this, FacetPackage.eINSTANCE.getFacetSet_Facets(), facets.size(), facets.toArray()) {
+
+ private static final long serialVersionUID = 1L;
+
+ @Override
+ public void addUnique(final int index, final Facet object) {
+ // FIXME hack: FacetSets saved with an older version of the
+ // metamodel have a non-derived facets reference.
+ // So, overload this method to not throw an exception in order
+ // to let the XMI parser create the model anyway
+ }
+ };
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public String getProfileQualifiedName() {
+ return profileQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public void setProfileQualifiedName(String newProfileQualifiedName) {
+ String oldProfileQualifiedName = profileQualifiedName;
+ profileQualifiedName = newProfileQualifiedName;
+ if(eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME, oldProfileQualifiedName, profileQualifiedName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ * FIXME write JUnit test
+ */
+ public EList<StereotypeFacet> getStereotypeFacets() {
+ final EList<StereotypeFacet> facets = new BasicEList<StereotypeFacet>();
+ for(final Facet current : getFacets()) {
+ if(current instanceof StereotypeFacet) {
+ facets.add((StereotypeFacet)current);
+ }
+ }
+ return ECollections.unmodifiableEList(facets);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ * FIXME write JUnit test
+ */
+ public EList<ProfileFacetSet> getSubProfileFacetSet() {
+ final EList<ProfileFacetSet> facets = new BasicEList<ProfileFacetSet>();
+ for(final EPackage current : getESubpackages()) {
+ if(current instanceof ProfileFacetSet) {
+ facets.add((ProfileFacetSet)current);
+ }
+ }
+ return ECollections.unmodifiableEList(facets);
+ }
+
+ /**
+ * <!-- begin-user-doc --> <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public Facet getFacet(final String name) {
+ EClassifier eClassifier = getEClassifier(name);
+ if(eClassifier instanceof Facet) {
+ return (Facet)eClassifier;
+ }
+ return null;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch(featureID) {
+ case ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID:
+ return getRepresentedElement_XMI_ID();
+ case ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE:
+ if(resolve)
+ return getExtendedPackage();
+ return basicGetExtendedPackage();
+ case ProfileFacetPackage.PROFILE_FACET_SET__FACETS:
+ return getFacets();
+ case ProfileFacetPackage.PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME:
+ return getProfileQualifiedName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch(featureID) {
+ case ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID((String)newValue);
+ return;
+ case ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE:
+ setExtendedPackage((EPackage)newValue);
+ return;
+ case ProfileFacetPackage.PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME:
+ setProfileQualifiedName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch(featureID) {
+ case ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID(REPRESENTED_ELEMENT_XMI_ID_EDEFAULT);
+ return;
+ case ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE:
+ setExtendedPackage((EPackage)null);
+ return;
+ case ProfileFacetPackage.PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME:
+ setProfileQualifiedName(PROFILE_QUALIFIED_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch(featureID) {
+ case ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID:
+ return REPRESENTED_ELEMENT_XMI_ID_EDEFAULT == null ? representedElement_XMI_ID != null : !REPRESENTED_ELEMENT_XMI_ID_EDEFAULT.equals(representedElement_XMI_ID);
+ case ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE:
+ return extendedPackage != null;
+ case ProfileFacetPackage.PROFILE_FACET_SET__FACETS:
+ return !getFacets().isEmpty();
+ case ProfileFacetPackage.PROFILE_FACET_SET__PROFILE_QUALIFIED_NAME:
+ return PROFILE_QUALIFIED_NAME_EDEFAULT == null ? profileQualifiedName != null : !PROFILE_QUALIFIED_NAME_EDEFAULT.equals(profileQualifiedName);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if(baseClass == EObject.class) {
+ switch(derivedFeatureID) {
+ default:
+ return -1;
+ }
+ }
+ if(baseClass == EObjectFacetRepresentation.class) {
+ switch(derivedFeatureID) {
+ case ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID:
+ return ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID;
+ default:
+ return -1;
+ }
+ }
+ if(baseClass == FacetSet.class) {
+ switch(derivedFeatureID) {
+ case ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE:
+ return FacetPackage.FACET_SET__EXTENDED_PACKAGE;
+ case ProfileFacetPackage.PROFILE_FACET_SET__FACETS:
+ return FacetPackage.FACET_SET__FACETS;
+ default:
+ return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if(baseClass == EObject.class) {
+ switch(baseFeatureID) {
+ default:
+ return -1;
+ }
+ }
+ if(baseClass == EObjectFacetRepresentation.class) {
+ switch(baseFeatureID) {
+ case ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID:
+ return ProfileFacetPackage.PROFILE_FACET_SET__REPRESENTED_ELEMENT_XMI_ID;
+ default:
+ return -1;
+ }
+ }
+ if(baseClass == FacetSet.class) {
+ switch(baseFeatureID) {
+ case FacetPackage.FACET_SET__EXTENDED_PACKAGE:
+ return ProfileFacetPackage.PROFILE_FACET_SET__EXTENDED_PACKAGE;
+ case FacetPackage.FACET_SET__FACETS:
+ return ProfileFacetPackage.PROFILE_FACET_SET__FACETS;
+ default:
+ return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if(eIsProxy())
+ return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (representedElement_XMI_ID: "); //$NON-NLS-1$
+ result.append(representedElement_XMI_ID);
+ result.append(", profileQualifiedName: "); //$NON-NLS-1$
+ result.append(profileQualifiedName);
+ result.append(')');
+ return result.toString();
+ }
+
+} //ProfileFacetSetImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypeFacetImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypeFacetImpl.java
new file mode 100644
index 00000000000..94939c180d3
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypeFacetImpl.java
@@ -0,0 +1,402 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EClassImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetPackage;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Stereotype Facet</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl#getConditionQuery <em>Condition Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl#getFacetSet <em>Facet Set</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypeFacetImpl#getStereotypeQualifiedName <em>Stereotype Qualified Name</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StereotypeFacetImpl extends EClassImpl implements StereotypeFacet {
+ /**
+ * The default value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected static final String REPRESENTED_ELEMENT_XMI_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected String representedElement_XMI_ID = REPRESENTED_ELEMENT_XMI_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getConditionQuery() <em>Condition Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getConditionQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery conditionQuery;
+
+ /**
+ * The default value of the '{@link #getStereotypeQualifiedName() <em>Stereotype Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStereotypeQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String STEREOTYPE_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getStereotypeQualifiedName() <em>Stereotype Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getStereotypeQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String stereotypeQualifiedName = STEREOTYPE_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StereotypeFacetImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProfileFacetPackage.Literals.STEREOTYPE_FACET;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getRepresentedElement_XMI_ID() {
+ return representedElement_XMI_ID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRepresentedElement_XMI_ID(String newRepresentedElement_XMI_ID) {
+ String oldRepresentedElement_XMI_ID = representedElement_XMI_ID;
+ representedElement_XMI_ID = newRepresentedElement_XMI_ID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID, oldRepresentedElement_XMI_ID, representedElement_XMI_ID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getConditionQuery() {
+ if (conditionQuery != null && conditionQuery.eIsProxy()) {
+ InternalEObject oldConditionQuery = (InternalEObject)conditionQuery;
+ conditionQuery = (ModelQuery)eResolveProxy(oldConditionQuery);
+ if (conditionQuery != oldConditionQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY, oldConditionQuery, conditionQuery));
+ }
+ }
+ return conditionQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetConditionQuery() {
+ return conditionQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setConditionQuery(ModelQuery newConditionQuery) {
+ ModelQuery oldConditionQuery = conditionQuery;
+ conditionQuery = newConditionQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY, oldConditionQuery, conditionQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public FacetSet getFacetSet() {
+ FacetSet facetSet = basicGetFacetSet();
+ return facetSet != null && facetSet.eIsProxy() ? (FacetSet)eResolveProxy((InternalEObject)facetSet) : facetSet;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated NOT
+ */
+ public FacetSet basicGetFacetSet() {
+ FacetSet result = null;
+ if (this.getEPackage() instanceof FacetSet) {
+ result = (FacetSet) this.getEPackage();
+ }
+ return result;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getStereotypeQualifiedName() {
+ return stereotypeQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setStereotypeQualifiedName(String newStereotypeQualifiedName) {
+ String oldStereotypeQualifiedName = stereotypeQualifiedName;
+ stereotypeQualifiedName = newStereotypeQualifiedName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME, oldStereotypeQualifiedName, stereotypeQualifiedName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ * FIXME : write JUnit test
+ */
+ public EList<StereotypePropertyElement> getStereotypePropertyElements() {
+ final EList<StereotypePropertyElement> proeprties = new BasicEList<StereotypePropertyElement>();
+ for(final EStructuralFeature current : getEAttributes()) {
+ if(current instanceof StereotypePropertyElement) {
+ proeprties.add((StereotypePropertyElement)current);
+ }
+ }
+ for(final EStructuralFeature current : getEReferences()) {
+ if(current instanceof StereotypePropertyElement) {
+ proeprties.add((StereotypePropertyElement)current);
+ }
+ }
+ return ECollections.unmodifiableEList(proeprties);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID:
+ return getRepresentedElement_XMI_ID();
+ case ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY:
+ if (resolve) return getConditionQuery();
+ return basicGetConditionQuery();
+ case ProfileFacetPackage.STEREOTYPE_FACET__FACET_SET:
+ if (resolve) return getFacetSet();
+ return basicGetFacetSet();
+ case ProfileFacetPackage.STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME:
+ return getStereotypeQualifiedName();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY:
+ setConditionQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME:
+ setStereotypeQualifiedName((String)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID(REPRESENTED_ELEMENT_XMI_ID_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY:
+ setConditionQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME:
+ setStereotypeQualifiedName(STEREOTYPE_QUALIFIED_NAME_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID:
+ return REPRESENTED_ELEMENT_XMI_ID_EDEFAULT == null ? representedElement_XMI_ID != null : !REPRESENTED_ELEMENT_XMI_ID_EDEFAULT.equals(representedElement_XMI_ID);
+ case ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY:
+ return conditionQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_FACET__FACET_SET:
+ return basicGetFacetSet() != null;
+ case ProfileFacetPackage.STEREOTYPE_FACET__STEREOTYPE_QUALIFIED_NAME:
+ return STEREOTYPE_QUALIFIED_NAME_EDEFAULT == null ? stereotypeQualifiedName != null : !STEREOTYPE_QUALIFIED_NAME_EDEFAULT.equals(stereotypeQualifiedName);
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == EObject.class) {
+ switch (derivedFeatureID) {
+ default: return -1;
+ }
+ }
+ if (baseClass == EObjectFacetRepresentation.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID: return ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID;
+ default: return -1;
+ }
+ }
+ if (baseClass == Facet.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY: return FacetPackage.FACET__CONDITION_QUERY;
+ case ProfileFacetPackage.STEREOTYPE_FACET__FACET_SET: return FacetPackage.FACET__FACET_SET;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == EObject.class) {
+ switch (baseFeatureID) {
+ default: return -1;
+ }
+ }
+ if (baseClass == EObjectFacetRepresentation.class) {
+ switch (baseFeatureID) {
+ case ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID: return ProfileFacetPackage.STEREOTYPE_FACET__REPRESENTED_ELEMENT_XMI_ID;
+ default: return -1;
+ }
+ }
+ if (baseClass == Facet.class) {
+ switch (baseFeatureID) {
+ case FacetPackage.FACET__CONDITION_QUERY: return ProfileFacetPackage.STEREOTYPE_FACET__CONDITION_QUERY;
+ case FacetPackage.FACET__FACET_SET: return ProfileFacetPackage.STEREOTYPE_FACET__FACET_SET;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (representedElement_XMI_ID: "); //$NON-NLS-1$
+ result.append(representedElement_XMI_ID);
+ result.append(", stereotypeQualifiedName: "); //$NON-NLS-1$
+ result.append(stereotypeQualifiedName);
+ result.append(')');
+ return result.toString();
+ }
+
+} //StereotypeFacetImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyElementImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyElementImpl.java
new file mode 100644
index 00000000000..72f386fa7a5
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyElementImpl.java
@@ -0,0 +1,435 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EObjectImpl;
+import org.eclipse.emf.facet.infra.facet.FacetPackage;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Stereotype Property Element</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl#getValueQuery <em>Value Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl#getSetQuery <em>Set Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl#getPropertyQualifiedName <em>Property Qualified Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyElementImpl#isIsDerived <em>Is Derived</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public abstract class StereotypePropertyElementImpl extends EObjectImpl implements StereotypePropertyElement {
+ /**
+ * The default value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected static final String REPRESENTED_ELEMENT_XMI_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected String representedElement_XMI_ID = REPRESENTED_ELEMENT_XMI_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getValueQuery() <em>Value Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValueQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery valueQuery;
+
+ /**
+ * The cached value of the '{@link #getSetQuery() <em>Set Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSetQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery setQuery;
+
+ /**
+ * The default value of the '{@link #getPropertyQualifiedName() <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPropertyQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String PROPERTY_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPropertyQualifiedName() <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPropertyQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String propertyQualifiedName = PROPERTY_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIsDerived()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_DERIVED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIsDerived()
+ * @generated
+ * @ordered
+ */
+ protected boolean isDerived = IS_DERIVED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StereotypePropertyElementImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProfileFacetPackage.Literals.STEREOTYPE_PROPERTY_ELEMENT;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getRepresentedElement_XMI_ID() {
+ return representedElement_XMI_ID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRepresentedElement_XMI_ID(String newRepresentedElement_XMI_ID) {
+ String oldRepresentedElement_XMI_ID = representedElement_XMI_ID;
+ representedElement_XMI_ID = newRepresentedElement_XMI_ID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__REPRESENTED_ELEMENT_XMI_ID, oldRepresentedElement_XMI_ID, representedElement_XMI_ID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getValueQuery() {
+ if (valueQuery != null && valueQuery.eIsProxy()) {
+ InternalEObject oldValueQuery = (InternalEObject)valueQuery;
+ valueQuery = (ModelQuery)eResolveProxy(oldValueQuery);
+ if (valueQuery != oldValueQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY, oldValueQuery, valueQuery));
+ }
+ }
+ return valueQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetValueQuery() {
+ return valueQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValueQuery(ModelQuery newValueQuery) {
+ ModelQuery oldValueQuery = valueQuery;
+ valueQuery = newValueQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY, oldValueQuery, valueQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getSetQuery() {
+ if (setQuery != null && setQuery.eIsProxy()) {
+ InternalEObject oldSetQuery = (InternalEObject)setQuery;
+ setQuery = (ModelQuery)eResolveProxy(oldSetQuery);
+ if (setQuery != oldSetQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY, oldSetQuery, setQuery));
+ }
+ }
+ return setQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetSetQuery() {
+ return setQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSetQuery(ModelQuery newSetQuery) {
+ ModelQuery oldSetQuery = setQuery;
+ setQuery = newSetQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY, oldSetQuery, setQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPropertyQualifiedName() {
+ return propertyQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPropertyQualifiedName(String newPropertyQualifiedName) {
+ String oldPropertyQualifiedName = propertyQualifiedName;
+ propertyQualifiedName = newPropertyQualifiedName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME, oldPropertyQualifiedName, propertyQualifiedName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isIsDerived() {
+ return isDerived;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIsDerived(boolean newIsDerived) {
+ boolean oldIsDerived = isDerived;
+ isDerived = newIsDerived;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED, oldIsDerived, isDerived));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__REPRESENTED_ELEMENT_XMI_ID:
+ return getRepresentedElement_XMI_ID();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY:
+ if (resolve) return getValueQuery();
+ return basicGetValueQuery();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY:
+ if (resolve) return getSetQuery();
+ return basicGetSetQuery();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME:
+ return getPropertyQualifiedName();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED:
+ return isIsDerived();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY:
+ setValueQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY:
+ setSetQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME:
+ setPropertyQualifiedName((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED:
+ setIsDerived((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID(REPRESENTED_ELEMENT_XMI_ID_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY:
+ setValueQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY:
+ setSetQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME:
+ setPropertyQualifiedName(PROPERTY_QUALIFIED_NAME_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED:
+ setIsDerived(IS_DERIVED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__REPRESENTED_ELEMENT_XMI_ID:
+ return REPRESENTED_ELEMENT_XMI_ID_EDEFAULT == null ? representedElement_XMI_ID != null : !REPRESENTED_ELEMENT_XMI_ID_EDEFAULT.equals(representedElement_XMI_ID);
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY:
+ return valueQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY:
+ return setQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME:
+ return PROPERTY_QUALIFIED_NAME_EDEFAULT == null ? propertyQualifiedName != null : !PROPERTY_QUALIFIED_NAME_EDEFAULT.equals(propertyQualifiedName);
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED:
+ return isDerived != IS_DERIVED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == FacetStructuralFeature.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY: return FacetPackage.FACET_STRUCTURAL_FEATURE__VALUE_QUERY;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY: return FacetPackage.FACET_STRUCTURAL_FEATURE__SET_QUERY;
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == FacetStructuralFeature.class) {
+ switch (baseFeatureID) {
+ case FacetPackage.FACET_STRUCTURAL_FEATURE__VALUE_QUERY: return ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__VALUE_QUERY;
+ case FacetPackage.FACET_STRUCTURAL_FEATURE__SET_QUERY: return ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__SET_QUERY;
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (representedElement_XMI_ID: "); //$NON-NLS-1$
+ result.append(representedElement_XMI_ID);
+ result.append(", propertyQualifiedName: "); //$NON-NLS-1$
+ result.append(propertyQualifiedName);
+ result.append(", isDerived: "); //$NON-NLS-1$
+ result.append(isDerived);
+ result.append(')');
+ return result.toString();
+ }
+
+} //StereotypePropertyElementImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetAttributeImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetAttributeImpl.java
new file mode 100644
index 00000000000..27628dca9fb
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetAttributeImpl.java
@@ -0,0 +1,485 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.EAttributeImpl;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.facet.infra.facet.FacetAttribute;
+import org.eclipse.emf.facet.infra.facet.FacetPackage;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Stereotype Property Facet Attribute</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl#getValueQuery <em>Value Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl#getSetQuery <em>Set Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl#getPropertyQualifiedName <em>Property Qualified Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetAttributeImpl#isIsDerived <em>Is Derived</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StereotypePropertyFacetAttributeImpl extends EAttributeImpl implements StereotypePropertyFacetAttribute {
+ /**
+ * The default value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected static final String REPRESENTED_ELEMENT_XMI_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected String representedElement_XMI_ID = REPRESENTED_ELEMENT_XMI_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getValueQuery() <em>Value Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValueQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery valueQuery;
+
+ /**
+ * The cached value of the '{@link #getSetQuery() <em>Set Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSetQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery setQuery;
+
+ /**
+ * The default value of the '{@link #getPropertyQualifiedName() <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPropertyQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String PROPERTY_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPropertyQualifiedName() <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPropertyQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String propertyQualifiedName = PROPERTY_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIsDerived()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_DERIVED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIsDerived()
+ * @generated
+ * @ordered
+ */
+ protected boolean isDerived = IS_DERIVED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StereotypePropertyFacetAttributeImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProfileFacetPackage.Literals.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getRepresentedElement_XMI_ID() {
+ return representedElement_XMI_ID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRepresentedElement_XMI_ID(String newRepresentedElement_XMI_ID) {
+ String oldRepresentedElement_XMI_ID = representedElement_XMI_ID;
+ representedElement_XMI_ID = newRepresentedElement_XMI_ID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID, oldRepresentedElement_XMI_ID, representedElement_XMI_ID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getValueQuery() {
+ if (valueQuery != null && valueQuery.eIsProxy()) {
+ InternalEObject oldValueQuery = (InternalEObject)valueQuery;
+ valueQuery = (ModelQuery)eResolveProxy(oldValueQuery);
+ if (valueQuery != oldValueQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY, oldValueQuery, valueQuery));
+ }
+ }
+ return valueQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetValueQuery() {
+ return valueQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValueQuery(ModelQuery newValueQuery) {
+ ModelQuery oldValueQuery = valueQuery;
+ valueQuery = newValueQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY, oldValueQuery, valueQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getSetQuery() {
+ if (setQuery != null && setQuery.eIsProxy()) {
+ InternalEObject oldSetQuery = (InternalEObject)setQuery;
+ setQuery = (ModelQuery)eResolveProxy(oldSetQuery);
+ if (setQuery != oldSetQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY, oldSetQuery, setQuery));
+ }
+ }
+ return setQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetSetQuery() {
+ return setQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSetQuery(ModelQuery newSetQuery) {
+ ModelQuery oldSetQuery = setQuery;
+ setQuery = newSetQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY, oldSetQuery, setQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPropertyQualifiedName() {
+ return propertyQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPropertyQualifiedName(String newPropertyQualifiedName) {
+ String oldPropertyQualifiedName = propertyQualifiedName;
+ propertyQualifiedName = newPropertyQualifiedName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME, oldPropertyQualifiedName, propertyQualifiedName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isIsDerived() {
+ return isDerived;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIsDerived(boolean newIsDerived) {
+ boolean oldIsDerived = isDerived;
+ isDerived = newIsDerived;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED, oldIsDerived, isDerived));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID:
+ return getRepresentedElement_XMI_ID();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY:
+ if (resolve) return getValueQuery();
+ return basicGetValueQuery();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY:
+ if (resolve) return getSetQuery();
+ return basicGetSetQuery();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME:
+ return getPropertyQualifiedName();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED:
+ return isIsDerived();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY:
+ setValueQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY:
+ setSetQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME:
+ setPropertyQualifiedName((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED:
+ setIsDerived((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID(REPRESENTED_ELEMENT_XMI_ID_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY:
+ setValueQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY:
+ setSetQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME:
+ setPropertyQualifiedName(PROPERTY_QUALIFIED_NAME_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED:
+ setIsDerived(IS_DERIVED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID:
+ return REPRESENTED_ELEMENT_XMI_ID_EDEFAULT == null ? representedElement_XMI_ID != null : !REPRESENTED_ELEMENT_XMI_ID_EDEFAULT.equals(representedElement_XMI_ID);
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY:
+ return valueQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY:
+ return setQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME:
+ return PROPERTY_QUALIFIED_NAME_EDEFAULT == null ? propertyQualifiedName != null : !PROPERTY_QUALIFIED_NAME_EDEFAULT.equals(propertyQualifiedName);
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED:
+ return isDerived != IS_DERIVED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == EObject.class) {
+ switch (derivedFeatureID) {
+ default: return -1;
+ }
+ }
+ if (baseClass == EObjectFacetRepresentation.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID: return ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetStructuralFeature.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY: return FacetPackage.FACET_STRUCTURAL_FEATURE__VALUE_QUERY;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY: return FacetPackage.FACET_STRUCTURAL_FEATURE__SET_QUERY;
+ default: return -1;
+ }
+ }
+ if (baseClass == StereotypePropertyElement.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME: return ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED: return ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetAttribute.class) {
+ switch (derivedFeatureID) {
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == EObject.class) {
+ switch (baseFeatureID) {
+ default: return -1;
+ }
+ }
+ if (baseClass == EObjectFacetRepresentation.class) {
+ switch (baseFeatureID) {
+ case ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__REPRESENTED_ELEMENT_XMI_ID;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetStructuralFeature.class) {
+ switch (baseFeatureID) {
+ case FacetPackage.FACET_STRUCTURAL_FEATURE__VALUE_QUERY: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__VALUE_QUERY;
+ case FacetPackage.FACET_STRUCTURAL_FEATURE__SET_QUERY: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__SET_QUERY;
+ default: return -1;
+ }
+ }
+ if (baseClass == StereotypePropertyElement.class) {
+ switch (baseFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__PROPERTY_QUALIFIED_NAME;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE__IS_DERIVED;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetAttribute.class) {
+ switch (baseFeatureID) {
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (representedElement_XMI_ID: "); //$NON-NLS-1$
+ result.append(representedElement_XMI_ID);
+ result.append(", propertyQualifiedName: "); //$NON-NLS-1$
+ result.append(propertyQualifiedName);
+ result.append(", isDerived: "); //$NON-NLS-1$
+ result.append(isDerived);
+ result.append(')');
+ return result.toString();
+ }
+
+} //StereotypePropertyFacetAttributeImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetReferenceImpl.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetReferenceImpl.java
new file mode 100644
index 00000000000..0c7ffd6a3cf
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/impl/StereotypePropertyFacetReferenceImpl.java
@@ -0,0 +1,485 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.EReferenceImpl;
+import org.eclipse.emf.facet.infra.facet.FacetPackage;
+import org.eclipse.emf.facet.infra.facet.FacetReference;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Stereotype Property Facet Reference</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl#getRepresentedElement_XMI_ID <em>Represented Element XMI ID</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl#getValueQuery <em>Value Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl#getSetQuery <em>Set Query</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl#getPropertyQualifiedName <em>Property Qualified Name</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.impl.StereotypePropertyFacetReferenceImpl#isIsDerived <em>Is Derived</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class StereotypePropertyFacetReferenceImpl extends EReferenceImpl implements StereotypePropertyFacetReference {
+ /**
+ * The default value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected static final String REPRESENTED_ELEMENT_XMI_ID_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getRepresentedElement_XMI_ID() <em>Represented Element XMI ID</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getRepresentedElement_XMI_ID()
+ * @generated
+ * @ordered
+ */
+ protected String representedElement_XMI_ID = REPRESENTED_ELEMENT_XMI_ID_EDEFAULT;
+
+ /**
+ * The cached value of the '{@link #getValueQuery() <em>Value Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getValueQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery valueQuery;
+
+ /**
+ * The cached value of the '{@link #getSetQuery() <em>Set Query</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getSetQuery()
+ * @generated
+ * @ordered
+ */
+ protected ModelQuery setQuery;
+
+ /**
+ * The default value of the '{@link #getPropertyQualifiedName() <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPropertyQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected static final String PROPERTY_QUALIFIED_NAME_EDEFAULT = null;
+
+ /**
+ * The cached value of the '{@link #getPropertyQualifiedName() <em>Property Qualified Name</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #getPropertyQualifiedName()
+ * @generated
+ * @ordered
+ */
+ protected String propertyQualifiedName = PROPERTY_QUALIFIED_NAME_EDEFAULT;
+
+ /**
+ * The default value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIsDerived()
+ * @generated
+ * @ordered
+ */
+ protected static final boolean IS_DERIVED_EDEFAULT = false;
+
+ /**
+ * The cached value of the '{@link #isIsDerived() <em>Is Derived</em>}' attribute.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #isIsDerived()
+ * @generated
+ * @ordered
+ */
+ protected boolean isDerived = IS_DERIVED_EDEFAULT;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected StereotypePropertyFacetReferenceImpl() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass() {
+ return ProfileFacetPackage.Literals.STEREOTYPE_PROPERTY_FACET_REFERENCE;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getRepresentedElement_XMI_ID() {
+ return representedElement_XMI_ID;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setRepresentedElement_XMI_ID(String newRepresentedElement_XMI_ID) {
+ String oldRepresentedElement_XMI_ID = representedElement_XMI_ID;
+ representedElement_XMI_ID = newRepresentedElement_XMI_ID;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID, oldRepresentedElement_XMI_ID, representedElement_XMI_ID));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getValueQuery() {
+ if (valueQuery != null && valueQuery.eIsProxy()) {
+ InternalEObject oldValueQuery = (InternalEObject)valueQuery;
+ valueQuery = (ModelQuery)eResolveProxy(oldValueQuery);
+ if (valueQuery != oldValueQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY, oldValueQuery, valueQuery));
+ }
+ }
+ return valueQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetValueQuery() {
+ return valueQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setValueQuery(ModelQuery newValueQuery) {
+ ModelQuery oldValueQuery = valueQuery;
+ valueQuery = newValueQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY, oldValueQuery, valueQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery getSetQuery() {
+ if (setQuery != null && setQuery.eIsProxy()) {
+ InternalEObject oldSetQuery = (InternalEObject)setQuery;
+ setQuery = (ModelQuery)eResolveProxy(oldSetQuery);
+ if (setQuery != oldSetQuery) {
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY, oldSetQuery, setQuery));
+ }
+ }
+ return setQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ModelQuery basicGetSetQuery() {
+ return setQuery;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setSetQuery(ModelQuery newSetQuery) {
+ ModelQuery oldSetQuery = setQuery;
+ setQuery = newSetQuery;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY, oldSetQuery, setQuery));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public String getPropertyQualifiedName() {
+ return propertyQualifiedName;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setPropertyQualifiedName(String newPropertyQualifiedName) {
+ String oldPropertyQualifiedName = propertyQualifiedName;
+ propertyQualifiedName = newPropertyQualifiedName;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME, oldPropertyQualifiedName, propertyQualifiedName));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public boolean isIsDerived() {
+ return isDerived;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public void setIsDerived(boolean newIsDerived) {
+ boolean oldIsDerived = isDerived;
+ isDerived = newIsDerived;
+ if (eNotificationRequired())
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED, oldIsDerived, isDerived));
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID:
+ return getRepresentedElement_XMI_ID();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY:
+ if (resolve) return getValueQuery();
+ return basicGetValueQuery();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY:
+ if (resolve) return getSetQuery();
+ return basicGetSetQuery();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME:
+ return getPropertyQualifiedName();
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED:
+ return isIsDerived();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY:
+ setValueQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY:
+ setSetQuery((ModelQuery)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME:
+ setPropertyQualifiedName((String)newValue);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED:
+ setIsDerived((Boolean)newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID:
+ setRepresentedElement_XMI_ID(REPRESENTED_ELEMENT_XMI_ID_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY:
+ setValueQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY:
+ setSetQuery((ModelQuery)null);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME:
+ setPropertyQualifiedName(PROPERTY_QUALIFIED_NAME_EDEFAULT);
+ return;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED:
+ setIsDerived(IS_DERIVED_EDEFAULT);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID) {
+ switch (featureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID:
+ return REPRESENTED_ELEMENT_XMI_ID_EDEFAULT == null ? representedElement_XMI_ID != null : !REPRESENTED_ELEMENT_XMI_ID_EDEFAULT.equals(representedElement_XMI_ID);
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY:
+ return valueQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY:
+ return setQuery != null;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME:
+ return PROPERTY_QUALIFIED_NAME_EDEFAULT == null ? propertyQualifiedName != null : !PROPERTY_QUALIFIED_NAME_EDEFAULT.equals(propertyQualifiedName);
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED:
+ return isDerived != IS_DERIVED_EDEFAULT;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eBaseStructuralFeatureID(int derivedFeatureID, Class<?> baseClass) {
+ if (baseClass == EObject.class) {
+ switch (derivedFeatureID) {
+ default: return -1;
+ }
+ }
+ if (baseClass == EObjectFacetRepresentation.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID: return ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetStructuralFeature.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY: return FacetPackage.FACET_STRUCTURAL_FEATURE__VALUE_QUERY;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY: return FacetPackage.FACET_STRUCTURAL_FEATURE__SET_QUERY;
+ default: return -1;
+ }
+ }
+ if (baseClass == StereotypePropertyElement.class) {
+ switch (derivedFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME: return ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED: return ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetReference.class) {
+ switch (derivedFeatureID) {
+ default: return -1;
+ }
+ }
+ return super.eBaseStructuralFeatureID(derivedFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public int eDerivedStructuralFeatureID(int baseFeatureID, Class<?> baseClass) {
+ if (baseClass == EObject.class) {
+ switch (baseFeatureID) {
+ default: return -1;
+ }
+ }
+ if (baseClass == EObjectFacetRepresentation.class) {
+ switch (baseFeatureID) {
+ case ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION__REPRESENTED_ELEMENT_XMI_ID: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__REPRESENTED_ELEMENT_XMI_ID;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetStructuralFeature.class) {
+ switch (baseFeatureID) {
+ case FacetPackage.FACET_STRUCTURAL_FEATURE__VALUE_QUERY: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__VALUE_QUERY;
+ case FacetPackage.FACET_STRUCTURAL_FEATURE__SET_QUERY: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__SET_QUERY;
+ default: return -1;
+ }
+ }
+ if (baseClass == StereotypePropertyElement.class) {
+ switch (baseFeatureID) {
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__PROPERTY_QUALIFIED_NAME: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__PROPERTY_QUALIFIED_NAME;
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT__IS_DERIVED: return ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE__IS_DERIVED;
+ default: return -1;
+ }
+ }
+ if (baseClass == FacetReference.class) {
+ switch (baseFeatureID) {
+ default: return -1;
+ }
+ }
+ return super.eDerivedStructuralFeatureID(baseFeatureID, baseClass);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ @Override
+ public String toString() {
+ if (eIsProxy()) return super.toString();
+
+ StringBuffer result = new StringBuffer(super.toString());
+ result.append(" (representedElement_XMI_ID: "); //$NON-NLS-1$
+ result.append(representedElement_XMI_ID);
+ result.append(", propertyQualifiedName: "); //$NON-NLS-1$
+ result.append(propertyQualifiedName);
+ result.append(", isDerived: "); //$NON-NLS-1$
+ result.append(isDerived);
+ result.append(')');
+ return result.toString();
+ }
+
+} //StereotypePropertyFacetReferenceImpl
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetAdapterFactory.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetAdapterFactory.java
new file mode 100644
index 00000000000..103e49eb0f1
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetAdapterFactory.java
@@ -0,0 +1,489 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.util;
+
+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.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetAttribute;
+import org.eclipse.emf.facet.infra.facet.FacetReference;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference;
+
+/**
+ * <!-- 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 org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage
+ * @generated
+ */
+public class ProfileFacetAdapterFactory extends AdapterFactoryImpl {
+
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ProfileFacetPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProfileFacetAdapterFactory() {
+ if (modelPackage == null) {
+ modelPackage = ProfileFacetPackage.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 ProfileFacetSwitch<Adapter> modelSwitch = new ProfileFacetSwitch<Adapter>() {
+ @Override
+ public Adapter caseProfileFacetSet(ProfileFacetSet object) {
+ return createProfileFacetSetAdapter();
+ }
+ @Override
+ public Adapter caseStereotypeFacet(StereotypeFacet object) {
+ return createStereotypeFacetAdapter();
+ }
+ @Override
+ public Adapter caseStereotypePropertyElement(StereotypePropertyElement object) {
+ return createStereotypePropertyElementAdapter();
+ }
+ @Override
+ public Adapter caseStereotypePropertyFacetReference(StereotypePropertyFacetReference object) {
+ return createStereotypePropertyFacetReferenceAdapter();
+ }
+ @Override
+ public Adapter caseStereotypePropertyFacetAttribute(StereotypePropertyFacetAttribute object) {
+ return createStereotypePropertyFacetAttributeAdapter();
+ }
+ @Override
+ public Adapter caseEObjectFacetRepresentation(EObjectFacetRepresentation object) {
+ return createEObjectFacetRepresentationAdapter();
+ }
+ @Override
+ public Adapter caseEModelElement(EModelElement object) {
+ return createEModelElementAdapter();
+ }
+ @Override
+ public Adapter caseENamedElement(ENamedElement object) {
+ return createENamedElementAdapter();
+ }
+ @Override
+ public Adapter caseEPackage(EPackage object) {
+ return createEPackageAdapter();
+ }
+ @Override
+ public Adapter caseFacetSet(FacetSet object) {
+ return createFacetSetAdapter();
+ }
+ @Override
+ public Adapter caseEClassifier(EClassifier object) {
+ return createEClassifierAdapter();
+ }
+ @Override
+ public Adapter caseEClass(EClass object) {
+ return createEClassAdapter();
+ }
+ @Override
+ public Adapter caseFacet(Facet object) {
+ return createFacetAdapter();
+ }
+ @Override
+ public Adapter caseFacetStructuralFeature(FacetStructuralFeature object) {
+ return createFacetStructuralFeatureAdapter();
+ }
+ @Override
+ public Adapter caseETypedElement(ETypedElement object) {
+ return createETypedElementAdapter();
+ }
+ @Override
+ public Adapter caseEStructuralFeature(EStructuralFeature object) {
+ return createEStructuralFeatureAdapter();
+ }
+ @Override
+ public Adapter caseEReference(EReference object) {
+ return createEReferenceAdapter();
+ }
+ @Override
+ public Adapter caseFacetReference(FacetReference object) {
+ return createFacetReferenceAdapter();
+ }
+ @Override
+ public Adapter caseEAttribute(EAttribute object) {
+ return createEAttributeAdapter();
+ }
+ @Override
+ public Adapter caseFacetAttribute(FacetAttribute object) {
+ return createFacetAttributeAdapter();
+ }
+ @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 org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet <em>Set</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet
+ * @generated
+ */
+ public Adapter createProfileFacetSetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet <em>Stereotype Facet</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet
+ * @generated
+ */
+ public Adapter createStereotypeFacetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement <em>Stereotype Property Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement
+ * @generated
+ */
+ public Adapter createStereotypePropertyElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference <em>Stereotype Property Facet Reference</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference
+ * @generated
+ */
+ public Adapter createStereotypePropertyFacetReferenceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute <em>Stereotype Property Facet Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute
+ * @generated
+ */
+ public Adapter createStereotypePropertyFacetAttributeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation <em>EObject Facet Representation</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation
+ * @generated
+ */
+ public Adapter createEObjectFacetRepresentationAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EModelElement <em>EModel Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EModelElement
+ * @generated
+ */
+ public Adapter createEModelElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ENamedElement <em>ENamed Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.ENamedElement
+ * @generated
+ */
+ public Adapter createENamedElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EPackage <em>EPackage</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EPackage
+ * @generated
+ */
+ public Adapter createEPackageAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.facet.infra.facet.FacetSet <em>Set</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.facet.infra.facet.FacetSet
+ * @generated
+ */
+ public Adapter createFacetSetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EClassifier <em>EClassifier</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EClassifier
+ * @generated
+ */
+ public Adapter createEClassifierAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EClass <em>EClass</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EClass
+ * @generated
+ */
+ public Adapter createEClassAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.facet.infra.facet.Facet <em>Facet</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.facet.infra.facet.Facet
+ * @generated
+ */
+ public Adapter createFacetAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.facet.infra.facet.FacetStructuralFeature <em>Structural Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.facet.infra.facet.FacetStructuralFeature
+ * @generated
+ */
+ public Adapter createFacetStructuralFeatureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.ETypedElement <em>ETyped Element</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.ETypedElement
+ * @generated
+ */
+ public Adapter createETypedElementAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EStructuralFeature <em>EStructural Feature</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EStructuralFeature
+ * @generated
+ */
+ public Adapter createEStructuralFeatureAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EReference <em>EReference</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EReference
+ * @generated
+ */
+ public Adapter createEReferenceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.facet.infra.facet.FacetReference <em>Reference</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.facet.infra.facet.FacetReference
+ * @generated
+ */
+ public Adapter createFacetReferenceAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.ecore.EAttribute <em>EAttribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.ecore.EAttribute
+ * @generated
+ */
+ public Adapter createEAttributeAdapter() {
+ return null;
+ }
+
+ /**
+ * Creates a new adapter for an object of class '{@link org.eclipse.emf.facet.infra.facet.FacetAttribute <em>Attribute</em>}'.
+ * <!-- begin-user-doc -->
+ * This default implementation returns null so that we can easily ignore cases;
+ * it's useful to ignore a case when inheritance will catch all the cases anyway.
+ * <!-- end-user-doc -->
+ * @return the new adapter.
+ * @see org.eclipse.emf.facet.infra.facet.FacetAttribute
+ * @generated
+ */
+ public Adapter createFacetAttributeAdapter() {
+ 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;
+ }
+
+} //ProfileFacetAdapterFactory
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetSwitch.java b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetSwitch.java
new file mode 100644
index 00000000000..c59438d91ae
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet.metamodel/src-gen/org/eclipse/papyrus/uml/profilefacet/metamodel/profilefacet/util/ProfileFacetSwitch.java
@@ -0,0 +1,483 @@
+/**
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.util;
+
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EClassifier;
+import org.eclipse.emf.ecore.EModelElement;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetAttribute;
+import org.eclipse.emf.facet.infra.facet.FacetReference;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetAttribute;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyFacetReference;
+
+/**
+ * <!-- 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 org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage
+ * @generated
+ */
+public class ProfileFacetSwitch<T> extends Switch<T> {
+
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ protected static ProfileFacetPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @generated
+ */
+ public ProfileFacetSwitch() {
+ if (modelPackage == null) {
+ modelPackage = ProfileFacetPackage.eINSTANCE;
+ }
+ }
+
+ /**
+ * Checks whether this is a switch for the given package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @parameter ePackage the package in question.
+ * @return whether this is a switch for the given package.
+ * @generated
+ */
+ @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 ProfileFacetPackage.PROFILE_FACET_SET: {
+ ProfileFacetSet profileFacetSet = (ProfileFacetSet)theEObject;
+ T result = caseProfileFacetSet(profileFacetSet);
+ if (result == null) result = caseEObjectFacetRepresentation(profileFacetSet);
+ if (result == null) result = caseFacetSet(profileFacetSet);
+ if (result == null) result = caseEPackage(profileFacetSet);
+ if (result == null) result = caseENamedElement(profileFacetSet);
+ if (result == null) result = caseEModelElement(profileFacetSet);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProfileFacetPackage.STEREOTYPE_FACET: {
+ StereotypeFacet stereotypeFacet = (StereotypeFacet)theEObject;
+ T result = caseStereotypeFacet(stereotypeFacet);
+ if (result == null) result = caseEObjectFacetRepresentation(stereotypeFacet);
+ if (result == null) result = caseFacet(stereotypeFacet);
+ if (result == null) result = caseEClass(stereotypeFacet);
+ if (result == null) result = caseEClassifier(stereotypeFacet);
+ if (result == null) result = caseENamedElement(stereotypeFacet);
+ if (result == null) result = caseEModelElement(stereotypeFacet);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_ELEMENT: {
+ StereotypePropertyElement stereotypePropertyElement = (StereotypePropertyElement)theEObject;
+ T result = caseStereotypePropertyElement(stereotypePropertyElement);
+ if (result == null) result = caseEObjectFacetRepresentation(stereotypePropertyElement);
+ if (result == null) result = caseFacetStructuralFeature(stereotypePropertyElement);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_REFERENCE: {
+ StereotypePropertyFacetReference stereotypePropertyFacetReference = (StereotypePropertyFacetReference)theEObject;
+ T result = caseStereotypePropertyFacetReference(stereotypePropertyFacetReference);
+ if (result == null) result = caseStereotypePropertyElement(stereotypePropertyFacetReference);
+ if (result == null) result = caseFacetReference(stereotypePropertyFacetReference);
+ if (result == null) result = caseEReference(stereotypePropertyFacetReference);
+ if (result == null) result = caseEStructuralFeature(stereotypePropertyFacetReference);
+ if (result == null) result = caseEObjectFacetRepresentation(stereotypePropertyFacetReference);
+ if (result == null) result = caseFacetStructuralFeature(stereotypePropertyFacetReference);
+ if (result == null) result = caseETypedElement(stereotypePropertyFacetReference);
+ if (result == null) result = caseENamedElement(stereotypePropertyFacetReference);
+ if (result == null) result = caseEModelElement(stereotypePropertyFacetReference);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProfileFacetPackage.STEREOTYPE_PROPERTY_FACET_ATTRIBUTE: {
+ StereotypePropertyFacetAttribute stereotypePropertyFacetAttribute = (StereotypePropertyFacetAttribute)theEObject;
+ T result = caseStereotypePropertyFacetAttribute(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseStereotypePropertyElement(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseFacetAttribute(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseEAttribute(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseEStructuralFeature(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseEObjectFacetRepresentation(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseFacetStructuralFeature(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseETypedElement(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseENamedElement(stereotypePropertyFacetAttribute);
+ if (result == null) result = caseEModelElement(stereotypePropertyFacetAttribute);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ case ProfileFacetPackage.EOBJECT_FACET_REPRESENTATION: {
+ EObjectFacetRepresentation eObjectFacetRepresentation = (EObjectFacetRepresentation)theEObject;
+ T result = caseEObjectFacetRepresentation(eObjectFacetRepresentation);
+ if (result == null) result = defaultCase(theEObject);
+ return result;
+ }
+ default: return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Set</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>Set</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseProfileFacetSet(ProfileFacetSet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Stereotype Facet</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>Stereotype Facet</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStereotypeFacet(StereotypeFacet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Stereotype Property Element</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>Stereotype Property Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStereotypePropertyElement(StereotypePropertyElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Stereotype Property Facet Reference</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>Stereotype Property Facet Reference</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStereotypePropertyFacetReference(StereotypePropertyFacetReference object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Stereotype Property Facet Attribute</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>Stereotype Property Facet Attribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseStereotypePropertyFacetAttribute(StereotypePropertyFacetAttribute object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EObject Facet Representation</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>EObject Facet Representation</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEObjectFacetRepresentation(EObjectFacetRepresentation object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EModel Element</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>EModel Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEModelElement(EModelElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>ENamed Element</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>ENamed Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseENamedElement(ENamedElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EPackage</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>EPackage</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEPackage(EPackage object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Set</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>Set</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFacetSet(FacetSet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EClassifier</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>EClassifier</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEClassifier(EClassifier object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EClass</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>EClass</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEClass(EClass object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Facet</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>Facet</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFacet(Facet object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Structural Feature</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>Structural Feature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFacetStructuralFeature(FacetStructuralFeature object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>ETyped Element</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>ETyped Element</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseETypedElement(ETypedElement object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EStructural Feature</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>EStructural Feature</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEStructuralFeature(EStructuralFeature object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EReference</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>EReference</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEReference(EReference object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Reference</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>Reference</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFacetReference(FacetReference object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>EAttribute</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>EAttribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseEAttribute(EAttribute object) {
+ return null;
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Attribute</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>Attribute</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseFacetAttribute(FacetAttribute 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;
+ }
+
+} //ProfileFacetSwitch
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath b/deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath
new file mode 100644
index 00000000000..8031177be12
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/.project b/deprecated/org.eclipse.papyrus.uml.profilefacet/.project
new file mode 100644
index 00000000000..ac03ef4651b
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.profilefacet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..1a89f31de42
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.uml2.uml,
+ org.eclipse.emf.facet.infra.query.core,
+ org.eclipse.papyrus.uml.profilefacet.metamodel;bundle-version="1.0.0",
+ org.eclipse.emf.facet.infra.common.core;bundle-version="0.2.1",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.emf.commands.core,
+ org.eclipse.emf.facet.infra.facet.core,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.table.instance;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.emf.facet.widgets.nattable.instance,
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.0.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.infra.table.controlmode;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0"
+Export-Package: org.eclipse.papyrus.uml.profilefacet.queries.getter,
+ org.eclipse.papyrus.uml.profilefacet.queries.registry,
+ org.eclipse.papyrus.uml.profilefacet.queries.setter,
+ org.eclipse.papyrus.uml.profilefacet.queries.tester,
+ org.eclipse.papyrus.uml.profilefacet.utils
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.profilefacet.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.profilefacet;singleton:=t
+ rue
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..75497b08193
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.uml.profilefacet
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = UML Profilefacet (Incubation) \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/about.html b/deprecated/org.eclipse.papyrus.uml.profilefacet/about.html
new file mode 100644
index 00000000000..34ab520eed4
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/about.html
@@ -0,0 +1,106 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 14, 2010</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties
new file mode 100644
index 00000000000..873b1f3d4d8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ resources/,\
+ OSGI-INF/,\
+ about.html,\
+ plugin.pdoc,\
+ build.properties
+src.includes = about.html
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc b/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc
new file mode 100644
index 00000000000..7f68b8c1e49
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation"
+ description="This plugins provides useful classes for profilefacet elements">
+ <referent
+ firstName="vincent"
+ lastName="lorenzo"
+ eMail="vincent.lorenzo@cea.fr"
+ currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml b/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml
new file mode 100644
index 00000000000..b8b515f2c62
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+
+<plugin>
+ <extension point="org.eclipse.emf.facet.infra.query.registration">
+ <modelqueryset file="resources/uml_stereotype_queries.querySet"/>
+ </extension>
+ <extension
+ point="org.eclipse.emf.transaction.listeners">
+ <listener
+ class="org.eclipse.papyrus.uml.profilefacet.listener.ReapplyProfileTriggerListener">
+ </listener>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
+ <metamodel
+ nsURI="http://www.eclipse.org/Papyrus/Table/0.8.0/papyrustableinstance">
+ <adviceBinding
+ class="org.eclipse.papyrus.uml.profilefacet.advice.DeleteProfileFacetSetAdvice"
+ id="org.eclipse.papyrus.uml.profilefacet.advice.DeleteProfileFacetSetAdvice"
+ inheritance="all"
+ typeId="*">
+ </adviceBinding>
+ </metamodel>
+ </extension>
+ <extension
+ point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
+ <binding
+ context="org.eclipse.papyrus.infra.services.edit.TypeContext">
+ <elementType
+ ref="org.eclipse.papyrus.uml.profilefacet.advice.DeleteProfileFacetSetAdvice">
+ </elementType>
+ </binding>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.services.controlmode.participant">
+ <participant
+ class="org.eclipse.papyrus.uml.profilefacet.controlmode.ProfileFacetSetControlParticipant">
+ </participant>
+ </extension>
+</plugin>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet b/deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet
new file mode 100644
index 00000000000..9dcc15672ad
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet
@@ -0,0 +1,189 @@
+<?xml version="1.0" encoding="ASCII"?>
+<query:ModelQuerySet 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" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="uml_stereotype_queries" description="">
+ <associatedMetamodels href="http://www.eclipse.org/emf/2002/Ecore#/"/>
+ <associatedMetamodels href="http://www.eclipse.org/uml2/4.0.0/UML#/"/>
+ <queries xsi:type="query:JavaModelQuery" name="getBooleanMultiValue" description="Returns a multi value on Boolean for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetBooleanMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getBooleanSingleValue" description="Returns a single value on Boolean for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetBooleanSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getDatatypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetDatatypeMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getDatatypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetDatatypeSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getEObjectMultiReferenceValue" description="Returns a multi reference on EObject for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetEObjectMultiReference">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getEObjectSingleReferenceValue" description="Returns a single reference on EObject for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetEObjectSingleReference">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getIntegerMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetIntMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getIntegerSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetIntSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getPrimitiveTypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetPrimitiveTypeMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getPrimitiveTypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetPrimitiveTypeSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getRealMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetRealMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getRealSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetRealSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getStringMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetStringMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getStringSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetStringSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getUnlimitedNaturalMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUnlimitedNaturalMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getUnlimitedNaturalSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUnlimitedNaturalSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getUMLEnumerationMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUMLEnumerationMultiValue">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="getUMLEnumerationSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUMLEnumerationSingleValue">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setBooleanMultiValue" description="Returns a multi value on Boolean for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetBooleanMultiValue">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//ENamedElement"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setBooleanSingleValue" description="Returns a single value on Boolean for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetBooleanSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setDatatypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetDatatypeMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setDatatypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetDatatypeSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setEObjectMultiReferenceValue" description="Returns a multi reference on EObject for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetEObjectMultiReference">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setEObjectSingleReferenceValue" description="Returns a single reference on EObject for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetEObjectSingleReference">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setIntegerMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetIntMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setIntegerSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetIntSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setPrimitiveTypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetPrimitiveTypeMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setPrimitiveTypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetPrimitiveTypeSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setRealMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetRealMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setRealSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetRealSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setStringMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetStringMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setStringSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetStringSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setUnlimitedNaturalMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUnlimitedNaturalMultiValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setUnlimitedNaturalSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUnlimitedNaturalSingleValue">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setUMLEnumerationMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUMLEnumerationMultiValue">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="setUMLEnumerationSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUMLEnumerationSingleValue">
+ <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
+ <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+ <queries xsi:type="query:JavaModelQuery" name="isAppliedRequiredStereotype" description="Returns true if all required stereotypes are applied" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.tester.IsAppliedRequiredStereotype">
+ <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
+ <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </queries>
+</query:ModelQuerySet>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java
new file mode 100644
index 00000000000..bd900da8945
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.profilefacet"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java
new file mode 100644
index 00000000000..7f890451ea6
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java
@@ -0,0 +1,227 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.advice;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableinstancePackage;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.TableInstance2;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.Tableinstance2Package;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
+import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+
+/**
+ *
+ * This advice helper destroy the {@link ProfileFacetSet} used in a table if the destroyed table is the last one to use it
+ * This advice helper destroy the {@link EPackage} which contains the destroyed {@link ProfileFacetSet} used in a table if the destroyed
+ * {@link ProfileFacetSet} is the last
+ * one owned by the {@link EPackage}
+ *
+ * We assume that the EPackage contains only {@link ProfileFacetSet}, which contains only {@link StereotypeFacet}
+ *
+ * @author Vincent Lorenzo
+ *
+ */
+public class DeleteProfileFacetSetAdvice extends AbstractEditHelperAdvice {
+
+ /**
+ *
+ * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest)
+ *
+ * @param request
+ * @return
+ */
+ @Override
+ protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) {
+ final EObject objectToDestroy = request.getElementToDestroy();
+ if(objectToDestroy == null) {
+ return null;
+ }
+
+
+ //the destroyed element is a PapyrusTableInstace
+ if(objectToDestroy instanceof TableInstance2) {
+ final TableInstance2 instance = (TableInstance2)objectToDestroy;
+ final Collection<FacetSet> rootFacetSetToDestroy = new ArrayList<FacetSet>();
+ final Collection<ModelQuerySet> querySetToDestroy = new HashSet<ModelQuerySet>();
+ final Collection<Facet> allStereotypeFacetsUsedInTheTable = new ArrayList<Facet>();
+ allStereotypeFacetsUsedInTheTable.addAll(instance.getFacets2());
+
+ final Collection<FacetSet> rootFacetSets = new HashSet<FacetSet>();
+ final Collection<EPackage> rootPackages = new HashSet<EPackage>();
+ for(Facet facet : allStereotypeFacetsUsedInTheTable) {
+ if(facet instanceof StereotypeFacet) {
+ EObject container = facet.eContainer();
+ while(container.eContainer() != null && container.eContainer() instanceof FacetSet) {
+ container = container.eContainer();
+ }
+ assert container instanceof FacetSet;
+ EObject rootPackage = container.eContainer();
+ if(rootPackage != null) {// null for the provided Sysml ProfileFacetSet
+ assert (rootPackage instanceof EPackage && rootPackage.eContainer() == null);
+ rootFacetSets.add((FacetSet)container);
+ rootPackages.add((EPackage)rootPackage);
+ }
+ }
+ }
+
+ if(rootFacetSets.size() != 0) {//the table references StereotypeFacet
+ final TransactionalEditingDomain domain = request.getEditingDomain();
+
+ //we must execute this code during the command execution, because if we are destroying several tables in the same time which references the same ProfileFacetSet, this one will be not destroyed
+ final ICommand cmd = new AbstractTransactionalCommand(domain, "Destroy ProfileFacetSet Command", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ final Collection<EPackage> epackageToDestroy = new ArrayList<EPackage>();
+ for(final EPackage currentRoot : rootPackages) {
+ for(final EObject current : currentRoot.eContents()) {
+ if(current instanceof FacetSet) {
+ if(!isUsed(instance, (FacetSet)current)) {
+ rootFacetSetToDestroy.add((FacetSet)current);
+ final ModelQuerySet querySet = getQuerySet((FacetSet)current);
+ if(querySet != null) {
+ querySetToDestroy.add(querySet);
+ }
+ }
+ }
+ }
+
+ final Collection<EObject> currentContents = new ArrayList<EObject>(currentRoot.eContents());
+ currentContents.removeAll(rootFacetSetToDestroy);
+ if(currentContents.isEmpty()) {
+ epackageToDestroy.add(currentRoot);
+ }
+ }
+
+
+ CompositeCommand destroyCommand = new CompositeCommand("Destroy ProfileFacetSet command"); //$NON-NLS-1$
+
+ for(final EObject element : querySetToDestroy) {
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(element);
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(element, false);
+ destroyCommand.add(provider.getEditCommand(destroyRequest));
+ }
+
+ for(final EObject element : rootFacetSetToDestroy) {
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(element);
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(element, false);
+ destroyCommand.add(provider.getEditCommand(destroyRequest));
+ }
+ for(EPackage ePackage : epackageToDestroy) {
+ final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(ePackage);
+ final DestroyElementRequest destroyRequest = new DestroyElementRequest(ePackage, false);
+ destroyCommand.add(provider.getEditCommand(destroyRequest));
+ }
+
+
+ if(!destroyCommand.isEmpty()) {
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(destroyCommand));
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return cmd;
+
+ }
+
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param deletedTableInstance
+ * the deleted table instance
+ * @param facetSet
+ * a facetset
+ * @return
+ * <code>true</code> if the facetset is used by another table
+ */
+ protected boolean isUsed(final TableInstance deletedTableInstance, final FacetSet facetSet) {
+ boolean isUsed = false;
+ for(final Facet facet : facetSet.getFacets()) {
+ final ECrossReferenceAdapter crossReferencerAdapter = CrossReferenceAdapter.getCrossReferenceAdapter(facet);
+ final Collection<Setting> settings = crossReferencerAdapter.getNonNavigableInverseReferences(facet, true);
+ Iterator<Setting> iterator = settings.iterator();
+ while(iterator.hasNext() && !isUsed) {
+ final Setting current = iterator.next();
+ EObject object = current.getEObject();
+ EStructuralFeature feature = current.getEStructuralFeature();
+ if(object != deletedTableInstance || (feature != TableinstancePackage.eINSTANCE.getTableInstance_Facets() && feature != Tableinstance2Package.eINSTANCE.getTableInstance2_Facets2())) {
+ isUsed = true;
+ }
+ }
+ }
+ if(!isUsed) {
+ for(final EPackage subPackage : facetSet.getESubpackages()) {
+ if(subPackage instanceof FacetSet && !isUsed) {
+ isUsed = isUsed(deletedTableInstance, (FacetSet)subPackage);
+ }
+ }
+ }
+ return isUsed;
+ }
+
+ /**
+ *
+ * @param facetset
+ * a facetset
+ * @return
+ * the {@link ModelQuerySet} used by this facetset
+ */
+ protected ModelQuerySet getQuerySet(final FacetSet facetset) {
+ ModelQuerySet querySet = null;
+ TreeIterator<EObject> iterator = facetset.eAllContents();
+ while(iterator.hasNext() && querySet == null) {
+ final EObject current = iterator.next();
+ if(current instanceof FacetStructuralFeature) {
+ ModelQuery modelQuery = ((FacetStructuralFeature)current).getValueQuery();
+ querySet = modelQuery.getModelQuerySet();
+ }
+ }
+
+ return querySet;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java
new file mode 100644
index 00000000000..bec00a68b7b
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java
@@ -0,0 +1,57 @@
+/*******************************************************************************
+ * Copyright (c) 2013 Atos.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Mathieu Velten <a href="mailto:mathieu.velten@atos.net"> - initial API and implementation
+ ******************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.controlmode;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.services.controlmode.participants.IControlCommandParticipant;
+import org.eclipse.papyrus.infra.services.controlmode.participants.IUncontrolCommandParticipant;
+import org.eclipse.papyrus.uml.profilefacet.utils.ProfileFacetSetMoveHelper;
+
+
+public class ProfileFacetSetControlParticipant implements IControlCommandParticipant, IUncontrolCommandParticipant {
+
+ public String getID() {
+ return "org.eclipse.papyrus.uml.profilefacet.controlmode.ProfileFacetSetControlParticipant";
+ }
+
+ public int getPriority() {
+ return 20;
+ }
+
+ public boolean provideUnControlCommand(ControlModeRequest request) {
+ return request.getTargetObject() instanceof EObject;
+ }
+
+ public boolean provideControlCommand(ControlModeRequest request) {
+ return request.getTargetObject() instanceof EObject;
+ }
+
+ public ICommand getPreUncontrolCommand(ControlModeRequest request) {
+ return ProfileFacetSetMoveHelper.getMoveAllFacetSetsCommand(request.getEditingDomain(), request.getTargetObject(), request.getSourceResource(SashModel.MODEL_FILE_EXTENSION), request.getTargetResource(SashModel.MODEL_FILE_EXTENSION));
+
+ }
+
+ public ICommand getPostUncontrolCommand(ControlModeRequest request) {
+ return null;
+ }
+
+ public ICommand getPreControlCommand(ControlModeRequest request) {
+ return null;
+ }
+
+ public ICommand getPostControlCommand(ControlModeRequest request) {
+ return ProfileFacetSetMoveHelper.getMoveAllFacetSetsCommand(request.getEditingDomain(), request.getTargetObject(), request.getSourceResource(SashModel.MODEL_FILE_EXTENSION), request.getTargetResource(SashModel.MODEL_FILE_EXTENSION));
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java
new file mode 100644
index 00000000000..60fe4c5d8e0
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.listener;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.ecore.EAnnotation;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.TriggerListener;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.utils.ProfileFacetSetDestroyer;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ *
+ * This trigger listener listen the profile application to manage the existing {@link ProfileFacetSet} in the model
+ *
+ */
+public class ReapplyProfileTriggerListener extends TriggerListener {
+
+ /**
+ *
+ * @see org.eclipse.emf.transaction.TriggerListener#trigger(org.eclipse.emf.transaction.TransactionalEditingDomain,
+ * org.eclipse.emf.common.notify.Notification)
+ *
+ * @param domain
+ * @param notification
+ * @return
+ */
+ @Override
+ protected Command trigger(final TransactionalEditingDomain domain, final Notification notification) {
+ final int eventType = notification.getEventType();
+ final Object notifier = notification.getNotifier();
+ final Object newValue = notification.getNewValue();
+
+ if(eventType == Notification.SET && newValue instanceof EPackage && notifier instanceof EAnnotation) {
+ Profile appliedProfile = getAppliedProfile((EAnnotation)notifier);
+ while(appliedProfile.eContainer() != null) {
+ appliedProfile = (Profile)appliedProfile.eContainer();
+ }
+ if(appliedProfile != null) {
+ return getUpdateFacetSetCommand(appliedProfile);
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param profile
+ * a profile
+ * @return
+ * the command to update the ProfileFacetSets which references this profile or <code>null</code>
+ */
+ protected Command getUpdateFacetSetCommand(final Profile profile) {
+ final ProfileFacetSetDestroyer updater = new ProfileFacetSetDestroyer(profile);
+ final Command cmd = updater.getDestroyFacetSetCommand();
+ if(cmd != null && cmd.canExecute()) {
+ return cmd;
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param annotation
+ * an eannotation
+ * @return
+ * the profile referenced by the eannotation or <code>null</code>
+ */
+ protected Profile getAppliedProfile(final EAnnotation annotation) {
+ final EObject container = annotation.eContainer();
+ if(container instanceof ProfileApplication) {
+ return ((ProfileApplication)container).getAppliedProfile();
+ }
+ return null;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java
new file mode 100644
index 00000000000..9a500d348e3
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.profilefacet.messages.messages"; //$NON-NLS-1$
+
+ public static String AdditionalContentsUtils_ProfileEFacetDescription;
+
+ public static String FacetOperationRegistry_RequiredFacetNotFound;
+
+ public static String FacetOperationRegistry_RequiredFacetOperationNotFound;
+
+ public static String ProfileFacetSetDestroyer_DestroyProfileFacetSetCommand;
+
+ public static String ProfileFacetSetDestroyer_ErrorMessageOnDeleteProfileFacetSet;
+ public static String ProfileFacetSetDestroyer_RemoveColumns;
+
+ public static String ProfileFacetSetDestroyer_RemoveFacetSetAppliedOnTheTable;
+
+ public static String ProfileFacetSetDestroyer_RemoveProfileFacetSetForReappliedProfile;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties
new file mode 100644
index 00000000000..c5b4918fa15
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties
@@ -0,0 +1,8 @@
+AdditionalContentsUtils_ProfileEFacetDescription=This EPackage provides facets to edit easily additional contents (Stereotype Properties for example). It had been generated by the Papyrus Show/Hide columns
+FacetOperationRegistry_RequiredFacetNotFound=The required facet {0} has not been found
+FacetOperationRegistry_RequiredFacetOperationNotFound=The required FacetOperation called {0} has not been found
+ProfileFacetSetDestroyer_DestroyProfileFacetSetCommand=Destroy ProfileFacetSet command
+ProfileFacetSetDestroyer_ErrorMessageOnDeleteProfileFacetSet=We can't delete the existing ProfileFacetSet, because you have apply 2 Profile with the same XMI_ID on your model. \n Often it is because you do a Save As of your first profile to create the second one
+ProfileFacetSetDestroyer_RemoveColumns=Remove Columns
+ProfileFacetSetDestroyer_RemoveFacetSetAppliedOnTheTable=Remove facet applied on table
+ProfileFacetSetDestroyer_RemoveProfileFacetSetForReappliedProfile=Remove ProfileFacetSet for reapplied Profile
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java
new file mode 100644
index 00000000000..cd7ea447e37
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetBooleanMultiValue extends GetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java
new file mode 100644
index 00000000000..040cc853f79
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetBooleanSingleValue extends GetGenericSingleValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java
new file mode 100644
index 00000000000..aa7837e843a
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetDatatypeMultiValue extends GetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java
new file mode 100644
index 00000000000..bd4c8f5cb3e
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetDatatypeSingleValue extends GetGenericSingleValue<String> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java
new file mode 100644
index 00000000000..4e28941e9e8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+
+
+public class GetEObjectMultiReference extends GetGenericMultiValue<EObject> {
+
+ @Override
+ public List<EObject> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ final List<EObject> value = super.evaluate(source, parameterValues);
+ if(value == null) {
+ return Collections.emptyList();
+ } else {
+ final List<EObject> returnedValue = new ArrayList<EObject>();
+ for(EObject eObject : value) {
+ if(UMLUtil.getStereotype(eObject) != null) {
+ returnedValue.add(UMLUtil.getBaseElement(eObject));
+ } else {
+ returnedValue.add(eObject);
+ }
+ }
+ return returnedValue;
+ }
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java
new file mode 100644
index 00000000000..5c99cac1606
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+
+public class GetEObjectSingleReference extends GetGenericSingleValue<EObject> {
+
+ @Override
+ public EObject evaluate(final Element source, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ EObject obj = super.evaluate(source, parameterValues);
+
+ if(UMLUtil.getStereotype(obj) != null) {
+ obj = UMLUtil.getBaseElement(obj);
+ }
+ return obj;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java
new file mode 100644
index 00000000000..f5d7d5fac11
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java
@@ -0,0 +1,34 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class GetGenericMultiValue<R> extends GetGenericSingleValue<List<R>> {
+
+ @Override
+ public List<R> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ final List<R> value = super.evaluate(source, parameterValues);
+ if(value == null) {
+ return Collections.emptyList();
+ } else {
+ return value;
+ }
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java
new file mode 100644
index 00000000000..cd06b36c10d
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQueryWithEditingDomain;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
+import org.eclipse.papyrus.uml.profilefacet.utils.StereotypePropertyUtils;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+
+public class GetGenericSingleValue<R> implements IJavaModelQueryWithEditingDomain<Element, R> {
+
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery#evaluate(org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList)
+ *
+ * @param source
+ * @param parameterValues
+ * @return
+ * @throws ModelQueryExecutionException
+ */
+ public R evaluate(final Element source, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
+ if(element != null) {
+ final String propertyQN = element.getPropertyQualifiedName();
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ final Stereotype appliedSte = StereotypePropertyUtils.getAppliedStereotype(source, element);
+ return (R)source.getValue(appliedSte, propertyName);
+ }
+
+ return null;
+ }
+
+ /**
+ *
+ * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQueryWithEditingDomain#evaluate(org.eclipse.emf.ecore.EObject,
+ * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList, org.eclipse.emf.edit.domain.EditingDomain)
+ *
+ * @param context
+ * @param parameterValues
+ * @param editingDomain
+ * @return
+ * @throws ModelQueryExecutionException
+ */
+ public R evaluate(final Element context, final ParameterValueList parameterValues, EditingDomain editingDomain) throws ModelQueryExecutionException {
+ return evaluate(context, parameterValues);
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java
new file mode 100644
index 00000000000..4ffbe2fc1d1
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetIntMultiValue extends GetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java
new file mode 100644
index 00000000000..c89af9653ae
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetIntSingleValue extends GetGenericSingleValue<Integer> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java
new file mode 100644
index 00000000000..2593587c6ab
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetPrimitiveTypeMultiValue extends GetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java
new file mode 100644
index 00000000000..85f9199e4b3
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java
@@ -0,0 +1,19 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+public class GetPrimitiveTypeSingleValue extends GetGenericSingleValue<String> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java
new file mode 100644
index 00000000000..47387465905
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetRealMultiValue extends GetGenericMultiValue<Boolean> {
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java
new file mode 100644
index 00000000000..f979471e186
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+
+public class GetRealSingleValue extends GetGenericSingleValue<Double> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java
new file mode 100644
index 00000000000..37c8818bbec
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetStringMultiValue extends GetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java
new file mode 100644
index 00000000000..71e7ea9db67
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+
+public class GetStringSingleValue extends GetGenericSingleValue<String> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java
new file mode 100644
index 00000000000..d8c8b7d6a48
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
+import org.eclipse.papyrus.uml.tools.utils.EnumerationUtil;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.TypedElement;
+
+
+
+public class GetUMLEnumerationMultiValue extends GetGenericMultiValue<EnumerationLiteral> {
+
+
+ @Override
+ public List<EnumerationLiteral> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+
+ final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
+ if(element != null) {
+ final EObject container = element.eContainer();
+ assert container instanceof StereotypeFacet;
+ final StereotypeFacet facet = (StereotypeFacet)container;
+ final String stereotypeQN = facet.getStereotypeQualifiedName();
+ final Stereotype appliedStereotype = source.getAppliedStereotype(stereotypeQN);
+ final String propertyQN = element.getPropertyQualifiedName();
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ if(appliedStereotype != null) {
+ final Enumeration type = (Enumeration)((TypedElement)appliedStereotype.getOwnedMember(propertyName)).getType();
+ final Object value = source.getValue(appliedStereotype, propertyName);
+ assert value instanceof Collection<?>;
+ return EnumerationUtil.adaptToEnumerationLiteralList(type, (Collection<?>)value);
+ } else if(appliedStereotype == null) {//the property can comes from inheritance...
+ for(Stereotype appliedSte : source.getAppliedStereotypes()) {
+ final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedSte);
+ for(final Stereotype current : superClasses) {
+ if(current.getQualifiedName().equals(stereotypeQN)) {
+ final Enumeration type = (Enumeration)((TypedElement)current.getOwnedMember(propertyName)).getType();
+ final Object value = source.getValue(appliedSte, propertyName);
+ assert value instanceof Collection<?>;
+ return EnumerationUtil.adaptToEnumerationLiteralList(type, (Collection<?>)value);
+ }
+ }
+ }
+ }
+ }
+
+ return Collections.emptyList();
+ }
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java
new file mode 100644
index 00000000000..a51f417ce17
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java
@@ -0,0 +1,75 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.Enumerator;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
+import org.eclipse.papyrus.uml.tools.utils.EnumerationUtil;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.TypedElement;
+
+
+public class GetUMLEnumerationSingleValue extends GetGenericSingleValue<EnumerationLiteral> {
+
+ @Override
+ public EnumerationLiteral evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
+ if(element != null) {
+ final EObject container = element.eContainer();
+ assert container instanceof StereotypeFacet;
+ final StereotypeFacet facet = (StereotypeFacet)container;
+ final String stereotypeQN = facet.getStereotypeQualifiedName();
+ final Stereotype appliedStereotype = source.getAppliedStereotype(stereotypeQN);
+ final String propertyQN = element.getPropertyQualifiedName();
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ if(appliedStereotype != null) {
+ final Object value = source.getValue(appliedStereotype, propertyName);
+ if(value instanceof Enumerator) {
+ final Enumeration type = (Enumeration)((TypedElement)appliedStereotype.getOwnedMember(propertyName)).getType();
+ return EnumerationUtil.findEnumerationLiteral(type, (Enumerator)value);
+ }
+ return (EnumerationLiteral)value;
+ } else if(appliedStereotype == null) {//the property can comes from inheritance...
+ for(Stereotype appliedSte : source.getAppliedStereotypes()) {
+ final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedSte);
+ for(final Stereotype current : superClasses) {
+ if(current.getQualifiedName().equals(stereotypeQN)) {
+ final Object value = source.getValue(appliedSte, propertyName);
+ if(value instanceof Enumerator) {
+ final Enumeration type = (Enumeration)((TypedElement)current.getOwnedMember(propertyName)).getType();
+ return EnumerationUtil.findEnumerationLiteral(type, (Enumerator)value);
+ }
+ return (EnumerationLiteral)value;
+ }
+ }
+ }
+ }
+ }
+
+ return null;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java
new file mode 100644
index 00000000000..b7870313589
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java
@@ -0,0 +1,19 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetUnlimitedNaturalMultiValue extends GetGenericMultiValue<Boolean> {
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java
new file mode 100644
index 00000000000..5bfe0d2f4bf
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.getter;
+
+
+
+public class GetUnlimitedNaturalSingleValue extends GetGenericSingleValue<String> {
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java
new file mode 100644
index 00000000000..6abae052b4f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java
@@ -0,0 +1,137 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.registry;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.emf.facet.infra.query.core.ModelQuerySetCatalog;
+
+
+
+public class QueryRegistry {
+
+ /** the keys to get the FacetOperation */
+ public static final String GET_STRING_SINGLE_VALUE_OPERATION_ID = "getStringSingleValue"; //$NON-NLS-1$
+
+ public static final String GET_STRING_MULTI_VALUE_OPERATION_ID = "getStringMultiValue"; //$NON-NLS-1$
+
+ public static final String GET_EOBJECT_SINGLE_REFERENCE_OPERATION_ID = "getEObjectSingleReferenceValue"; //$NON-NLS-1$
+
+ public static final String GET_EOBJECT_MULTI_REFERENCE_OPERATION_ID = "getEObjectMultiReferenceValue"; //$NON-NLS-1$
+
+ public static final String GET_BOOLEAN_SINGLE_VALUE_OPERATION_ID = "getBooleanSingleValue"; //$NON-NLS-1$
+
+ public static final String GET_BOOLEAN_MULTI_VALUE_OPERATION_ID = "getBooleanMultiValue"; //$NON-NLS-1$
+
+ public static final String GET_INTEGER_SINGLE_VALUE_OPERATION_ID = "getIntegerSingleValue"; //$NON-NLS-1$
+
+ public static final String GET_INTEGER_MULTI_VALUE_OPERATION_ID = "getIntegerMultiValue"; //$NON-NLS-1$
+
+ public static final String GET_REAL_SINGLE_VALUE_OPERATION_ID = "getRealSingleValue"; //$NON-NLS-1$
+
+ public static final String GET_REAL_MULTI_VALUE_OPERATION_ID = "getRealMultiValue"; //$NON-NLS-1$
+
+ public static final String GET_UNLIMITED_NATURAL_SINGLE_VALUE_OPERATION_ID = "getUnlimitedNaturalSingleValue"; //$NON-NLS-1$
+
+ public static final String GET_UNLIMITED_NATURAL_MULTI_VALUE_OPERATION_ID = "getUnlimitedNaturalMultiValue"; //$NON-NLS-1$
+
+ public static final String GET_UML_ENUMERATION_SINGLE_VALUE_OPERATION_ID = "getUMLEnumerationSingleValue"; //$NON-NLS-1$
+
+ public static final String GET_UML_ENUMERATION_MULTI_VALUE_OPERATION_ID = "getUMLEnumerationMultiValue"; //$NON-NLS-1$
+
+ public static final String GET_DATATYPE_MULTI_VALUE_OPERATION_ID = "getDatatypeMultiValue";//$NON-NLS-1$
+
+ public static final String GET_DATATYPE_SINGLE_VALUE_OPERATION_ID = "getDatatypeSingleValue";//$NON-NLS-1$
+
+ public static final String GET_PRIMITIVE_TYPE_MULTI_VALUE_OPERATION_ID = "getPrimitiveTypeMultiValue";//$NON-NLS-1$
+
+ public static final String GET_PRIMITIVE_TYPE_SINGLE_VALUE_OPERATION_ID = "getPrimitiveTypeSingleValue";//$NON-NLS-1$
+
+
+ public static final String SET_STRING_SINGLE_VALUE_OPERATION_ID = "setStringSingleValue"; //$NON-NLS-1$
+
+ public static final String SET_STRING_MULTI_VALUE_OPERATION_ID = "setStringMultiValue"; //$NON-NLS-1$
+
+ public static final String SET_EOBJECT_SINGLE_REFERENCE_OPERATION_ID = "setEObjectSingleReferenceValue"; //$NON-NLS-1$
+
+ public static final String SET_EOBJECT_MULTI_REFERENCE_OPERATION_ID = "setEObjectMultiReferenceValue"; //$NON-NLS-1$
+
+ public static final String SET_BOOLEAN_SINGLE_VALUE_OPERATION_ID = "setBooleanSingleValue"; //$NON-NLS-1$
+
+ public static final String SET_BOOLEAN_MULTI_VALUE_OPERATION_ID = "setBooleanMultiValue"; //$NON-NLS-1$
+
+ public static final String SET_INTEGER_SINGLE_VALUE_OPERATION_ID = "setIntegerSingleValue"; //$NON-NLS-1$
+
+ public static final String SET_INTEGER_MULTI_VALUE_OPERATION_ID = "setIntegerMultiValue"; //$NON-NLS-1$
+
+ public static final String SET_REAL_SINGLE_VALUE_OPERATION_ID = "setRealSingleValue"; //$NON-NLS-1$
+
+ public static final String SET_REAL_MULTI_VALUE_OPERATION_ID = "setRealMultiValue"; //$NON-NLS-1$
+
+ public static final String SET_UNLIMITED_NATURAL_SINGLE_VALUE_OPERATION_ID = "setUnlimitedNaturalSingleValue"; //$NON-NLS-1$
+
+ public static final String SET_UNLIMITED_NATURAL_MULTI_VALUE_OPERATION_ID = "setUnlimitedNaturalMultiValue"; //$NON-NLS-1$
+
+ public static final String SET_UML_ENUMERATION_SINGLE_VALUE_OPERATION_ID = "setUMLEnumerationSingleValue"; //$NON-NLS-1$
+
+ public static final String SET_UML_ENUMERATION_MULTI_VALUE_OPERATION_ID = "setUMLEnumerationMultiValue"; //$NON-NLS-1$
+
+ public static final String SET_DATATYPE_MULTI_VALUE_OPERATION_ID = "setDatatypeMultiValue";//$NON-NLS-1$
+
+ public static final String SET_DATATYPE_SINGLE_VALUE_OPERATION_ID = "setDatatypeSingleValue";//$NON-NLS-1$
+
+ public static final String SET_PRIMITIVE_TYPE_MULTI_VALUE_OPERATION_ID = "setPrimitiveTypeMultiValue";//$NON-NLS-1$
+
+ public static final String SET_PRIMITIVE_TYPE_SINGLE_VALUE_OPERATION_ID = "setPrimitiveTypeSingleValue";//$NON-NLS-1$
+
+ public static final String IS_APPLIED_REQUIRED_STEREOTYPE = "isAppliedRequiredStereotype";
+
+
+ /** this map register the Query : key = id of the operation, value = the operation itself */
+ private final Map<String, ModelQuery> registry;
+
+ private static final String UML_STEREOTYPE_QUERY_SET_NAME = "uml_stereotype_queries";
+
+
+ public QueryRegistry() {
+ final ModelQuerySet set = getQuerySet(UML_STEREOTYPE_QUERY_SET_NAME);
+ assert set != null;
+ this.registry = new HashMap<String, ModelQuery>();
+ for(final ModelQuery query : set.getQueries()) {
+ this.registry.put(query.getName(), query);
+ }
+ }
+
+ /**
+ *
+ * @param id
+ * the id of the looked operation for
+ * @return
+ */
+ public ModelQuery getModelQuery(final String id) {
+ ModelQuery op = this.registry.get(id);
+ assert op != null;
+ return op;
+ }
+
+
+
+ private static final ModelQuerySet getQuerySet(final String facetName) {
+ return ModelQuerySetCatalog.getSingleton().getModelQuerySet(facetName);
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java
new file mode 100644
index 00000000000..eed77a249af
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetBooleanMultiValue extends SetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java
new file mode 100644
index 00000000000..d2f1e65beb1
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetBooleanSingleValue extends SetGenericSingleValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java
new file mode 100644
index 00000000000..1d06e35c043
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetDatatypeMultiValue extends SetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java
new file mode 100644
index 00000000000..abe30c874cb
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetDatatypeSingleValue extends SetGenericSingleValue<String> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java
new file mode 100644
index 00000000000..407fadca449
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetEObjectMultiReference extends SetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java
new file mode 100644
index 00000000000..f80f51ab346
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+import org.eclipse.emf.ecore.EObject;
+
+
+public class SetEObjectSingleReference extends SetGenericSingleValue<EObject> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java
new file mode 100644
index 00000000000..3385d558b87
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class SetGenericMultiValue<R> extends SetGenericSingleValue<List<R>> {
+
+ @Override
+ public List<R> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ super.evaluate(source, parameterValues);
+ return Collections.emptyList();
+ }
+
+ @Override
+ public List<R> evaluate(Element source, ParameterValueList parameterValues, EditingDomain domain) throws ModelQueryExecutionException {
+ super.evaluate(source, parameterValues, domain);
+ return Collections.emptyList();
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java
new file mode 100644
index 00000000000..f85709b9730
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+import java.util.Collection;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.facet.infra.facet.core.FacetContext;
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQueryWithEditingDomain;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
+import org.eclipse.papyrus.uml.profilefacet.utils.StereotypePropertyUtils;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+public class SetGenericSingleValue<R> implements IJavaModelQueryWithEditingDomain<Element, R> {
+
+
+ /**
+ *
+ * @param source
+ * @param parameterValues
+ * @return
+ * @throws ModelQueryExecutionException
+ */
+ public R evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ final EditingDomain domain = TransactionUtil.getEditingDomain(source);
+ return evaluate(source, parameterValues, domain);
+ }
+
+ /**
+ *
+ * @param source
+ * @param parameterValues
+ * @param editingDomain
+ * @return
+ * @throws ModelQueryExecutionException
+ */
+ public R evaluate(final Element source, final ParameterValueList parameterValues, final EditingDomain editingDomain) throws ModelQueryExecutionException {
+ assert editingDomain != null;
+ final R newValue = (R)parameterValues.getValueByParameterName(FacetContext.NEW_VALUE);
+ final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
+ if(element != null) {
+ final Stereotype foundStereotype = StereotypePropertyUtils.getAppliedStereotype(source, element);
+ final String propertyQN = element.getPropertyQualifiedName();
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ if(foundStereotype != null) {
+ final Stereotype stereotype = foundStereotype;
+ //FIXME : we should use the service edit
+ final ICommand setValueCommand = new AbstractTransactionalCommand((TransactionalEditingDomain)editingDomain, "Set Stereotype Value Command", null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ source.setValue(stereotype, propertyName, newValue);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+ editingDomain.getCommandStack().execute(new GMFtoEMFCommandWrapper(setValueCommand));
+ }
+ }
+ return null;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java
new file mode 100644
index 00000000000..7c8d659d0e8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetIntMultiValue extends SetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java
new file mode 100644
index 00000000000..a24f3582391
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetIntSingleValue extends SetGenericSingleValue<Integer> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java
new file mode 100644
index 00000000000..3fb1716e709
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetPrimitiveTypeMultiValue extends SetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java
new file mode 100644
index 00000000000..2553d413936
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java
@@ -0,0 +1,19 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+public class SetPrimitiveTypeSingleValue extends SetGenericSingleValue<String> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java
new file mode 100644
index 00000000000..45313508b2b
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetRealMultiValue extends SetGenericMultiValue<Boolean> {
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java
new file mode 100644
index 00000000000..e5f202e753d
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+
+public class SetRealSingleValue extends SetGenericSingleValue<Double> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java
new file mode 100644
index 00000000000..9ff244769e1
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java
@@ -0,0 +1,20 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetStringMultiValue extends SetGenericMultiValue<Boolean> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java
new file mode 100644
index 00000000000..6c4a8254131
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+
+public class SetStringSingleValue extends SetGenericSingleValue<String> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java
new file mode 100644
index 00000000000..954f0e96628
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+import org.eclipse.uml2.uml.EnumerationLiteral;
+
+
+
+public class SetUMLEnumerationMultiValue extends SetGenericMultiValue<EnumerationLiteral> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java
new file mode 100644
index 00000000000..53cd9df2e19
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+import org.eclipse.uml2.uml.EnumerationLiteral;
+
+
+public class SetUMLEnumerationSingleValue extends SetGenericSingleValue<EnumerationLiteral> {
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java
new file mode 100644
index 00000000000..35745fbedac
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java
@@ -0,0 +1,19 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetUnlimitedNaturalMultiValue extends SetGenericMultiValue<Boolean> {
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java
new file mode 100644
index 00000000000..fca13676106
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java
@@ -0,0 +1,21 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.setter;
+
+
+
+public class SetUnlimitedNaturalSingleValue extends SetGenericSingleValue<String> {
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java
new file mode 100644
index 00000000000..294b12f4031
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.queries.tester;
+
+
+
+import java.util.Collection;
+
+import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
+import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
+import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
+import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+
+public class IsAppliedRequiredStereotype implements IJavaModelQuery<Element, Boolean> {
+
+ public Boolean evaluate(Element context, ParameterValueList parameterValues) throws ModelQueryExecutionException {
+ final String steQN = (String)parameterValues.getValueByParameterName(ArgumentUtils.STEREOTYPE_QUALIFIED_NAME);
+ final Stereotype ste = context.getAppliedStereotype(steQN);
+ if(ste == null) {
+ for(final Stereotype appliedStereotype : context.getApplicableStereotypes()) {
+ final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedStereotype);
+ for(final Stereotype current : superClasses) {
+ if(current.getQualifiedName().equals(steQN)) {
+ return Boolean.TRUE;
+ }
+ }
+ }
+ } else {
+ return Boolean.TRUE;
+ }
+ return Boolean.FALSE;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java
new file mode 100644
index 00000000000..d476ed0aea8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java
@@ -0,0 +1,229 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - Don't assume that profiles are in XMI resources (CDO)
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.uml.profilefacet.messages.Messages;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.uml2.uml.Profile;
+
+
+
+/**
+ *
+ * This class provides utilities for the AdditionalContentsFacetSet.
+ * This facetset is used to provide additional contents for table EFacet (Currently,
+ * this main job is to provide FacetSet to edit easily the properties of the stereotypes into a table
+ *
+ */
+public class AdditionalContentsUtils {
+
+ private AdditionalContentsUtils() {
+ //to prevent instanciation
+ }
+
+ public static final String ADDITIONAL_CONTENTS_EPCKAGE_NAME = "AdditionalContentsForTable"; //$NON-NLS-1$
+
+ public static final String ADDITIONAL_CONTENTS_EPACKAGE_NS_URI = "http://www.eclipse.org/papyrustable/additionalcontentsepackage"; //$NON-NLS-1$
+
+ public static final String ADDITIONAL_CONTENTS_EPACKAGE_PREFIX = "additionalcontentsepackage"; //$NON-NLS-1$
+
+ public static final String ADDITIONAL_CONTENTS_FACET_SET_DOCUMENTATION = Messages.AdditionalContentsUtils_ProfileEFacetDescription;
+
+ public static final String ADDITIONAL_CONTENTS_QUERY_SET_NAME = "AdditionalContentsModelQuerySetForTable"; //$NON-NLS-1$
+
+ public static EPackage createAdditionalContentsEPackage() {
+ final EPackage additionFeatureRootFacetSet = EcoreFactory.eINSTANCE.createEPackage();
+ additionFeatureRootFacetSet.setName(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPCKAGE_NAME);
+ additionFeatureRootFacetSet.setNsPrefix(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_PREFIX);
+ additionFeatureRootFacetSet.setNsURI(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_NS_URI);
+ return additionFeatureRootFacetSet;
+ }
+
+ public static EPackage getAdditionalContentsEPackage(final PapyrusTableInstance table) {
+ EPackage ePackage = null;
+ final ModelSet modelSet = (ModelSet)table.eResource().getResourceSet();
+ final Resource resource = modelSet.getAssociatedResource(table.eResource(), NotationModel.NOTATION_FILE_EXTENSION, true);
+ final Iterator<EObject> iter = resource.getContents().iterator();
+ while(iter.hasNext() && ePackage == null) {
+ final EObject current = iter.next();
+ if(current instanceof EPackage) {
+ final EPackage tmp = (EPackage)current;
+ if(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_NS_URI.equals(tmp.getNsURI())) {
+ ePackage = tmp;
+ }
+ }
+ }
+
+ return ePackage;
+ }
+
+ /**
+ *
+ * @param source
+ * a resource
+ * @return
+ * return the EPackage with the uri {@link #ADDITIONAL_CONTENTS_FACET_SET_NS_URI} in the resource or <code>null</code> if not found
+ */
+ public static EPackage getAdditionalContentsEPackage(final Resource source) {
+ if(source != null) {
+ EPackage additionalSet = null;
+ Iterator<EObject> iter = source.getContents().iterator();
+ while(iter.hasNext() && additionalSet == null) {
+ final EObject contents = iter.next();
+ if(contents instanceof EPackage && AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_NS_URI.equals(((EPackage)contents).getNsURI())) {
+ additionalSet = (EPackage)contents;
+ }
+ }
+ return additionalSet;
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param resourceSet
+ * a resource set
+ * @return all ProfileFacetSet owned by the resource setassuming that :
+ * <ul>
+ * <li>the ProfileFacetSet are stored as root of the resource</li>
+ * <li>the ProfileFacetSet are stored in the notation file</li>
+ * </ul>
+ */
+ public static final Collection<ProfileFacetSet> getAllProfileFacetSets(final ResourceSet resourceSet) {
+ final Collection<ProfileFacetSet> facetSets = new HashSet<ProfileFacetSet>();
+ final TransactionalEditingDomain domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(resourceSet);
+
+ for(final Resource current : resourceSet.getResources()) {
+ //we assume that all ProfileFacetSet are stored into notation files
+ if(NotationModel.NOTATION_FILE_EXTENSION.equals(current.getURI().fileExtension()) && !domain.isReadOnly(current)) {
+ final EPackage additionalContentsEPackage = getAdditionalContentsEPackage(current);
+ if(additionalContentsEPackage != null) {
+ for(final EPackage currentEPackage : additionalContentsEPackage.getESubpackages()) {
+ if(currentEPackage instanceof ProfileFacetSet) {
+ facetSets.add((ProfileFacetSet)currentEPackage);
+ }
+ }
+ }
+ }
+ }
+ return facetSets;
+ }
+
+ /**
+ *
+ * @param profile
+ * a profile
+ * @return
+ * the list of the existing {@link ProfileFacetSet} for this profile.
+ * This is a collection, because in case of a model splitted in several file, we could have several representation for the same profile
+ */
+ public static final Collection<ProfileFacetSet> getAllFacetSet(final Profile profile) {
+ final String profileID = profile.eResource().getURIFragment(profile);
+
+ final Collection<ProfileFacetSet> facetSets = new HashSet<ProfileFacetSet>();
+ final ResourceSet resourceSet = profile.eResource().getResourceSet();
+
+ final Collection<ProfileFacetSet> allExistingFacetSets = getAllProfileFacetSets(resourceSet);
+ for(final ProfileFacetSet current : allExistingFacetSets) {
+ if(profileID.equals(((ProfileFacetSet)current).getRepresentedElement_XMI_ID())) {
+ facetSets.add(current);
+ }
+ }
+ return facetSets;
+ }
+
+ /**
+ *
+ * @param profileFacetSet
+ * a profile facet set
+ * @return
+ * the list all {@link StereotypeFacet} owned by this {@link ProfileFacetSet} and its sub - {@link ProfileFacetSet}
+ */
+ public static final Collection<StereotypeFacet> getAllStereotypeFacets(final ProfileFacetSet profileFacetSet) {
+ final Collection<StereotypeFacet> facets = new HashSet<StereotypeFacet>();
+ for(final ProfileFacetSet current : profileFacetSet.getSubProfileFacetSet()) {
+ facets.addAll(getAllStereotypeFacets(current));
+ }
+ facets.addAll(profileFacetSet.getStereotypeFacets());
+ return facets;
+ }
+
+ /**
+ *
+ * @param resourceSet
+ * a resourceset
+ * @return
+ * <code>true</code> if there is not several ProfileFacetSet representing Profile with the same ID in the same resource.
+ * That is to say that we can have seral ProfileFacetSet representing Profile with the same id owned by differents resources!
+ */
+ public static final boolean areAllFacetSetUniqueByResource(final ResourceSet resourceSet) {
+ final Map<String, Collection<Resource>> XMI_ID_Resource = new HashMap<String, Collection<Resource>>();
+ final Collection<ProfileFacetSet> allExistingProfileFacetSet = getAllProfileFacetSets(resourceSet);
+ for(ProfileFacetSet profileFacetSet : allExistingProfileFacetSet) {
+ final String id = profileFacetSet.getRepresentedElement_XMI_ID();
+ if(XMI_ID_Resource.containsKey(id)) {
+ if(XMI_ID_Resource.get(id).contains(profileFacetSet.eResource())) {
+ return false;
+ }
+ } else {
+ Collection<Resource> res = new ArrayList<Resource>();
+ XMI_ID_Resource.put(id, res);
+ }
+ XMI_ID_Resource.get(id).add(profileFacetSet.eResource());
+ }
+ return true;
+ }
+
+ /**
+ *
+ * @param profile
+ * a profile
+ * @param additionalResourceEPackage
+ * an epackage
+ * @return
+ * the {@link ProfileFacetSet} for this profile if it is owned by the epackage or <code>null</code> if not found
+ */
+ public static final ProfileFacetSet findProfileFacetSet(final Profile profile, final EPackage additionalResourceEPackage) {
+ final XMIResource resource = (XMIResource)profile.eResource();
+ final String profileID = resource.getID(profile);
+ for(final EPackage current : additionalResourceEPackage.getESubpackages()) {
+ if(current instanceof ProfileFacetSet) {
+ if(profileID.equals(((ProfileFacetSet)current).getRepresentedElement_XMI_ID())) {
+ return (ProfileFacetSet)current;
+ }
+ }
+ }
+ return null;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java
new file mode 100644
index 00000000000..0bd18765c6f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java
@@ -0,0 +1,29 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+
+public class ArgumentUtils {
+
+
+ private ArgumentUtils() {
+ //to prevent instanciation
+ }
+
+ public static final String STEREOTYPE_QUALIFIED_NAME = "stereotypeQualifiedName";
+
+ public static final String EDITED_FEATURE = "editedFeature";
+
+ public static final String EDITING_DOMAIN = "editingDomain";
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java
new file mode 100644
index 00000000000..3d91238f683
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+
+
+public class ModelQuerySetUtil {
+
+
+ private ModelQuerySetUtil() {
+ //to prevent instanciation
+ }
+
+ /**
+ *
+ * @param eobject
+ * this object can be an instance of :
+ * <ul>
+ * <li>{@link FacetStructuralFeature}</li>
+ * <li>{@link Facet}</li>
+ * <li>{@link ProfileFacetSet}</li>
+ * </ul>
+ * @return
+ * the {@link ModelQuerySet} used by this eobject. We assume that all {@link Facet} and {@link FacetStructuralFeature} uses the same
+ * {@link ModelQuerySet} for those queries
+ */
+ public static final ModelQuerySet getModelQuerySet(final EObject eobject) {
+ if(eobject instanceof FacetStructuralFeature) {
+ return ((FacetStructuralFeature)eobject).getValueQuery().getModelQuerySet();
+ }
+ if(eobject instanceof Facet) {
+ return ((Facet)eobject).getConditionQuery().getModelQuerySet();
+ }
+ if(eobject instanceof FacetSet) {
+ if(((FacetSet)eobject).getFacets().size() != 0) {
+ return getModelQuerySet(((FacetSet)eobject).getFacets().get(0));
+ } else if(((FacetSet)eobject).getESubpackages().size() != 0) {
+ return getModelQuerySet(((FacetSet)eobject).getESubpackages().get(0));
+ }
+ }
+ return null;
+ }
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java
new file mode 100644
index 00000000000..4cffad68a4f
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Column;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetAttributeColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetReferenceColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FeatureColumn;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.emf.commands.RemoveFromResourcecommand;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.uml.profilefacet.messages.Messages;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ *
+ * This class provides the command to destroy all columns, ProfileFacetSet and ModelQuerySet in a ResourceSet for a profile
+ *
+ */
+public class ProfileFacetSetDestroyer {
+
+ /** the reapply profile */
+ final private Profile profile;
+
+ /** the editing domain for the command */
+ final private TransactionalEditingDomain domain;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param profile
+ * tha managed profile
+ */
+ public ProfileFacetSetDestroyer(final Profile profile) {
+ this.profile = profile;
+ domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(profile);
+ }
+
+ /**
+ *
+ * @return
+ * the command to destroy all existing querySet and facetset referecing the reapply profile
+ */
+ public Command getDestroyFacetSetCommand() {
+ final CompoundCommand cmd = new CompoundCommand(Messages.ProfileFacetSetDestroyer_DestroyProfileFacetSetCommand);
+
+ if(!AdditionalContentsUtils.areAllFacetSetUniqueByResource((profile.eResource().getResourceSet()))) {
+ MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.ProfileFacetSetDestroyer_RemoveProfileFacetSetForReappliedProfile, Messages.ProfileFacetSetDestroyer_ErrorMessageOnDeleteProfileFacetSet);
+ return null;
+ }
+
+ //1. get the list of all ProfileFacetSet for this profile
+ final Collection<ProfileFacetSet> facetSets = AdditionalContentsUtils.getAllFacetSet(profile);
+
+ //2. get the list of all StereotypeFacet owned by the previous ProfileFacetSet
+ final Collection<StereotypeFacet> facets = new HashSet<StereotypeFacet>();
+ for(ProfileFacetSet profileFacetSet : facetSets) {
+ facets.addAll(AdditionalContentsUtils.getAllStereotypeFacets(profileFacetSet));
+ }
+
+ //3. find all PapyrusTableInstance using StereotypeFacet of the previous list
+ final Map<PapyrusTableInstance, Collection<StereotypeFacet>> map = getAllPapyrusTableInstanceToManaged(profile.eResource().getResourceSet(), facets);
+
+ //4. we build the command to destroy all Column referencing FacetStructuralFeature owned by one of the managed StereotypeFacet
+ for(final PapyrusTableInstance current : map.keySet()) {
+ for(final Column column : current.getTable().getColumns()) {
+ if(column instanceof FacetAttributeColumn || column instanceof FacetReferenceColumn) {
+ final EObject featureContainer = ((FeatureColumn)column).getFeature().eContainer();
+ if(facets.contains(featureContainer)) {
+ ICommand cc = new AbstractTransactionalCommand(domain, Messages.ProfileFacetSetDestroyer_RemoveColumns, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ current.getTable().getColumns().remove(column);
+ return null;
+ }
+ };
+ cmd.append(new GMFtoEMFCommandWrapper(cc));
+ cc = null;
+ }
+ }
+ }
+
+ //4.1 remove the application of the facet for the current table
+ ICommand cc = new AbstractTransactionalCommand(domain, Messages.ProfileFacetSetDestroyer_RemoveFacetSetAppliedOnTheTable, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ current.getTable().getFacets2().removeAll(map.get(current));
+ return null;
+ }
+ };
+ cmd.append(new GMFtoEMFCommandWrapper(cc));
+
+
+ }
+
+ //5. we build a map, with the EPackage additional contents as key and the list of ProfileFacetSet that they own and that we should remove as value
+ final Map<EPackage, Collection<ProfileFacetSet>> ePackage_ProfileFacetSet = new HashMap<EPackage, Collection<ProfileFacetSet>>();
+ for(final ProfileFacetSet set : facetSets) {
+ final EPackage pack = (EPackage)set.eContainer();
+ if(!ePackage_ProfileFacetSet.containsKey(pack)) {
+ ePackage_ProfileFacetSet.put(pack, new ArrayList<ProfileFacetSet>());
+ }
+ ePackage_ProfileFacetSet.get(pack).add(set);
+ }
+
+ //6. we build the command to unreference the ProfileFacetSet and their associated QuerySet
+ for(final EPackage pack : ePackage_ProfileFacetSet.keySet()) {
+ final Collection<ProfileFacetSet> value = ePackage_ProfileFacetSet.get(pack);
+
+ //6.1 : remove the facetset of the EPackage
+ ICommand cc = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ pack.getESubpackages().removeAll(value);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+
+ cmd.append(new GMFtoEMFCommandWrapper(cc));
+
+ //6.2 we remove the additional contents EPackage if needed. We can't know before to execute the method in case of SEVERAL profile re-application
+ cc = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ if(pack.getESubpackages().size() == 0) {
+ new RemoveFromResourcecommand(domain, pack.eResource(), pack).execute();
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cmd.append(new GMFtoEMFCommandWrapper(cc));
+ cc = null;
+
+ //6.3 remove the QuerySet from the resource
+ for(final ProfileFacetSet set : value) {
+ final ModelQuerySet querySet = ModelQuerySetUtil.getModelQuerySet(set);
+ if(querySet != null) {
+ cmd.append(new RemoveFromResourcecommand(domain, querySet.eResource(), querySet));
+ }
+ }
+ }
+ return cmd;
+ }
+
+ /**
+ *
+ * @param resourceSet
+ * a {@link ResourceSet}
+ * @param allKnownFacets
+ * the collection of the know StereotypeFacet
+ * @return
+ * a map with {@link PapyrusTableInstance} as key and a collection of the referenced {@link StereotypeFacet} contained by allKnownFacets
+ * that they reference
+ */
+ public Map<PapyrusTableInstance, Collection<StereotypeFacet>> getAllPapyrusTableInstanceToManaged(final ResourceSet resourceSet, final Collection<StereotypeFacet> allKnownFacets) {
+ final Map<PapyrusTableInstance, Collection<StereotypeFacet>> map = new HashMap<PapyrusTableInstance, Collection<StereotypeFacet>>();
+ for(final PapyrusTableInstance pTable : getAllPapyrusTableInstances(resourceSet)) {
+ if(!domain.isReadOnly(pTable.eResource())) {
+ final Collection<StereotypeFacet> usedStereotypeFacets = new ArrayList<StereotypeFacet>();
+ for(final Facet current : pTable.getTable().getFacets2()) {
+ if(current instanceof StereotypeFacet && allKnownFacets.contains(current)) {
+ usedStereotypeFacets.add((StereotypeFacet)current);
+ }
+ }
+ if(!usedStereotypeFacets.isEmpty()) {
+ map.put(pTable, usedStereotypeFacets);
+ }
+ }
+ }
+ return map;
+ }
+
+
+ /**
+ *
+ * @param resourceSet
+ * a resourceSet
+ * @return
+ * a collection owning all {@link PapyrusTableInstance} owned by {@link Resource} of the {@link ResourceSet}
+ */
+ public static final Collection<PapyrusTableInstance> getAllPapyrusTableInstances(final ResourceSet resourceSet) {
+ final Collection<PapyrusTableInstance> allTables = new ArrayList<PapyrusTableInstance>();
+ for(final Resource resource : resourceSet.getResources()) {
+ for(final EObject current : resource.getContents()) {
+ if(current instanceof PapyrusTableInstance) {
+ allTables.add((PapyrusTableInstance)current);
+ }
+ }
+ }
+ return allTables;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java
new file mode 100644
index 00000000000..d98dcf83666
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java
@@ -0,0 +1,582 @@
+/*****************************************************************************
+ * Copyright (c) 2012 Atos.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Olivier Melois (ATOS) olivier.melois@atos.net - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.Assert;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetAttributeColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetReferenceColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.TableInstance2;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.infra.table.instance.util.TableContentsUtils;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+
+/**
+ * Helper used to move the tables into the right resources when controlling a package.
+ */
+public final class ProfileFacetSetMoveHelper {
+
+
+ private ProfileFacetSetMoveHelper() {
+ //to prevent instanciation
+ }
+
+// public static void addAllPageRefTableMoveCommands(final TransactionalEditingDomain domain, final EObject selection, final Resource source, final Resource target, final SashWindowsMngr windowsMngr, final CompoundCommand commandToModify) {
+// //1. we get the PapyrusTable to move
+// final Collection<PapyrusTableInstance> tables = getPapyrusTableInstances(selection);
+//
+// //2. add pages to the page list
+// for(final PapyrusTableInstance pTable : tables) {
+// final PageRef pageRef = DiUtils.getPageRef(source, pTable);
+// final ICommand addPageCommand = new AbstractTransactionalCommand(domain, "Add Page Command", null) { //$NON-NLS-1$
+//
+// @Override
+// protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+// windowsMngr.getPageList().addPage(pageRef.getPageIdentifier());
+// try {
+// DiUtils.addPageToTabFolder(windowsMngr, pageRef);
+// } catch (final SashEditorException e) {
+// // Activator.log.error(e);
+// return CommandResult.newErrorCommandResult(e);
+// }
+// return CommandResult.newOKCommandResult();
+// }
+// };
+//
+// commandToModify.append(new GMFtoEMFCommandWrapper(addPageCommand));
+// }
+// }
+//
+// /**
+// * Adds commands to move every table that descend from the selection to the target resource.
+// */
+// public static void addAllTableMoveCommands(EditingDomain domain, EObject selection, final Resource source, final Resource target, CompoundCommand commandToModify) {
+//
+// /*
+// * All the tables in the tables that descend from the selection.
+// */
+// // Iterable<EObject> allDescendingPapyrusTables = createDescendantTablesIterable(selection);
+//
+// /*
+// * Making sure the editing domain is transactional.
+// */
+// if(!(domain instanceof TransactionalEditingDomain)) {
+// throw new RuntimeException("Unable to retrieve the transactional editing domain");////$NON-NLS-1$
+// }
+// TransactionalEditingDomain editingDomain = (TransactionalEditingDomain)domain;
+//
+// /*
+// * Moving every table from the new resource.
+// */
+//
+// final Collection<PapyrusTableInstance> pTables = getPapyrusTableInstances(selection);
+// final Collection<TableInstance2> tablesInstances = new ArrayList<TableInstance2>();
+// for(PapyrusTableInstance papyrusTableInstance : pTables) {
+// tablesInstances.add(papyrusTableInstance.getTable());
+// }
+//
+// final ICommand changeResourceCommand = new AbstractTransactionalCommand(editingDomain, "", Collections.emptyList()) { //$NON-NLS-1$
+//
+// @Override
+// protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+// target.getContents().addAll(pTables);
+// target.getContents().addAll(tablesInstances);
+// return CommandResult.newOKCommandResult();
+// }
+// };
+// commandToModify.append(new GMFtoEMFCommandWrapper(changeResourceCommand));
+// }
+//
+//
+// /**
+// *
+// * @param selection
+// * the current selection
+// * @return
+// * the list of the papyrus table instance which have the selection has context
+// */
+// protected static Collection<PapyrusTableInstance> getPapyrusTableInstances(final EObject selection) {
+// final Collection<PapyrusTableInstance> pTables = new ArrayList<PapyrusTableInstance>();
+// Iterable<EObject> allDescendingPapyrusTables = createDescendantTablesIterable(selection);
+// for(EObject eObject : allDescendingPapyrusTables) {
+// if(eObject instanceof PapyrusTableInstance) {
+// pTables.add((PapyrusTableInstance)eObject);
+// }
+// }
+// return pTables;
+//
+// }
+//
+// /**
+// * Creates an iterable containing all the Papyrus Tables that are descending from the context.
+// *
+// * @author olivier melois (Atos)
+// */
+// public static Iterable<EObject> createDescendantTablesIterable(EObject context) {
+//
+// Set<EObject> result = Sets.newHashSet();
+//
+// TreeIterator<EObject> eAllContents = EcoreUtil.getAllProperContents(context, true); // was context.eAllContents().
+// Iterator<EObject> contextAndDescendants = Iterators.concat(eAllContents, Iterators.singletonIterator(context));
+//
+// final Predicate<Setting> keepPapyrusTableInstances = new Predicate<Setting>() {
+//
+// public boolean apply(Setting setting) {
+// boolean result = true;
+// if(setting != null) {
+// EObject settingEObject = setting.getEObject();
+// result &= settingEObject instanceof PapyrusTableInstance;
+// result &= PapyrustableinstancePackage.Literals.PAPYRUS_TABLE_INSTANCE__TABLE == setting.getEStructuralFeature();
+// } else {
+// result = false;
+// }
+// return result;
+// }
+// };
+//
+// /*
+// * Predicate used to keep the usages which are PapyrusTableInstances
+// */
+// Predicate<Setting> keepTableInstances = new Predicate<Setting>() {
+//
+// public boolean apply(Setting setting) {
+// boolean result = true;
+// if(setting != null) {
+// EObject settingEObject = setting.getEObject();
+// result &= settingEObject instanceof TableInstance;
+// result &= setting.getEStructuralFeature() == TableinstancePackage.Literals.TABLE_INSTANCE__CONTEXT;
+//
+// Collection<Setting> references = PapyrusEcoreUtils.getUsages(settingEObject);
+// Iterable<Setting> papyrusTableInstances = Iterables.filter(references, keepPapyrusTableInstances);
+// //Veryfing that there is at least one papyrusTableInstance
+// result = result && !Iterables.isEmpty(papyrusTableInstances);
+//
+// } else {
+// result = false;
+// }
+// return result;
+// }
+// };
+//
+// /*
+// * Function to get the eObject from a setting
+// */
+// Function<Setting, EObject> getEObject = new Function<Setting, EObject>() {
+//
+// public EObject apply(Setting input) {
+// EObject settingEObject = input.getEObject();
+// Collection<Setting> references = PapyrusEcoreUtils.getUsages(settingEObject);
+// Iterable<Setting> papyrusTableInstances = Iterables.filter(references, keepPapyrusTableInstances);
+// //Getting the eobject of thie first element of this iterable.
+// return Iterables.get(papyrusTableInstances, 0).getEObject();
+// }
+//
+// };
+//
+// /*
+// * For the context and his descendants :
+// */
+// while(contextAndDescendants.hasNext()) {
+// EObject current = contextAndDescendants.next();
+// //Usages
+// Iterable<Setting> usages = PapyrusEcoreUtils.getUsages(current);
+// //Filtering to keep only papyrus table instances.
+// Iterable<Setting> tableInstanceSettings = Iterables.filter(usages, keepTableInstances);
+// //Getting the eObjects
+// Iterable<EObject> papyrusTableInstances = Iterables.transform(tableInstanceSettings, getEObject);
+// //Adding all the kept usages.
+// Iterables.addAll(result, papyrusTableInstances);
+// }
+//
+// return result;
+// }
+
+ public static ICommand getMoveAllFacetSetsCommand(TransactionalEditingDomain domain, EObject selection, Resource source, final Resource target) {
+ CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "Move facet sets");
+ final Collection<PapyrusTableInstance> pTables = TableContentsUtils.getPapyrusTableInstances(selection);
+ if(!pTables.isEmpty()) {
+ final Set<Facet> facetsUsed = new HashSet<Facet>();
+ for(PapyrusTableInstance papyrusTableInstance : pTables) {
+ facetsUsed.addAll(papyrusTableInstance.getTable().getFacets2());
+ }
+
+ //1.we get the list of the facetset to move
+ final Set<FacetSet> facetsets = new HashSet<FacetSet>();
+ for(Facet facet : facetsUsed) {
+ final FacetSet facetset = getRootFacetSet(facet);
+ if(facetset.eResource() == source) {
+ facetsets.add(facetset);
+ }
+ }
+ if(!facetsets.isEmpty()) {
+
+ //3. we look for the additionalFacetSet
+ final EPackage additionalEPackageSource = AdditionalContentsUtils.getAdditionalContentsEPackage(source);
+ final EPackage additionalEPackageTarget = AdditionalContentsUtils.getAdditionalContentsEPackage(target);
+
+ //indicate if we should move the additionalFacetSet from the source to the target
+ boolean moveAdditionalFacetSet = facetsets.size() != 0;
+ if(additionalEPackageSource == null && additionalEPackageTarget == null) {
+ //nothing to do
+ } else if(additionalEPackageSource == null && additionalEPackageTarget != null) {
+ //nothing to do
+ } else if(additionalEPackageSource != null) {
+ if(moveAdditionalFacetSet) {
+ if(additionalEPackageTarget != null) {
+ ICommand tmp = getMergeAdditionalContentsEPackageCommand((TransactionalEditingDomain)domain, (XMIResource)source, (XMIResource)target, pTables, facetsets, facetsets, additionalEPackageSource, additionalEPackageTarget);
+ if(tmp != null) {
+ cc.add(tmp);
+ }
+ } else {
+ //we should copy the AdditionalContentsEPackage
+ final Copier copier = new Copier();
+ final EPackage copy = (EPackage)copier.copy(additionalEPackageSource);
+
+ //we copy only the required facetSet, that why we do a clear on the epackage contents
+ copy.getEClassifiers().clear();
+ copy.getESubpackages().clear();
+ final Collection<FacetSet> duplicatedFacetSets = copier.copyAll(facetsets);
+ copy.getESubpackages().addAll(duplicatedFacetSets);
+
+ final Collection<ModelQuerySet> sets = new HashSet<ModelQuerySet>();
+ for(final FacetSet current : facetsets) {
+ final ModelQuerySet tmp = ModelQuerySetUtil.getModelQuerySet(current);
+ if(tmp != null) {
+ sets.add(tmp);
+ }
+ }
+
+ final Collection<ModelQuerySet> duplicatedQuerySet = copier.copyAll(sets);
+ copier.copyReferences();
+ final ICommand addToResource = new AbstractTransactionalCommand((TransactionalEditingDomain)domain, "Add the copy of the Additional Content EPackage to the resource", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ target.getContents().add(copy);
+ target.getContents().addAll(duplicatedQuerySet);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.add(addToResource);
+
+ ICommand tmp2 = getUpdateFacetElementReferencesCommand((TransactionalEditingDomain)domain, pTables, copier);
+ if(tmp2 != null) {
+ cc.add(tmp2);
+ }
+
+ cc.add(getCopyXMI_IDCommand((TransactionalEditingDomain)domain, copier));
+ }
+ }
+ }
+ }
+ }
+ if(cc.isEmpty()) {
+ return null;
+ }
+ return cc;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param sourceResource
+ * the source resource
+ * @param targetResource
+ * the target resource
+ * @param tables
+ * the list of the controlled tables
+ * @param sourceFacetSets
+ * the facetsets referenced by the source resource
+ * @param targetFacetSets
+ * the facetsets referenced by the target resource
+ * @param source
+ * the additional contents EPackage source
+ * @param target
+ * the additional contents EPackage target
+ * @return
+ * the command to merge the contents of the Epakche source into the EPackage target AND duplicating the required ModelQuerySet referenced
+ * by the source FacetSets
+ */
+ private static ICommand getMergeAdditionalContentsEPackageCommand(final TransactionalEditingDomain domain, final XMIResource sourceResource, final XMIResource targetResource, final Collection<PapyrusTableInstance> tables, final Collection<FacetSet> sourceFacetSets, Collection<FacetSet> targetFacetSets, EPackage source, final EPackage target) {
+ CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "Merge additional epackage contents");
+ //1. we init the maps
+ final Map<ModelQuerySet, ModelQuerySet> sourceVSTargetModelQuerySet = new HashMap<ModelQuerySet, ModelQuerySet>();
+ final Map<String, FacetSet> sourceMap = new HashMap<String, FacetSet>();
+ for(final FacetSet current : sourceFacetSets) {
+ final String XMI_ID = sourceResource.getID(current);
+ sourceMap.put(XMI_ID, current);
+ }
+ final Map<String, FacetSet> targeteMap = new HashMap<String, FacetSet>();
+ for(final FacetSet current : targetFacetSets) {
+ final String XMI_ID = targetResource.getID(current);
+ targeteMap.put(XMI_ID, current);
+ }
+
+ //2. we look for the facet set to create
+ for(final String XMI_ID : sourceMap.keySet()) {
+ final FacetSet sourceFacetSet = sourceMap.get(XMI_ID);
+ final FacetSet targetFacetSet = targeteMap.get(XMI_ID);
+ if(targetFacetSet == null) {
+ //we create the facetset
+ final Copier copier = new Copier();
+ final FacetSet copy = (FacetSet)copier.copy(sourceFacetSet);
+ final ModelQuerySet modelQuerySet = ModelQuerySetUtil.getModelQuerySet(sourceFacetSet);
+ if(!sourceVSTargetModelQuerySet.containsKey(modelQuerySet)) {
+ final ModelQuerySet duplicatedQuerySet = (ModelQuerySet)copier.copy(modelQuerySet);
+ sourceVSTargetModelQuerySet.put(modelQuerySet, duplicatedQuerySet);
+ final ICommand addModelQuerySetToResource = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ targetResource.getContents().add(duplicatedQuerySet);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.add(addModelQuerySetToResource);
+ }
+
+ copier.copyReferences();
+ targeteMap.put(XMI_ID, copy);
+ final ICommand addFacetSetToAdditionalContentsFacetSet = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ target.getESubpackages().add(copy);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.add(addFacetSetToAdditionalContentsFacetSet);
+ cc.add(getCopyXMI_IDCommand(domain, copier));
+ ICommand tmp = getUpdateFacetElementReferencesCommand(domain, tables, copier);
+ if(tmp != null) {
+ cc.add(tmp);
+ }
+ }
+ }
+ if(cc.isEmpty()) {
+ return null;
+ } else {
+ return cc;
+ }
+ }
+
+
+ /**
+ *
+ * @param facet
+ * a facet
+ * @return
+ * the root facetset for this facet (the root facetset is maybe not the high level container)
+ */
+ public static final FacetSet getRootFacetSet(final Facet facet) {
+ FacetSet set = (FacetSet)facet.eContainer();
+ while(set.eContainer() != null && set.eContainer() instanceof FacetSet) {
+ set = (FacetSet)set.eContainer();
+ }
+ return set;
+ }
+
+
+ /**
+ * Gets the copy xm i_ id command.
+ *
+ * @param domain
+ * the editing domain for the command
+ * @param map
+ * the map with the source object as key and the target object as value
+ * @return the copy xm i_ id command
+ * the command set the XMI_ID of the source eobject to the target eobject
+ */
+ private static ICommand getCopyXMI_IDCommand(final TransactionalEditingDomain domain, final Map<EObject, EObject> map) {
+ return new AbstractTransactionalCommand(domain, "Copy XMI_ID Command", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ for(final EObject sourceValue : map.keySet()) {
+ final EObject targetValue = map.get(sourceValue);
+ Assert.isNotNull(targetValue);
+ final XMIResource sourceRes = (XMIResource)sourceValue.eResource();
+ final XMIResource targetRes = (XMIResource)targetValue.eResource();
+
+ assert sourceRes != null;
+ assert targetRes != null;
+ final String XMI_ID = sourceRes.getID(sourceValue);
+ targetRes.setID(targetValue, XMI_ID);
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ }
+
+ /**
+ * Gets the update facet element references command.
+ *
+ * @param domain
+ * the editing domain
+ * @param papyrusTables
+ * the list of the controlled tables
+ * @param sourceToTarget
+ * the map with the source element as key and the target element as value
+ * @return the update facet element references command
+ * the command to replace each call to source element by a call to target element in the managed tables or <code>null</code> if there is
+ * nothing to do
+ */
+ private static ICommand getUpdateFacetElementReferencesCommand(final TransactionalEditingDomain domain, final Collection<PapyrusTableInstance> papyrusTables, final Map<EObject, EObject> sourceToTarget) {
+ CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "Update References To facet Element Command");
+ final Collection<TableInstance2> tableInstances = new ArrayList<TableInstance2>();
+ for(final PapyrusTableInstance pTable : papyrusTables) {
+ tableInstances.add(pTable.getTable());
+ }
+ for(final PapyrusTableInstance pTable : papyrusTables) {
+ for(final EObject eobjectSource : sourceToTarget.keySet()) {
+ final EObject eobjectTarget = sourceToTarget.get(eobjectSource);
+ if(eobjectSource instanceof StereotypePropertyElement) {
+ final ECrossReferenceAdapter adapter = ECrossReferenceAdapter.getCrossReferenceAdapter(eobjectSource);
+ for(final Setting setting : adapter.getNonNavigableInverseReferences(eobjectSource)) {
+ final EObject eobject = setting.getEObject();
+ if(eobject instanceof FacetAttributeColumn || eobject instanceof FacetReferenceColumn) {
+ final TableInstance t = (TableInstance)eobject.eContainer();
+ if(tableInstances.contains(t)) {
+ final ICommand cmd = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ EcoreUtil.replace(setting, eobjectSource, eobjectTarget);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.add(cmd);
+ }
+ }
+ }
+ } else if(eobjectSource instanceof Facet) {
+ final ECrossReferenceAdapter adapter = ECrossReferenceAdapter.getCrossReferenceAdapter(eobjectSource);
+ for(final Setting setting : adapter.getNonNavigableInverseReferences(eobjectSource)) {
+ final EObject eobject = setting.getEObject();
+ if(eobject instanceof TableInstance2 && tableInstances.contains(eobject)) {
+ final ICommand cmd = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ EcoreUtil.replace(setting, eobjectSource, eobjectTarget);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.add(cmd);
+ }
+ }
+ }
+ }
+ }
+ if(cc.isEmpty()) {
+ return null;
+ }
+ return cc;
+ }
+
+
+ /**
+ * Creates the mapping between facet sets.
+ *
+ * @param source
+ * the source FacetSet (should be the AdditionalContentsFacetSet source
+ * @param target
+ * the target FacetSet (should be the AdditionalContentsFacetSet target
+ * @return the map
+ * a map with the source elements as key and the target elements as values
+ */
+ private static Map<EObject, EObject> createMappingBetweenFacetSets(final EPackage source, final EPackage target) {
+ final Map<String, EObject> sourceMap = createXMI_ID_MapForFacetSetContents(source);
+ final Map<String, EObject> targetMap = createXMI_ID_MapForFacetSetContents(target);
+ final Map<EObject, EObject> mapping = new HashMap<EObject, EObject>();
+
+ for(final String xmi_id : sourceMap.keySet()) {
+ final EObject key = sourceMap.get(xmi_id);
+ final EObject value = targetMap.get(xmi_id);
+ if(value != null) {
+ mapping.put(key, value);
+ }
+ }
+ return mapping;
+ }
+
+ /**
+ * Creates the xm i_ i d_ map_ for first facet sets.
+ *
+ * @param set
+ * a facetset
+ * @return the map
+ * a map with the XMI_ID of the owned subFacetSet (first level only) as key and the corresponding FacetSet as value
+ */
+ private static Map<String, FacetSet> createXMI_ID_Map_ForFirstFacetSets(final EPackage set) {
+ final Map<String, FacetSet> map = new HashMap<String, FacetSet>();
+ final XMIResource sourceRes = (XMIResource)set.eResource();
+ for(final EPackage current : set.getESubpackages()) {
+ if(current instanceof FacetSet) {
+ final String XMI_ID = sourceRes.getID(current);
+ map.put(XMI_ID, (FacetSet)current);
+ }
+ }
+ return map;
+ }
+
+ /**
+ * Creates the xm i_ i d_ map for facet set contents.
+ *
+ * @param set
+ * a facetset
+ * @return the map
+ * a map with the XMI_ID of the facet as key and its eobject as value
+ */
+ private static Map<String, EObject> createXMI_ID_MapForFacetSetContents(final EPackage set) {
+ final Map<String, EObject> map = new HashMap<String, EObject>();
+ final XMIResource resource = (XMIResource)set.eResource();
+ final Iterator<EObject> iter = set.eAllContents();
+ while(iter.hasNext()) {
+ final EObject key = iter.next();
+ final String XMI_ID = resource.getID(key);
+ map.put(XMI_ID, key);
+ }
+ return map;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java
new file mode 100644
index 00000000000..517833a45e5
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java
@@ -0,0 +1,345 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.edit.command.AddCommand;
+import org.eclipse.emf.edit.command.CommandParameter;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.emf.facet.infra.query.QueryPackage;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.Argument;
+import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.ParametricQuery;
+import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.ParametricqueryPackage;
+import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.StringArgument;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.profilefacet.Activator;
+import org.eclipse.papyrus.uml.profilefacet.generation.factory.ProfileFacetGenericFactory;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.uml2.uml.Profile;
+
+
+public class ProfileFacetSetUpdater {
+
+ final private ProfileFacetSet source;
+
+ final private Profile profile;
+
+ private Map<String, EObjectFacetRepresentation> currentMap;
+
+ private Map<String, EObjectFacetRepresentation> newMap;
+
+ final private TransactionalEditingDomain domain;
+
+ final private ModelQuerySet sourceQuerySet;
+
+ public ProfileFacetSetUpdater(final Profile profile, final ProfileFacetSet source) {
+ this.source = source;
+ this.profile = profile;
+ this.sourceQuerySet = getModelQuerySet(source);
+ domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(profile);
+ }
+
+
+ public static final ModelQuerySet getModelQuerySet(final EObject obj) {
+ if(obj instanceof FacetStructuralFeature) {
+ return ((FacetStructuralFeature)obj).getValueQuery().getModelQuerySet();
+ }
+ if(obj instanceof Facet) {
+ return ((Facet)obj).getConditionQuery().getModelQuerySet();
+ }
+ if(obj instanceof FacetSet) {
+ if(((FacetSet)obj).getFacets().size() != 0) {
+ return getModelQuerySet(((FacetSet)obj).getFacets().get(0));
+ }
+ }
+ return null;
+ }
+
+ public Command getUpdateCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Update ProfileFacetSet command");
+ final ProfileFacetGenericFactory factory = new ProfileFacetGenericFactory();
+ final ProfileFacetSet generatedFacetSet = factory.createProfileFacetSet(this.profile);
+
+ this.currentMap = createMapping(this.source);
+ this.newMap = createMapping(generatedFacetSet);
+
+ //1. we update the name changes
+ Command tmp = getRenameElementCommand();
+ if(tmp != null) {
+ if(tmp.canExecute()) {
+ cmd.append(tmp);
+ } else {
+ Activator.log.warn("Rename ProfileFacetSet Command according to reapplied profile is not executable");
+ }
+ }
+
+// tmp = getAddElementCommand();
+// if(tmp != null) {
+// if(tmp.canExecute()) {
+// cmd.append(tmp);
+// } else {
+// Activator.log.warn("Add ProfileFacetSet element command according to reapplied profile is not executable");
+// }
+// }
+
+ EcoreUtil.delete(generatedFacetSet);
+ return cmd;
+ }
+
+
+ private Map<String, EObjectFacetRepresentation> createMapping(final ProfileFacetSet set) {
+ final Map<String, EObjectFacetRepresentation> map = new HashMap<String, EObjectFacetRepresentation>();
+ map.put(set.getRepresentedElement_XMI_ID(), set);
+ final TreeIterator<EObject> iter = set.eAllContents();
+ while(iter.hasNext()) {
+ final EObject current = iter.next();
+ if(current instanceof EObjectFacetRepresentation) {
+ final String representedEObjectID = ((EObjectFacetRepresentation)current).getRepresentedElement_XMI_ID();
+ map.put(representedEObjectID, (EObjectFacetRepresentation)current);
+ }
+ }
+ return map;
+ }
+
+ private Command getRenameElementCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
+ for(final String xmi_id : currentMap.keySet()) {
+ final ENamedElement current = (ENamedElement)currentMap.get(xmi_id);
+ final ENamedElement new_ = (ENamedElement)newMap.get(xmi_id);
+ if(!current.getName().equals(new_.getName())) {
+
+ //1. update the name
+ CommandParameter commandParameter = new CommandParameter(current, EcorePackage.eINSTANCE.getENamedElement_Name(), new_.getName());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+
+ if(current instanceof EPackage) {
+ //2. update the nsURI
+ commandParameter = new CommandParameter(current, EcorePackage.eINSTANCE.getEPackage_NsURI(), ((EPackage)new_).getNsURI());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+ //3. update the nsPrefix
+ commandParameter = new CommandParameter(current, EcorePackage.eINSTANCE.getEPackage_NsPrefix(), ((EPackage)new_).getNsPrefix());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+ }
+ //4. update the profile qualified name
+ if(current instanceof ProfileFacetSet) {
+ commandParameter = new CommandParameter(current, ProfileFacetPackage.eINSTANCE.getProfileFacetSet_ProfileQualifiedName(), ((ProfileFacetSet)new_).getProfileQualifiedName());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+ }
+
+ //5. update the stereotype qualified name
+ if(current instanceof StereotypeFacet) {
+ commandParameter = new CommandParameter(current, ProfileFacetPackage.eINSTANCE.getStereotypeFacet_StereotypeQualifiedName(), ((StereotypeFacet)new_).getStereotypeQualifiedName());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+
+ final StereotypeFacet facet = (StereotypeFacet)current;
+ final ModelQuery query = facet.getConditionQuery();
+ final ModelQuery newQuery = ((StereotypeFacet)new_).getConditionQuery();
+
+ //5.1 we update the query
+ final Command tmp = getUpdateQueryCommand(newQuery, query);
+ if(tmp != null) {
+ cmd.append(tmp);
+ }
+ }
+
+ //6. update the represented property
+ if(current instanceof StereotypePropertyElement) {
+ //we update the property qualified name
+ commandParameter = new CommandParameter(current, ProfileFacetPackage.eINSTANCE.getStereotypePropertyElement_PropertyQualifiedName(), ((StereotypePropertyElement)new_).getPropertyQualifiedName());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+
+
+ //we should update the set queries
+ final ModelQuery currentSetQuery = ((StereotypePropertyElement)current).getSetQuery();
+ final ModelQuery newSetQuery = ((StereotypePropertyElement)new_).getSetQuery();
+ Command tmp = getUpdateQueryCommand(newSetQuery, currentSetQuery);
+ if(tmp != null) {
+ cmd.append(tmp);
+ }
+
+ //we should update the value queries
+ final ModelQuery currentValueQuery = ((StereotypePropertyElement)current).getValueQuery();
+ final ModelQuery newValueQuery = ((StereotypePropertyElement)new_).getValueQuery();
+
+ tmp = getUpdateQueryCommand(newValueQuery, currentValueQuery);
+ if(tmp != null) {
+ cmd.append(tmp);
+ }
+
+ }
+ }
+ }
+ if(cmd.isEmpty()) {
+ return null;
+ }
+ return cmd;
+ }
+
+ private Command getUpdateQueryCommand(final ModelQuery source, final ModelQuery target) {
+ assert source.eResource() == null;
+ assert target.eResource() != null;
+ final CompoundCommand cmd = new CompoundCommand("Update Query Command");
+ //5.1 update the name of the query
+ CommandParameter commandParameter = new CommandParameter(target, QueryPackage.eINSTANCE.getModelQuery_Name(), source.getName());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+
+ //5.2. we update the description of the setQuery
+ commandParameter = new CommandParameter(target, QueryPackage.eINSTANCE.getModelQuery_Description(), source.getDescription());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+
+ //5.3 update the value of the argument
+ if(target instanceof ParametricQuery) {
+ final ParametricQuery targetParamQuery = (ParametricQuery)target;
+ final ParametricQuery sourceParamQuery = (ParametricQuery)source;
+
+ //4. update the stereotype qualified name
+ final Argument sourceArg = getArgument(sourceParamQuery, ArgumentUtils.STEREOTYPE_QUALIFIED_NAME);
+ final Argument targetArg = getArgument(targetParamQuery, ArgumentUtils.STEREOTYPE_QUALIFIED_NAME);
+ if(sourceArg != null) {
+ assert targetArg != null;
+ assert sourceArg instanceof StringArgument;
+ assert targetArg instanceof StringArgument;
+ commandParameter = new CommandParameter(targetArg, ParametricqueryPackage.eINSTANCE.getStringArgument_Value(), ((StringArgument)sourceArg).getValue());
+ cmd.append(domain.createCommand(SetCommand.class, commandParameter));
+ }
+ }
+ return cmd;
+ }
+
+ private Argument getArgument(final ParametricQuery query, final String argumentName) {
+ for(Argument argument : query.getArguments()) {
+ if(argumentName.equals(argument.getArgumentName())) {
+ return argument;
+ }
+ }
+ return null;
+
+ }
+
+ private Command getMultiplicityPropertyChangeCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
+ return cmd;
+ }
+
+ private Command getPropertyTypeChangeCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
+ //FIXME warning between reference and attribute
+ return cmd;
+ }
+
+ private Command getAddElementCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Add Elements Command");
+ final Collection<String> currentElements = currentMap.keySet();
+ final Collection<String> newElements = newMap.keySet();
+ newElements.removeAll(currentElements);
+
+ final Collection<ProfileFacetSet> newFacetSets = new ArrayList<ProfileFacetSet>();
+ for(final String element : newElements) {
+ final EObjectFacetRepresentation newElement = newMap.get(element);
+ final EObjectFacetRepresentation parent = (EObjectFacetRepresentation)newElement.eContainer();
+
+
+
+
+ final String parentElementId = parent.getRepresentedElement_XMI_ID();
+ if(currentMap.containsKey(parentElementId)) {//we should manage it
+ if(parent instanceof Facet && newElement instanceof FacetStructuralFeature) {
+ CommandParameter param = new CommandParameter(parent, EcorePackage.eINSTANCE.getEClass_EStructuralFeatures(), newElement);
+ cmd.append(domain.createCommand(AddCommand.class, param));
+ } else if(parent instanceof FacetSet && newElement instanceof Facet) {
+ CommandParameter param = new CommandParameter(parent, EcorePackage.eINSTANCE.getEPackage_EClassifiers(), newElement);
+ cmd.append(domain.createCommand(AddCommand.class, param));
+ } else if(parent instanceof FacetSet && newElement instanceof FacetSet) {
+ CommandParameter param = new CommandParameter(parent, EcorePackage.eINSTANCE.getEPackage_ESubpackages(), newElement);
+ cmd.append(domain.createCommand(AddCommand.class, param));
+ }
+ final Collection<ModelQuery> unsavedQueries = getAllUnsavedQueries(newElement);
+ if(unsavedQueries.size() != 0) {
+ CommandParameter param = new CommandParameter(this.sourceQuerySet, QueryPackage.eINSTANCE.getModelQuerySet_Queries(), unsavedQueries);
+ cmd.append(domain.createCommand(AddCommand.class, param));
+ }
+ } else {
+ //we do nothing, this element we be added in the same time as its parent
+ }
+ }
+ return cmd;
+ }
+
+ private Command getDestroyElementCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
+ return cmd;
+ }
+
+ private Command getMoveElementCommand() {
+ final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
+ return cmd;
+ }
+
+
+ public static Collection<ModelQuery> getAllUnsavedQueries(final EObject object) {
+ final Collection<ModelQuery> queries = new ArrayList<ModelQuery>();
+ if(object instanceof StereotypePropertyElement) {
+ final ModelQuery setQuery = ((StereotypePropertyElement)object).getSetQuery();
+ if(setQuery.eResource() == null) {
+ queries.add(setQuery);
+ }
+ final ModelQuery getQuery = ((StereotypePropertyElement)object).getValueQuery();
+ if(getQuery.eResource() == null) {
+ queries.add(getQuery);
+ }
+ } else if(object instanceof StereotypeFacet) {
+ final ModelQuery conditionQuery = ((StereotypeFacet)object).getConditionQuery();
+ if(conditionQuery.eResource() == null) {
+ queries.add(conditionQuery);
+ }
+ for(final StereotypePropertyElement feature : ((StereotypeFacet)object).getStereotypePropertyElements()) {
+ queries.addAll(getAllUnsavedQueries(feature));
+ }
+ } else if(object instanceof ProfileFacetSet) {
+ for(final StereotypeFacet steFacet : ((ProfileFacetSet)object).getStereotypeFacets()) {
+ queries.addAll(getAllUnsavedQueries(steFacet));
+ }
+ for(final ProfileFacetSet profileFacetSet : ((ProfileFacetSet)object).getSubProfileFacetSet()) {
+ queries.addAll(getAllUnsavedQueries(profileFacetSet));
+ }
+ }
+ return queries;
+ }
+
+
+
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java
new file mode 100644
index 00000000000..8fbf0fd4916
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.profilefacet.utils;
+
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.tools.utils.NameResolutionUtils;
+import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Namespace;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Property;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * This class provides methods to found the real Property represented by a {@link StereotypePropertyElement}
+ *
+ */
+public class StereotypePropertyUtils {
+
+
+ private StereotypePropertyUtils() {
+ //to prevent instanciation
+ }
+
+ /**
+ *
+ * @param tableContext
+ * the context of the table
+ * @param el
+ * a stereotype property element
+ * @return
+ * the property represented by the {@link StereotypePropertyElement} or <code>null</code> if not found
+ */
+ public static final Property findRealStereotypeProperty(final Namespace namespace, final StereotypePropertyElement el) {
+ final String propertyQualifiedName = el.getPropertyQualifiedName();
+ for(final Profile profile : namespace.getNearestPackage().getAllAppliedProfiles()) {
+ final List<NamedElement> properties = NameResolutionUtils.getNamedElements(propertyQualifiedName, profile, UMLPackage.eINSTANCE.getProperty());
+ if(properties.size() == 1) {
+ return (Property)properties.get(0);
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param stereotypedElement
+ * a stereotyped element
+ * @param el
+ * a representation of the stereotype property
+ * @return
+ * the feature represented by the {@link StereotypePropertyElement} or <code>null</code> if not found
+ */
+ public static final EStructuralFeature getEStructuralFeature(final Element stereotypedElement, final StereotypePropertyElement el) {
+ final EObject stereotypeApplication = getStereotypeApplication(stereotypedElement, el);
+ if(stereotypeApplication != null) {
+ final String propertyQN = el.getPropertyQualifiedName();
+ final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
+ return stereotypeApplication.eClass().getEStructuralFeature(propertyName);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param stereotypedElement
+ * a stereotyped element
+ * @param el
+ * a feature representing a stereotype property
+ * @return
+ * the steretoype application required by the stereotype property or <code>null</code> if not found
+ */
+ public static final EObject getStereotypeApplication(final Element stereotypedElement, final StereotypePropertyElement el) {
+ return getStereotypeApplication(stereotypedElement, (StereotypeFacet)el.eContainer());
+ }
+
+ /**
+ *
+ * @param stereotypedElement
+ * a stereotyped element
+ * @param facet
+ * a facet
+ * @return
+ * the stereotype application represented by the facet or <code>null</code> if not found
+ */
+ public static final EObject getStereotypeApplication(final Element stereotypedElement, final StereotypeFacet facet) {
+ final String steQN = facet.getStereotypeQualifiedName();
+ final Stereotype ste = getAppliedStereotype(stereotypedElement, steQN);
+ if(ste != null) {
+ return stereotypedElement.getStereotypeApplication(ste);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param el
+ * an element
+ * @param stereotypeQN
+ * a stereotype qualified name
+ * @return
+ * the stereotype represented by the qualified name or a stereotype which inherits of the stereotype identified by its qualifiedname or
+ * <code>null</code> if not found
+ */
+ public static final Stereotype getAppliedStereotype(final Element el, final String stereotypeQN) {
+ final Stereotype appliedStereotype = el.getAppliedStereotype(stereotypeQN);
+ if(appliedStereotype != null) {
+ return appliedStereotype;
+ } else if(appliedStereotype == null) {//the property can comes from inheritance...
+ for(Stereotype appliedSte : el.getAppliedStereotypes()) {
+ final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedSte);
+ for(final Stereotype current : superClasses) {
+ if(current.getQualifiedName().equals(stereotypeQN)) {
+ return appliedSte;
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @param el
+ * an element
+ * @param facet
+ * the facet representing a stereotype
+ * @return
+ * the stereotype represented by the facet or a sub-stereotype which inherits of the stereotype represented by a facet or
+ * <code>null</code> if not found
+ */
+ public static final Stereotype getAppliedStereotype(final Element el, final StereotypeFacet facet) {
+ return getAppliedStereotype(el, facet.getStereotypeQualifiedName());
+ }
+
+ /**
+ *
+ * @param el
+ * an element
+ * @param facetElement
+ * a facet element which represents a property of a stereotype
+ * @return
+ * the stereotype required by the facet element or a sub-stereotype which inherits of the stereotype required by the facetElement or
+ * <code>null</code> if not found
+ */
+ public static final Stereotype getAppliedStereotype(final Element el, final StereotypePropertyElement facetElement) {
+ return getAppliedStereotype(el, (StereotypeFacet)facetElement.eContainer());
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/.classpath b/deprecated/org.eclipse.papyrus.uml.table.common/.classpath
new file mode 100644
index 00000000000..058117a6391
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry excluding="org/eclipse/papyrus/uml/table/common/factory/CustomizationUtils.java|org/eclipse/papyrus/uml/table/common/factory/ITableCommandFactory.java|org/eclipse/papyrus/uml/table/common/factory/TableCommandFactory.java|org/eclipse/papyrus/uml/table/common/factory/TableInstanceCommandFactory.java|org/eclipse/papyrus/uml/table/common/factory/TableInstanceUtils.java" kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/.project b/deprecated/org.eclipse.papyrus.uml.table.common/.project
new file mode 100644
index 00000000000..7fee8904a11
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.table.common</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.uml.table.common/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.uml.table.common/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..8082aab0da1
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/META-INF/MANIFEST.MF
@@ -0,0 +1,34 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.table.common.editor
+Require-Bundle: org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.profilefacet.generation;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.profilefacet.metamodel;bundle-version="1.0.0",
+ org.eclipse.uml2.uml,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.table.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.table.instance;bundle-version="1.0.0",
+ org.eclipse.emf.facet.widgets.nattable.instance;bundle-version="0.2.1",
+ org.eclipse.emf.facet.widgets.nattable;bundle-version="0.2.1",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.emf.type.core,
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.0.0",
+ org.eclipse.core.expressions,
+ org.eclipse.emf.facet.infra.facet.core;bundle-version="0.2.1",
+ org.eclipse.papyrus.uml.profilefacet;bundle-version="1.0.0",
+ org.eclipse.emf.edit.ui,
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.emf.facet.util.emf.core;bundle-version="0.2.1"
+Bundle-Vendor: %Bundle-Vendor
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %Bundle-Name
+Bundle-Activator: org.eclipse.papyrus.uml.table.common.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.table.common;singleton:=t
+ rue
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/OSGI-INF/l10n/bundle.properties b/deprecated/org.eclipse.papyrus.uml.table.common/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..f207b1e9cc5
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.uml.table.common
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = UML Table Common (Incubation) \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/about.html b/deprecated/org.eclipse.papyrus.uml.table.common/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>June 5, 2007</p>
+<h3>License</h3>
+
+<p>The Eclipse Foundation makes available all content in this plug-in (&quot;Content&quot;). Unless otherwise
+indicated below, the Content is provided to you under the terms and conditions of the
+Eclipse Public License Version 1.0 (&quot;EPL&quot;). A copy of the EPL is available
+at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
+being redistributed by another party (&quot;Redistributor&quot;) and different terms and conditions may
+apply to your use of any object code in the Content. Check the Redistributor's license that was
+provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
+indicated below, the terms and conditions of the EPL still apply to any source code in the Content
+and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
+
+</body>
+</html>
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/build.properties b/deprecated/org.eclipse.papyrus.uml.table.common/build.properties
new file mode 100644
index 00000000000..7602c3aec3e
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ about.html,\
+ OSGI-INF/,\
+ plugin.pdoc
+src.includes = about.html
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/plugin.pdoc b/deprecated/org.eclipse.papyrus.uml.table.common/plugin.pdoc
new file mode 100644
index 00000000000..6a720e9b804
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/plugin.pdoc
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<doc:Documentation xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation" description="This plugin provides classes, handlers, ... for all UML Table Editor">
+ <referent firstName="vincent" lastName="lorenzo" eMail="vincent.lorenzo@cea.fr" currentCompany="CEA-LIST"/>
+</doc:Documentation>
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/plugin.xml b/deprecated/org.eclipse.papyrus.uml.table.common/plugin.xml
new file mode 100644
index 00000000000..0491e4d2b4c
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/plugin.xml
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.uml.table.common.provider.UMLTablePropertyTester"
+ id="org.eclipse.papyrus.uml.table.common.provider"
+ namespace="org.eclipse.papyrus.uml.table.common.provider"
+ properties="isUMLTable"
+ type="org.eclipse.jface.viewers.IStructuredSelection">
+ </propertyTester>
+ </extension>
+ <!--extension
+ point="org.eclipse.ui.handlers">
+ <handler
+ class="org.eclipse.papyrus.uml.table.common.handler.SelectColumnsHandler"
+ commandId="org.eclipse.papyrus.infra.table.common.selectvisiblecolumns">
+ <activeWhen>
+ <and>
+ <with
+ variable="activeEditorId">
+ <equals
+ value="org.eclipse.papyrus.infra.core.papyrusEditor">
+ </equals>
+ </with>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.table.common.provider.isUMLTable"
+ value="true">
+ </test>
+ </with>
+ </and>
+ </activeWhen>
+ </handler>
+ <handler
+ class="org.eclipse.papyrus.uml.table.common.handler.PasteInTableHandler"
+ commandId="org.eclipse.ui.edit.paste">
+ <activeWhen>
+ <with
+ variable="selection">
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.table.common.provider.isUMLTable"
+ value="true">
+ </test>
+ </with>
+ </activeWhen>
+ </handler>
+ </extension>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="true"
+ class="org.eclipse.papyrus.uml.table.common.menu.ContributionFactory"
+ locationURI="popup:org.eclipse.ui.popup.any">
+ </menuContribution>
+ </extension-->
+</plugin>
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/Activator.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/Activator.java
new file mode 100644
index 00000000000..314bcc1b09a
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/Activator.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common;
+
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.table.common"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ public static LogHelper log;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/dialog/ColumnsToShowDialog.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/dialog/ColumnsToShowDialog.java
new file mode 100644
index 00000000000..07c1126c4c4
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/dialog/ColumnsToShowDialog.java
@@ -0,0 +1,558 @@
+/*****************************************************************************
+ * Copyright (c) 2011 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.dialog;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Column;
+import org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidgetInternalUtils;
+import org.eclipse.jface.layout.GridDataFactory;
+import org.eclipse.jface.viewers.IContentProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.TreePath;
+import org.eclipse.jface.viewers.TreeViewer;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.viewers.ViewerFilter;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.table.common.messages.Messages;
+import org.eclipse.papyrus.uml.table.common.provider.SortedFeaturesContentProvider;
+import org.eclipse.papyrus.uml.table.common.widget.FilteredCheckboxTree;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.events.SelectionListener;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.swt.widgets.TreeItem;
+import org.eclipse.ui.dialogs.ContainerCheckedTreeViewer;
+import org.eclipse.ui.dialogs.FilteredTree;
+import org.eclipse.ui.dialogs.PatternFilter;
+import org.eclipse.ui.dialogs.SelectionDialog;
+
+
+public class ColumnsToShowDialog extends SelectionDialog {
+
+ /** the label provider used by the tree viewer */
+ private final ILabelProvider labelProvider;
+
+ /** the content provider used by the tree viewer */
+ private final SortedFeaturesContentProvider contentProvider;
+
+ /** the with of the dialog */
+ private static final int DIALOG_WIDTH = 1000;
+
+ /** the height of the dialog */
+ private static final int DIALOG_HEIGHT = 600;
+
+ /** the direct features */
+ private final Collection<ETypedElement> directFeatures;
+
+ /** the additional features */
+ private final Collection<ENamedElement> additionalFeatures;
+
+ /** the initial selection */
+ private final Collection<ETypedElement> initialSelection;
+
+ /** the tree used to display the direct features */
+ private FilteredTree directFeaturesTree;
+
+ /** the tree used to display the additional features */
+ private FilteredTree additionnalFeaturesTree;
+
+ /** This filter is used to filter additional content */
+ private ViewerFilter additionalContentFilter;
+
+ /** this map provides all the default columns and their current visibility */
+ final private Map<Column, Boolean> defaultColumnsAndVisiblity;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param parentShell
+ * the parent shell
+ * @param defaultColumnsAndVisibility
+ * the visibility of the default columns
+ * @param features
+ * the direct features
+ * @param additionalFeatures
+ * the additional features (FacetSet, Facets or ETypedElement)
+ * @param initialSelection
+ * the initial selection
+ * @param labelProvider
+ * the label provider used by the viewers
+ * @param contentProvider
+ * the content provider used by the viewers
+ */
+ public ColumnsToShowDialog(final Shell parentShell, final Map<Column, Boolean> defaultColumnsAndVisibility, final Collection<ETypedElement> features, final Collection<ENamedElement> additionalFeatures, final Collection<ETypedElement> initialSelection, final ILabelProvider labelProvider, final IContentProvider contentProvider) {
+ super(parentShell);
+ setTitle(Messages.ColumnsToShowDialog_SelecColumnsToShow);
+ this.directFeatures = features;
+ this.additionalFeatures = additionalFeatures;
+ this.labelProvider = labelProvider;
+ this.contentProvider = (SortedFeaturesContentProvider)contentProvider;
+ this.initialSelection = initialSelection;
+ this.additionalContentFilter = new AdditionalContentsFilter(initialSelection);
+ this.defaultColumnsAndVisiblity = defaultColumnsAndVisibility;
+ }
+
+ @Override
+ public void create() {
+ super.create();
+
+ final Composite parent = new Composite((Composite)getDialogArea(), SWT.NONE);
+ final GridLayout layout = new GridLayout(2, true);
+ parent.setLayout(layout);
+ parent.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ final Composite defaultColumnPane = new Composite(parent, SWT.NONE);
+ defaultColumnPane.setLayout(new GridLayout(1, false));
+ final GridData data = new GridData(SWT.FILL, SWT.BEGINNING, true, false);
+ data.horizontalSpan = 2;
+ defaultColumnPane.setLayoutData(data);
+
+ final Composite selectorPane = new Composite(parent, SWT.NONE);
+ selectorPane.setLayout(new GridLayout(2, false));
+ selectorPane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ final Composite selectedPane = new Composite(parent, SWT.NONE);
+ selectedPane.setLayout(new GridLayout(2, false));
+ selectedPane.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ createDefaultColumnsSection(defaultColumnPane);
+ createDirectFeaturesSection(selectorPane);
+ createAdditionalFeaturesSection(selectedPane);
+
+ getShell().pack();
+
+ //TODO
+ // super.getShell().setImage(Activator.getDefault().getImage("/icons/papyrus.png")); //$NON-NLS-1$
+ }
+
+
+ protected void createDefaultColumnsSection(final Composite selectorPane) {
+ final Composite featureComposite = new Composite(selectorPane, SWT.BORDER);
+ featureComposite.setLayout(new GridLayout(3, false));
+ featureComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ final Label label = new Label(featureComposite, SWT.NONE);
+ label.setText("Default Columns");
+ final GridData data = new GridData(SWT.FILL, SWT.FILL, true, true);
+ data.horizontalSpan = 3;
+ label.setLayoutData(data);
+
+ for(final Column current : defaultColumnsAndVisiblity.keySet()) {
+ Button button = new Button(featureComposite, SWT.CHECK);
+ button.setText(NatTableWidgetInternalUtils.getColumnName(current));
+ button.setSelection(defaultColumnsAndVisiblity.get(current));
+ button.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ ColumnsToShowDialog.this.defaultColumnsAndVisiblity.put(current, !ColumnsToShowDialog.this.defaultColumnsAndVisiblity.get(current));
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ //nothing to do
+ }
+ });
+ }
+ }
+
+ /**
+ *
+ * @param parent
+ * the parent of the button panel
+ * @return
+ * the composite used as parent for the buttons
+ */
+ protected Composite createButtonPanel(final Composite parent) {
+ final Composite buttonsPanel = new Composite(parent, SWT.NONE);
+ final GridLayout buttonPanelLayout = new GridLayout(2, true);
+ buttonPanelLayout.marginWidth = 0;
+ buttonPanelLayout.marginHeight = 0;
+ buttonsPanel.setLayout(buttonPanelLayout);
+ buttonsPanel.setLayoutData(new GridData(SWT.END, SWT.FILL, false, false));
+ return buttonsPanel;
+ }
+
+ /**
+ * Create the direct features section
+ *
+ * @param parent
+ * crate the feature section
+ *
+ */
+ protected void createDirectFeaturesSection(final Composite parent) {
+ //1. create the composite used for this section
+ final Composite featureComposite = new Composite(parent, SWT.BORDER);
+ featureComposite.setLayout(new GridLayout(1, false));
+ featureComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ //2. create the label of the section
+ final Label label = new Label(featureComposite, SWT.NONE);
+ label.setText(Messages.ColumnsToShowDialog_DirectFeatures);
+
+ //3. create the tree
+ this.directFeaturesTree = new FilteredCheckboxTree(featureComposite, SWT.BORDER | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK, new PatternFilter());
+ GridDataFactory.fillDefaults().grab(true, true).applyTo(this.directFeaturesTree);
+
+ this.directFeaturesTree.getViewer().setLabelProvider(this.labelProvider);
+ this.directFeaturesTree.getViewer().setContentProvider(this.contentProvider);
+ this.directFeaturesTree.getViewer().setInput(this.directFeatures);
+
+ //3.bis set the initial selection
+ ((ContainerCheckedTreeViewer)this.directFeaturesTree.getViewer()).setCheckedElements(this.initialSelection.toArray());
+
+ //4. create the buttons select all and deselect all
+ final Composite buttonsPanel = createButtonPanel(featureComposite);
+ final Button selectAllFeaturesButton = new Button(buttonsPanel, SWT.NONE);
+ selectAllFeaturesButton.setText(Messages.ColumnsToShowDialog_SelectAll);
+ selectAllFeaturesButton.setToolTipText(Messages.ColumnsToShowDialog_SelectAllAvailablesFeatures);
+ selectAllFeaturesButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ selectAllFeaturesButton.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(final SelectionEvent e) {
+ selectAllDirectFeatures();
+ }
+
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ //nothing to do
+ }
+ });
+
+ final Button deselectAllFeaturesButton = new Button(buttonsPanel, SWT.NONE);
+ deselectAllFeaturesButton.setText(Messages.ColumnsToShowDialog_DeselectedAll);
+ deselectAllFeaturesButton.setToolTipText(Messages.ColumnsToShowDialog_DeselecteAllAvailableFeatures);
+ deselectAllFeaturesButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ deselectAllFeaturesButton.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(final SelectionEvent e) {
+ deselectAllDirectFeatures();
+ }
+
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ //nothing to do
+ }
+ });
+
+ }
+
+
+
+ protected void createAdditionalFeaturesSection(final Composite facetPane) {
+ //1. create the composite used for this section
+ final Composite facetComposite = new Composite(facetPane, SWT.BORDER);
+ facetComposite.setLayout(new GridLayout(1, true));
+ facetComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+
+ //2. create the label for this section
+ final Label label = new Label(facetComposite, SWT.NONE);
+ label.setText(Messages.ColumnsToShowDialog_AdditionalFeatures);
+
+ //3. create the tree for this section
+ this.additionnalFeaturesTree = new FilteredCheckboxTree(facetComposite, SWT.BORDER | SWT.MULTI | SWT.H_SCROLL | SWT.V_SCROLL | SWT.CHECK, new PatternFilter());//, true);
+ // GridDataFactory.fillDefaults().grab(true, true).applyTo(this.additionnalFeaturesTree);
+ this.additionnalFeaturesTree.getViewer().expandAll();
+ this.additionnalFeaturesTree.getViewer().addFilter(this.additionalContentFilter);
+ this.additionnalFeaturesTree.getViewer().setLabelProvider(this.labelProvider);
+ this.additionnalFeaturesTree.getViewer().setContentProvider(this.contentProvider);
+ this.additionnalFeaturesTree.getViewer().setInput(this.additionalFeatures);
+ ((ContainerCheckedTreeViewer)this.additionnalFeaturesTree.getViewer()).setCheckedElements(this.initialSelection.toArray());
+
+ //4. create the buttons select all , deselect all and Show Advanced Contents
+ final Composite allButtonsPanel = new Composite(facetComposite, SWT.NONE);
+ final GridLayout buttonPanelLayout = new GridLayout(2, true);
+ buttonPanelLayout.marginWidth = 0;
+ buttonPanelLayout.marginHeight = 0;
+ allButtonsPanel.setLayout(buttonPanelLayout);
+ allButtonsPanel.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false));
+
+ final Button showAdvancedContents = new Button(allButtonsPanel, SWT.CHECK);
+ showAdvancedContents.setText(Messages.ColumnsToShowDialog_AdvancedMode);
+ showAdvancedContents.setToolTipText(Messages.ColumnsToShowDialog_ShowAllPossibilities);
+ showAdvancedContents.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ showAdvancedContents.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(SelectionEvent e) {
+ TreePath[] treePaths = additionnalFeaturesTree.getViewer().getExpandedTreePaths();
+ if(showAdvancedContents.getSelection()) {
+ additionnalFeaturesTree.getViewer().removeFilter(additionalContentFilter);
+ } else {
+ additionnalFeaturesTree.getViewer().addFilter(additionalContentFilter);
+ }
+ additionnalFeaturesTree.getViewer().setExpandedTreePaths(treePaths);
+ }
+
+ public void widgetDefaultSelected(SelectionEvent e) {
+ //nothing to do
+ }
+ });
+
+ final Composite buttonsPanel = createButtonPanel(allButtonsPanel);
+ final Button selectAllAdditionalFeaturesButton = new Button(buttonsPanel, SWT.NONE);
+ selectAllAdditionalFeaturesButton.setText(Messages.ColumnsToShowDialog_SelectAll);
+ selectAllAdditionalFeaturesButton.setToolTipText(Messages.ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures);
+ selectAllAdditionalFeaturesButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ selectAllAdditionalFeaturesButton.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(final SelectionEvent e) {
+ selectAllAdditionalFeatures();
+ }
+
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ //nothing to do
+ }
+ });
+
+ final Button deselectAllAdditionalFeaturesButton = new Button(buttonsPanel, SWT.NONE);
+ deselectAllAdditionalFeaturesButton.setText(Messages.ColumnsToShowDialog_DeselectAll);
+ deselectAllAdditionalFeaturesButton.setToolTipText(Messages.ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures);
+ deselectAllAdditionalFeaturesButton.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
+ deselectAllAdditionalFeaturesButton.addSelectionListener(new SelectionListener() {
+
+ public void widgetSelected(final SelectionEvent e) {
+ deselectAllAdditionalFeatures();
+ }
+
+ public void widgetDefaultSelected(final SelectionEvent e) {
+ //nothing to do
+ }
+ });
+ }
+
+
+
+ /**
+ * select all additional features
+ */
+ protected void selectAllAdditionalFeatures() {
+ final ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer)this.additionnalFeaturesTree.getViewer();
+ for(final Object current : this.additionalFeatures) {
+ viewer.setSubtreeChecked(current, true);
+ }
+ }
+
+ /**
+ * deselect all additional features
+ */
+ protected void deselectAllAdditionalFeatures() {
+ final ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer)this.additionnalFeaturesTree.getViewer();
+ for(final Object current : this.additionalFeatures) {
+ viewer.setSubtreeChecked(current, false);
+ }
+ }
+
+ /**
+ * select all direct features
+ */
+ protected void selectAllDirectFeatures() {
+ final ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer)this.directFeaturesTree.getViewer();
+ for(final Object current : this.directFeatures) {
+ viewer.setSubtreeChecked(current, true);
+ }
+ }
+
+ /**
+ * deselect all direct features
+ */
+ protected void deselectAllDirectFeatures() {
+ final ContainerCheckedTreeViewer viewer = (ContainerCheckedTreeViewer)this.directFeaturesTree.getViewer();
+ for(final Object current : this.directFeatures) {
+ viewer.setSubtreeChecked(current, false);
+ }
+ }
+
+ public void pressOk() {
+ okPressed();
+ }
+
+ /**
+ * The <code>ListSelectionDialog</code> implementation of this <code>Dialog</code> method builds a list of the selected elements for
+ * later retrieval by the client and closes this dialog.
+ */
+ @Override
+ protected void okPressed() {
+ final Collection<ETypedElement> selectedFeatures = getAllChechedElements(this.directFeaturesTree);
+ final Collection<ETypedElement> selectedAdditionalFeatures = getAllChechedElements(this.additionnalFeaturesTree);
+
+ final List<Collection<ETypedElement>> result = new ArrayList<Collection<ETypedElement>>();
+ result.add(selectedFeatures);
+ result.add(selectedAdditionalFeatures);
+ setResult(result);
+ super.okPressed();
+ }
+
+ /**
+ *
+ * @param tree
+ * a tree
+ * @return
+ * all items checked ignoring grayed elements
+ */
+ protected Collection<ETypedElement> getAllChechedElements(final FilteredTree tree) {
+ final Collection<ETypedElement> checkedElements = new HashSet<ETypedElement>();
+ final TreeViewer viewer = tree.getViewer();
+ final TreeItem[] items = viewer.getTree().getItems();
+ for(final TreeItem treeItem : items) {
+ if(treeItem.getChecked()) {
+ final Object data = treeItem.getData();
+ if(data instanceof ETypedElement) {
+ checkedElements.add((ETypedElement)data);
+ }
+ }
+ if(treeItem.getChecked() || treeItem.getGrayed()) {
+ checkedElements.addAll(getAllCheckedSubItems(treeItem));
+ }
+ }
+ return checkedElements;
+ }
+
+ /**
+ *
+ * @param item
+ * a item
+ * @return
+ * all sub items checked ignoring grayed items
+ */
+ protected Collection<ETypedElement> getAllCheckedSubItems(final TreeItem item) {
+ final Collection<ETypedElement> checkedElements = new HashSet<ETypedElement>();
+ for(final TreeItem current : item.getItems()) {
+ if(current.getGrayed()) {
+
+ } else if(current.getChecked()) {
+ final Object data = current.getData();
+ if(data instanceof ETypedElement) {
+ checkedElements.add((ETypedElement)data);
+ }
+ }
+ checkedElements.addAll(getAllCheckedSubItems(current));
+ }
+
+ return checkedElements;
+ }
+
+ /**
+ *
+ *
+ * @return
+ * the result of the dialog :
+ * an array of 2 List<ETypeElement> : the first list contains the direct features selected and the second one contains the additional
+ * features
+ */
+ @Override
+ public Object[] getResult() {
+ //overriden only for the documentation of the methods
+ return super.getResult();
+ }
+
+
+ /**
+ *
+ * This class allows to filter easily the required additional contents
+ *
+ */
+ public class AdditionalContentsFilter extends ViewerFilter {
+
+ /**
+ * the initial selection
+ */
+ final private Collection<?> initialSelection;
+
+ /**
+ *
+ * Constructor.
+ *
+ * @param iniCollection
+ * the initial selection
+ */
+ public AdditionalContentsFilter(final Collection<?> iniCollection) {
+ this.initialSelection = iniCollection;
+ }
+
+ /**
+ *
+ * @see org.eclipse.jface.viewers.ViewerFilter#select(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object)
+ *
+ * @param viewer
+ * @param parentElement
+ * @param element
+ * @return
+ * <code>true</code> when the element is owned by {@link #initialSelection} or when it contains element which are instance of
+ * StereotypePropertyElement
+ */
+ @Override
+ public boolean select(Viewer viewer, Object parentElement, Object element) {
+ if(element instanceof StereotypeFacet) {
+ final StereotypeFacet facet = (StereotypeFacet)element;
+ for(final StereotypePropertyElement el : facet.getStereotypePropertyElements()) {
+ if(initialSelection.contains(el)) {
+ return true;
+ }
+ }
+ }
+
+ if(element instanceof StereotypePropertyElement) {
+ if(initialSelection.contains(element)) {
+ return true;
+ }
+ }
+
+ if(element instanceof FacetSet || element instanceof Facet || element instanceof FacetStructuralFeature) {
+ if(element instanceof FacetSet) {
+ FacetSet set = (FacetSet)element;
+ TreeIterator<EObject> iter = set.eAllContents();
+ while(iter.hasNext()) {
+ Object current = iter.next();
+ if(current instanceof FacetSet || current instanceof Facet || current instanceof FacetStructuralFeature) {
+ if(select(viewer, null, current)) {
+ return true;
+ }
+ }
+ }
+ } else if(element instanceof Facet) {
+ Facet facet = (Facet)element;
+ //FIXME
+ for(final EStructuralFeature el : facet.getEStructuralFeatures()) {
+ if(initialSelection.contains(el) || el instanceof StereotypePropertyElement) {
+ return true;
+ }
+ }
+ } else if(element instanceof FacetStructuralFeature) {
+ if(initialSelection.contains(element) || element instanceof StereotypePropertyElement) {
+ return true;
+ }
+ }
+ return false;
+ }
+ return false;
+ }
+
+
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/editor/AbstractUMLTableEditor.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/editor/AbstractUMLTableEditor.java
new file mode 100644
index 00000000000..a979e9f0a77
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/editor/AbstractUMLTableEditor.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.editor;
+
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.table.common.editor.AbstractNattableEditor;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.uml.table.common.messages.Messages;
+import org.eclipse.uml2.uml.Element;
+
+
+public abstract class AbstractUMLTableEditor extends AbstractNattableEditor {
+
+ /**
+ * @param servicesRegistry
+ * @param rawModel
+ *
+ */
+ public AbstractUMLTableEditor(final ServicesRegistry servicesRegistry, final PapyrusTableInstance rawModel) {
+ super(servicesRegistry, rawModel);
+ if(!(rawModel.getTable().getContext() instanceof Element)) {
+ throw new UnsupportedOperationException(NLS.bind(Messages.AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage, rawModel.getTable().getContext()));
+ }
+ }
+
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/factory/PapyrusTableInstanceCommandFactory.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/factory/PapyrusTableInstanceCommandFactory.java
new file mode 100644
index 00000000000..f82beb8c7ee
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/factory/PapyrusTableInstanceCommandFactory.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.factory;
+
+import java.util.List;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.TableInstance2;
+import org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget;
+
+
+public class PapyrusTableInstanceCommandFactory {
+
+ private PapyrusTableInstanceCommandFactory(){
+ //to prevent instanciation
+ }
+
+
+ //adapted code from NattableWidget#addRows
+ public static Command getAddRowCommand(final List<EObject> newElements, final TableInstance tableInstance, final NatTableWidget widget){
+ CompoundCommand addRowCommand = org.eclipse.emf.facet.widgets.nattable.internal.TableInstanceCommandFactory.createAddRowsCommand(newElements, widget);
+ //to avoid the creation of facet columns (see bug 397849: [Table]Hidden Facets Columns become visible after drop, creation of paste into the table)
+// if (tableInstance instanceof TableInstance2) {
+// TableInstance2 tableInstance2 = (TableInstance2) tableInstance;
+// try {
+// widget.getFacetContext().clear();
+// widget.getFacetContext().addFacets(tableInstance2.getFacets2());
+// Command setFacetsCommand = org.eclipse.emf.facet.widgets.nattable.internal.TableInstanceCommandFactory.createSetFacetsCommand(
+// tableInstance2.getFacets2(), newElements, widget);
+// if (setFacetsCommand != null && setFacetsCommand.canExecute()) {
+// addRowCommand.append(setFacetsCommand);
+// }
+// } catch (CoreException e) {
+// throw new RuntimeException(e);
+// }
+// }
+ Command loadCustomizationCommand = org.eclipse.emf.facet.widgets.nattable.internal.TableInstanceCommandFactory.createLoadCustomizationsCommand(tableInstance.getCustomizations(), widget);
+ if (loadCustomizationCommand != null && loadCustomizationCommand.canExecute()) {
+ addRowCommand.append(loadCustomizationCommand);
+ }
+ return addRowCommand;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/PasteInTableHandler.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/PasteInTableHandler.java
new file mode 100644
index 00000000000..5f8c4cd3b4b
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/PasteInTableHandler.java
@@ -0,0 +1,326 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.handler;
+
+import java.awt.Toolkit;
+import java.awt.datatransfer.DataFlavor;
+import java.awt.datatransfer.UnsupportedFlavorException;
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.facet.widgets.nattable.INatTableWidget;
+import org.eclipse.emf.facet.widgets.nattable.INatTableWidgetProvider;
+import org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.dialogs.ProgressMonitorDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.window.Window;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
+import org.eclipse.papyrus.infra.emf.dialog.CommandCreationProgressMonitorDialog;
+import org.eclipse.papyrus.infra.table.common.editor.AbstractNattableEditor;
+import org.eclipse.papyrus.infra.table.common.exceptions.ErrorInPastePreparationException;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
+import org.eclipse.papyrus.uml.table.common.Activator;
+import org.eclipse.papyrus.uml.table.common.messages.Messages;
+import org.eclipse.papyrus.uml.table.common.provider.IPasteInTableCommandProvider;
+import org.eclipse.papyrus.uml.table.common.provider.PasteInPapyrusTableCommandProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+
+public class PasteInTableHandler extends AbstractHandler {
+
+ /**
+ * this field is used to determine if we want open a dialog to prevent the user that the command creation and the command execution can take a
+ * long time
+ */
+ private boolean useProgressMonitorDialog = true;
+
+ private final IPasteInTableCommandProvider provider = new PasteInPapyrusTableCommandProvider();
+
+ private NatTableWidget widget = null;
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ widget = (NatTableWidget)getITableWidget();
+ final PapyrusTableInstance papyrusTable = getPapyrusTable();
+ if(papyrusTable != null) {
+ final String contents = getClipboardContents();
+ if(this.useProgressMonitorDialog) {//we create the command using a progress monitor
+ return executeWithProgressMonitorDialog(papyrusTable, contents);
+ } else {
+ return executeWithoutProgressMonitorDialog(papyrusTable, contents);
+ }
+ }
+ return null;
+ }
+
+ protected Object executeWithProgressMonitorDialog(final PapyrusTableInstance pTable, final String contents) {
+ Command createdCommand;
+ int returnCode = Window.OK;
+
+ final CommandCreationProgressMonitorDialog commandCreationDialog = new CommandCreationProgressMonitorDialog(Display.getCurrent().getActiveShell());
+ final ProgressMonitorDialog commandExecutionProgressMonitor = new ProgressMonitorDialog(Display.getCurrent().getActiveShell());
+ commandCreationDialog.getProgressMonitor().setTaskName(Messages.PasteInTableHandler_PasteCreation);
+ try {
+ commandCreationDialog.run(true, true, new IRunnableWithProgress() {
+
+ public void run(final IProgressMonitor cancelProvider) throws InvocationTargetException, InterruptedException {
+ Command cmd;
+ try {
+ cmd = PasteInTableHandler.this.provider.getPasteFromFromStringCommand(pTable, cancelProvider, commandExecutionProgressMonitor, contents, widget);
+ commandCreationDialog.setCreatedCommand(cmd);
+ } catch (ErrorInPastePreparationException e) {
+ commandCreationDialog.setCaughtException(e);
+ commandCreationDialog.setCreatedCommand(null);
+ }
+ }
+ });
+ } catch (final InvocationTargetException e) {
+ Activator.log.error(e);
+ } catch (final InterruptedException e) {
+ Activator.log.error(e);
+ }
+ final Exception e = commandCreationDialog.getCaughtException();
+ if(e != null) {
+ if(e instanceof ErrorInPastePreparationException)
+ NotificationBuilder.createErrorPopup(e.getMessage()).run();
+ return null;
+ }
+
+ returnCode = commandCreationDialog.getReturnCode();
+ createdCommand = commandCreationDialog.getCreatedCommand();
+
+
+ if(returnCode == Window.OK) {
+ if(createdCommand != null) {
+ if(createdCommand.canExecute()) {
+ getEditingDomain().getCommandStack().execute(createdCommand);
+ manageCommandResult(createdCommand.getResult());
+ } else {
+ NotificationBuilder.createErrorPopup(Messages.PasteInTableHandler_ThePasteCommandCantBeExecuted);
+ }
+ } else {
+ //an error occured during the command creation, nothing to do
+ }
+ //we don't use dialogs to do the paste
+ } else if(returnCode == Window.CANCEL) {
+ NotificationBuilder.createInfoPopup(Messages.PasteInTableHandler_PasteCancelled).run();
+ }
+ return null;
+ }
+
+ protected Object executeWithoutProgressMonitorDialog(final PapyrusTableInstance pTable, final String clipboardContents) {
+ Command createdCommand;
+ try {
+ createdCommand = this.provider.getPasteFromFromStringCommand(pTable, null, null, clipboardContents, this.widget);
+ } catch (ErrorInPastePreparationException e) {
+ System.out.println(e.getMessage());
+ return null;
+ }
+
+ getEditingDomain().getCommandStack().execute(createdCommand);
+ manageCommandResult(createdCommand.getResult());
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the current table editor, or <code>null</code> if not found
+ */
+ private AbstractNattableEditor getCurrentTableEditor() {
+ /*
+ final IStructuredSelection selection = (IStructuredSelection)PlatformUI.getWorkbench().getActiveWorkbenchWindow().getSelectionService().getSelection();
+ final Object current = selection.getFirstElement();
+ if (current instanceof EObject) {
+
+ IEditorPart part = null;
+ try {
+ part = ServiceUtilsForResource.getInstance().getNestedActiveIEditorPart(((EObject)current).eResource());
+ } catch (final ServiceException e) {
+ Activator.log.error(e);
+ }
+ if(part instanceof AbstractNattableEditor) {
+ return (AbstractNattableEditor)part;
+ }
+
+ } else*/ {//there is not select when click on a gray part of the table
+ IWorkbenchPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
+ if (part instanceof IMultiDiagramEditor) {
+ part = ((IMultiDiagramEditor)part).getActiveEditor();
+ }
+ if (part instanceof AbstractNattableEditor) {
+ return (AbstractNattableEditor)part;
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the papyrus table
+ */
+ protected PapyrusTableInstance getPapyrusTable() {
+ final IEditorPart part = getCurrentTableEditor();
+ if(part != null) {
+ return (PapyrusTableInstance)part.getAdapter(PapyrusTableInstance.class);
+ }
+ return null;
+ }
+
+ private INatTableWidget getITableWidget() {
+ final IAdaptable editor = getCurrentTableEditor();
+ if(editor != null) {
+ final INatTableWidgetProvider provider = (INatTableWidgetProvider)editor.getAdapter(INatTableWidgetProvider.class);
+ if(provider != null) {
+ return provider.getNatTableWidget();
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the clipboard contents used to build the command
+ */
+ private String getClipboardContents() {
+ // examine system clipboard
+ String bufferSystem = null;
+
+ //using AWT
+ /*
+ final DataFlavor[] dataFlavors = Toolkit.getDefaultToolkit().getSystemClipboard().getAvailableDataFlavors();
+ for(final DataFlavor dataFlavor : dataFlavors) {
+ try {
+ if(dataFlavor.isFlavorTextType() && dataFlavor.isMimeTypeEqual(DataFlavor.stringFlavor)) {
+ bufferSystem = Toolkit.getDefaultToolkit().getSystemClipboard().getData(dataFlavor).toString();
+ }
+ } catch (final Exception e) {
+ Activator.log.error(e);
+ }
+ }
+ */
+ java.awt.datatransfer.Clipboard clipboard = Toolkit.getDefaultToolkit().getSystemClipboard();
+ if (clipboard.isDataFlavorAvailable(DataFlavor.stringFlavor)) {
+ try {
+ bufferSystem = clipboard.getData(DataFlavor.stringFlavor).toString();
+ } catch (UnsupportedFlavorException e) {
+ Activator.log.error(e);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+ //using SWT
+ // final Display display = Display.getCurrent();
+ // final Clipboard cb = new Clipboard(display);
+ // //we use the text transfert
+ // final TextTransfer transfer = TextTransfer.getInstance();
+ //
+ // final Clipboard cb = new Clipboard(clipboard);
+ // final String contents = (String)cb.getContents(transfer);
+
+
+ return bufferSystem;
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#isEnabled()
+ *
+ * @return
+ */
+ @Override
+ public boolean isEnabled() {
+ return this.provider.isPasteEnabled(getPapyrusTable(), getClipboardContents(), getITableWidget());
+ }
+
+ /**
+ *
+ * @return
+ * the editing domain to use to execute the command
+ */
+ private TransactionalEditingDomain getEditingDomain() {
+ TransactionalEditingDomain domain = null;
+ ServicesRegistry serviceRegistry = null;
+ try {
+ serviceRegistry = ServiceUtilsForActionHandlers.getInstance().getServiceRegistry();
+ } catch (final ServiceException e) {
+ Activator.log.error("ServicesRegistry not found", e); //$NON-NLS-1$
+ }
+ try {
+ domain = ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+ } catch (final ServiceException e) {
+ Activator.log.error("Editing Domain not found", e); //$NON-NLS-1$
+ }
+ return domain;
+ }
+
+ /**
+ * allows to define if we want use dialog to prevent the user that the command creation and the command execution can take a long time
+ *
+ */
+ public void setWithProgressMonitorDialog(final boolean useProgressMonitorDialog) {
+ this.useProgressMonitorDialog = useProgressMonitorDialog;
+ }
+
+ private Collection<IStatus> getInterestingIStatus(final Collection<?> result) {
+ final Collection<IStatus> status = new ArrayList<IStatus>();
+ for(final Object current : result) {
+ if(current instanceof IStatus) {
+ status.add((IStatus)current);
+ }
+ }
+ return status;
+ }
+
+ /**
+ *
+ * @param commandResult
+ * the result of the executed command
+ */
+ private void manageCommandResult(final Collection<?> commandResult) {
+ final Collection<IStatus> status = getInterestingIStatus(commandResult);
+ for(IStatus iStatus : status) {
+ final int severity = iStatus.getSeverity();
+ if(severity == IStatus.ERROR || severity == IStatus.WARNING) {
+ Activator.getDefault().getLog().log(iStatus);
+ }
+ }
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectAdditionColumnsPopupUpHandler.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectAdditionColumnsPopupUpHandler.java
new file mode 100644
index 00000000000..47f269cb620
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectAdditionColumnsPopupUpHandler.java
@@ -0,0 +1,206 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.handler;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.TreeSet;
+
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.jface.action.ContributionItem;
+import org.eclipse.jface.action.IContributionItem;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.papyrus.infra.emf.utils.ENamedElementComparator;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.table.common.Activator;
+import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.swt.widgets.MenuItem;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Stereotype;
+
+
+public class SelectAdditionColumnsPopupUpHandler extends SelectColumnsHandler {
+
+
+ private Collection<ETypedElement> newAdditionalContentsSelection;
+
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public SelectAdditionColumnsPopupUpHandler() {
+ final NatTableWidget widget = getTableWidget();
+ final PapyrusTableInstance papyrusTable = getPapyrusTable();
+ if(widget != null && papyrusTable != null) {
+ super.initField(widget, papyrusTable);
+ }
+ }
+
+ /**
+ * Setter for the field newAdditionalContentsSelection
+ *
+ * @param newSelection
+ */
+ public void setNewSelectedAdditionalFeature(final Collection<ETypedElement> newSelection) {
+ this.newAdditionalContentsSelection = newSelection;
+ }
+
+ /**
+ *
+ * @return
+ * the list of the stereotype properties elements which can be used in the table
+ */
+ public final Collection<FacetStructuralFeature> getApplicableStereotypePropertyElements() {
+ final PapyrusTableInstance pTable = getPapyrusTable();
+ final Collection<ENamedElement> allFacetSets = new TreeSet<ENamedElement>(new ENamedElementComparator());
+ allFacetSets.addAll(getFacetSetsUsedInTheTable());
+ allFacetSets.addAll(getAllAdditionalContents());
+
+
+ //1. get all applied stereotypes
+ final Collection<Stereotype> stes = new HashSet<Stereotype>();
+ for(final EObject current : pTable.getTable().getElements()) {
+ if(current instanceof Element) {
+ stes.addAll(((Element)current).getAppliedStereotypes());
+ }
+ }
+
+ //2. get all extended stereotypes
+ final Collection<Stereotype> allStereotypes = new HashSet<Stereotype>();
+ for(final Stereotype current : stes) {
+ allStereotypes.add(current);
+ allStereotypes.addAll(StereotypeUtil.getAllSuperStereotypes(current));
+ }
+
+ //3. build the list of the qualified stereotype name
+ final Collection<String> steQN = new TreeSet<String>();
+ for(final Stereotype ste : stes) {
+ steQN.add(ste.getQualifiedName());
+ }
+
+ //4. create the list of the possible features
+ final Collection<FacetStructuralFeature> features = new ArrayList<FacetStructuralFeature>();
+ for(final ENamedElement set : allFacetSets) {
+ if(set instanceof ProfileFacetSet) {
+ final TreeIterator<EObject> iter = set.eAllContents();
+ while(iter.hasNext()) {
+ final EObject current = iter.next();
+ if(current instanceof StereotypeFacet) {
+ final String QN = ((StereotypeFacet)current).getStereotypeQualifiedName();
+ if(steQN.contains(QN)) {
+ features.addAll(((StereotypeFacet)current).getStereotypePropertyElements());
+ }
+ }
+ }
+ }
+ }
+ return features;
+ }
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.table.common.handler.SelectColumnsHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ @Override
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+ final TransactionalEditingDomain domain = getEditingDomain();
+ final Command cmd = getCreateDestroyAdditonalFeatureColumnsCommand(getPapyrusTable(), getTableWidget(), this.newAdditionalContentsSelection);
+ domain.getCommandStack().execute(cmd);
+ return null;
+ }
+
+ /**
+ * This method allows to contribute to a menu. Its adds check menu to show hide stereotypes properties columns
+ *
+ * @param manager
+ * the menu manager
+ */
+ public void addContributionItems(final MenuManager manager) {
+ IContributionItem item = new ContributionItem() {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void fill(final Menu menu, int index) {
+ final Collection<ETypedElement> initialSelection = getInitialAdditionalFeatureSelected();
+ final Iterator<FacetStructuralFeature> iter = getApplicableStereotypePropertyElements().iterator();
+ while(iter.hasNext()) {
+ final StereotypePropertyElement el = (StereotypePropertyElement)iter.next();
+
+ final MenuItem menuItem = new MenuItem(menu, SWT.CHECK);
+ menuItem.setText(el.getPropertyQualifiedName()); //$NON-NLS-1$
+ if(initialSelection.contains(el)) {
+ menuItem.setSelection(true);
+ }
+ menuItem.addSelectionListener(new SelectionAdapter() {
+
+ @Override
+ public void widgetSelected(final SelectionEvent e) {
+ final boolean toAdd = menuItem.getSelection();
+ final Collection<ETypedElement> newSelection = new ArrayList<ETypedElement>();
+ newSelection.addAll(initialSelection);
+ if(toAdd) {
+ newSelection.add((ETypedElement)el);
+ } else {
+ newSelection.remove(el);
+ }
+ setNewSelectedAdditionalFeature(newSelection);
+ try {
+ execute(new ExecutionEvent());
+ } catch (final ExecutionException e1) {
+ Activator.log.error(e1);
+ }
+ }
+ });
+ }
+ boolean enabled = menu.getItemCount() != 0;
+ menu.setEnabled(enabled);
+ }
+ };
+
+ Menu menu = manager.getMenu();
+ if(menu != null) {
+ menu.setEnabled(false);
+ }
+ manager.add(item);
+
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectColumnsHandler.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectColumnsHandler.java
new file mode 100644
index 00000000000..9a8ced5cd01
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/handler/SelectColumnsHandler.java
@@ -0,0 +1,1038 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.handler;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+import java.util.Map;
+import java.util.Set;
+import java.util.SortedSet;
+import java.util.TreeMap;
+import java.util.TreeSet;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.notify.AdapterFactory;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.ecore.ENamedElement;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.EStructuralFeature.Setting;
+import org.eclipse.emf.ecore.ETypedElement;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetAttribute;
+import org.eclipse.emf.facet.infra.facet.FacetReference;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
+import org.eclipse.emf.facet.infra.query.ModelQuery;
+import org.eclipse.emf.facet.infra.query.ModelQuerySet;
+import org.eclipse.emf.facet.infra.query.QueryFactory;
+import org.eclipse.emf.facet.widgets.celleditors.ICommandFactoriesRegistry;
+import org.eclipse.emf.facet.widgets.celleditors.ICommandFactory;
+import org.eclipse.emf.facet.widgets.nattable.INatTableWidgetProvider;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.AttributeColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Column;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.DefaultLabelColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.EContainerColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetAttributeColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetReferenceColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FeatureColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.MetaClassColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.ReferenceColumn;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableinstanceFactory;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableinstancePackage;
+import org.eclipse.emf.facet.widgets.nattable.internal.ColumnComparator;
+import org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget;
+import org.eclipse.emf.facet.widgets.nattable.internal.TableInstanceCommandFactory;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.utils.ENamedElementComparator;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.infra.table.common.editor.AbstractNattableEditor;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
+import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
+import org.eclipse.papyrus.uml.profilefacet.utils.AdditionalContentsUtils;
+import org.eclipse.papyrus.uml.table.common.dialog.ColumnsToShowDialog;
+import org.eclipse.papyrus.uml.table.common.editor.AbstractUMLTableEditor;
+import org.eclipse.papyrus.uml.table.common.provider.AbstractAdditionalContentsProvider;
+import org.eclipse.papyrus.uml.table.common.provider.EMFFacetColumnsProvider;
+import org.eclipse.papyrus.uml.table.common.provider.ProfileFacetSetProvider;
+import org.eclipse.papyrus.uml.table.common.provider.SortedFeaturesContentProvider;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.IWorkbenchPart;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * Handler for the Show/Hide columns Papyrus version
+ * A FacetSet called in this class AdditionContentsFacetSet is registered in the .notation. It is used to store created facet sets to display
+ * additional columns
+ *
+ * FIXME : the show/hide additional contents should be tested
+ * in the facetset AdditionContentsFacetSet :
+ * - the facetset used by any table should be remove from it and destroyed
+ * - the facetset created should be registered in it
+ * - this facetset should be created if needed
+ * - this facetset should be destroyed if it is not used
+ * - facetset not used should be removed from the table#getFacetSets referencesS
+ *
+ */
+public class SelectColumnsHandler extends AbstractHandler {
+
+ /** all direct features available in the table */
+ final private SortedSet<ETypedElement> allDirectFeatures = new TreeSet<ETypedElement>(new ENamedElementComparator());
+
+ /** all additional possible contents */
+ final private Collection<FacetSet> allAdditionalContents = new HashSet<FacetSet>();
+
+ /** the initial direct features visibles in the table */
+ final private Collection<ETypedElement> initialDirectFeatureSelected = new HashSet<ETypedElement>();
+
+ /** the initial additional features visibles in the table */
+ final private Collection<ETypedElement> initialAdditionalFeatureSelected = new HashSet<ETypedElement>();
+
+ /** the list of the facetSet used in the current table */
+ final private Collection<FacetSet> facetSetsUsedInTheTable = new HashSet<FacetSet>();
+
+ /** the map between existing columns (visible or not) and the feature */
+ final private Map<ETypedElement, Column> columnsFeatureMap = new HashMap<ETypedElement, Column>();
+
+ final private Map<Column, Boolean> defaultColumnsAndVisibility = new TreeMap<Column, Boolean>(new ColumnComparator());
+
+ /**
+ * clear the fields
+ */
+ protected void clearFields() {
+ this.allDirectFeatures.clear();
+ this.initialDirectFeatureSelected.clear();
+ this.initialAdditionalFeatureSelected.clear();
+ this.facetSetsUsedInTheTable.clear();
+ this.columnsFeatureMap.clear();
+ this.allAdditionalContents.clear();
+ this.defaultColumnsAndVisibility.clear();
+ // this.additionalContentProviders.clear();
+ }
+
+
+ private FacetSet getRootFacetSet(final EObject facetElement) {
+
+ EObject container = facetElement;
+ while(container.eContainer() != null) {
+ container = container.eContainer();
+ }
+ if(container instanceof FacetSet) {
+ return (FacetSet)container;
+ }
+
+ if(facetElement instanceof FacetStructuralFeature) {
+ container = facetElement.eContainer().eContainer();
+ }
+ if(facetElement instanceof Facet) {
+ container = facetElement.eContainer();
+ }
+ if(facetElement instanceof FacetSet) {
+ container = facetElement;
+ }
+ assert container instanceof FacetSet;
+ while(container.eContainer() != null && container.eContainer() instanceof FacetSet) {
+ container = container.eContainer();
+ }
+
+ return (FacetSet)container;
+ }
+
+ /**
+ * Inits the fields of this class
+ *
+ * @param widget
+ * the table widget
+ * @param papyrusTable
+ * the papyrus table
+ */
+ protected void initField(final NatTableWidget widget, final PapyrusTableInstance papyrusTable) {
+ clearFields();
+ //the contents of the table
+ final List<EObject> contents = papyrusTable.getTable().getElements();
+
+ //1. Get all direct features
+ for(final EObject current : contents) {
+ this.allDirectFeatures.addAll(current.eClass().getEAllStructuralFeatures());
+ }
+
+ //2. we build the list of the initialSelection
+ final List<Column> visibleColumns = widget.getVisibleColumns(false);
+ final Set<ETypedElement> visibleFeatures = new HashSet<ETypedElement>();
+ for(final Column current : visibleColumns) {
+ if(current instanceof AttributeColumn) {
+ this.initialDirectFeatureSelected.add(((AttributeColumn)current).getFeature());
+ } else if(current instanceof ReferenceColumn) {
+ this.initialDirectFeatureSelected.add(((ReferenceColumn)current).getFeature());
+ } else if(current instanceof FacetAttributeColumn) {
+ this.initialAdditionalFeatureSelected.add(((FacetAttributeColumn)current).getAttribute());
+ } else if(current instanceof FacetReferenceColumn) {
+ this.initialAdditionalFeatureSelected.add(((FacetReferenceColumn)current).getReference());
+ }
+ }
+
+ //FIXME : query columns are not yet managed
+ for(final Column current : papyrusTable.getTable().getColumns()) {
+ if(current instanceof DefaultLabelColumn) {
+ this.defaultColumnsAndVisibility.put(current, !current.isIsHidden());
+ } else if(current instanceof MetaClassColumn) {
+ this.defaultColumnsAndVisibility.put(current, !current.isIsHidden());
+ } else if(current instanceof EContainerColumn) {
+ this.defaultColumnsAndVisibility.put(current, !current.isIsHidden());
+ }
+ }
+
+ for(final Column current : papyrusTable.getTable().getColumns()) {
+ if(current instanceof FeatureColumn) { //FIXME and other columns ?
+ final EStructuralFeature feature = ((FeatureColumn)current).getFeature();
+ //3. we associate each features to each columns
+ assert feature != null;
+ this.columnsFeatureMap.put(feature, current);
+
+ //3 bis. we build the list of the initialSelection
+ if(feature instanceof FacetStructuralFeature) {
+ final FacetSet set = getRootFacetSet(feature);
+ this.facetSetsUsedInTheTable.add(set);
+ }
+ }
+ }
+
+ //4. get the additional features
+ final EPackage additionalContentsPackageRoot = AdditionalContentsUtils.getAdditionalContentsEPackage(papyrusTable);
+ if(additionalContentsPackageRoot != null) {
+ final List<EPackage> sets = additionalContentsPackageRoot.getESubpackages();
+ for(final EPackage ePackage : sets) {
+ if(ePackage instanceof FacetSet) {
+ this.allAdditionalContents.add((FacetSet)ePackage);
+ }
+ }
+ }
+ this.allAdditionalContents.addAll(this.facetSetsUsedInTheTable);
+
+ AbstractAdditionalContentsProvider provider = new EMFFacetColumnsProvider();
+ provider.setPapyrusTable(papyrusTable);
+ this.allAdditionalContents.addAll(provider.getAdditionalFeatures());
+
+ provider = new ProfileFacetSetProvider();
+ provider.setPapyrusTable(papyrusTable);
+ this.allAdditionalContents.addAll(provider.getAdditionalFeatures());
+
+ }
+
+ /**
+ *
+ * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
+ *
+ * @param event
+ * @return
+ * @throws ExecutionException
+ */
+ public Object execute(final ExecutionEvent event) throws ExecutionException {
+
+ final CompoundCommand compoundCmd = new CompoundCommand("Papyrus Show/Hide columns command"); //$NON-NLS-1$
+ final PapyrusTableInstance papyrusTable = getPapyrusTable();
+ final NatTableWidget widget = getTableWidget();
+ final TransactionalEditingDomain domain = getEditingDomain();
+ if(papyrusTable != null && widget != null) {
+ initField(widget, papyrusTable);
+ final Collection<ETypedElement> initialSelection = new ArrayList<ETypedElement>();
+ initialSelection.addAll(this.initialDirectFeatureSelected);
+ initialSelection.addAll(this.initialAdditionalFeatureSelected);
+ final Collection<ENamedElement> allFacetSets = new TreeSet<ENamedElement>(new ENamedElementComparator());
+ allFacetSets.addAll(this.facetSetsUsedInTheTable);
+ allFacetSets.addAll(this.allAdditionalContents);
+
+ SortedFeaturesContentProvider contentProvider = new SortedFeaturesContentProvider();
+ // contentProvider.setInitialSelection((Collection<?>)initialSelection);
+ final ColumnsToShowDialog dialog = new ColumnsToShowDialog(Display.getCurrent().getActiveShell(), defaultColumnsAndVisibility, this.allDirectFeatures, allFacetSets, initialSelection, getLabelProvider(), contentProvider);
+ if(dialog.open() == Window.OK) {
+ final Object[] result = dialog.getResult();
+ final Set<ETypedElement> directFeatures = (Set<ETypedElement>)result[0];
+ final Set<ETypedElement> additionalFeatures = (Set<ETypedElement>)result[1];
+
+ //0. update the visibility for the default columns
+ for(final Column col : this.defaultColumnsAndVisibility.keySet()) {
+ final Command cmd = SetCommand.create(getEditingDomain(), col, TableinstancePackage.eINSTANCE.getColumn_IsHidden(), !this.defaultColumnsAndVisibility.get(col));
+ compoundCmd.append(cmd);
+ }
+
+
+ if(!directFeatures.equals(this.initialDirectFeatureSelected)) {
+ //1. get command to show/hide direct features
+ final Command cmd = getShowHideDirectFeatureColumnsCommand(papyrusTable, (NatTableWidget)widget, directFeatures);
+ if(cmd != null) {
+ compoundCmd.append(cmd);
+ }
+ }
+
+ if(!additionalFeatures.equals(this.initialAdditionalFeatureSelected)) {
+ // 2. get the command to show/hide additional contents
+ final Command cmd2 = getCreateDestroyAdditonalFeatureColumnsCommand(papyrusTable, (NatTableWidget)widget, additionalFeatures);
+ if(cmd2 != null) {
+ compoundCmd.append(cmd2);
+ }
+ }
+ if(!compoundCmd.isEmpty()) {
+ domain.getCommandStack().execute(compoundCmd);
+ }
+
+ }
+ }
+ //we clear the fields
+ clearFields();
+ return null;
+ }
+
+
+ /**
+ *
+ * @param papyrusTable
+ * the papyrus table
+ * @param widget
+ * the widget
+ * @param selectedFeatures
+ * the direct features selected
+ * @return
+ * the command to show/hide the required columns (we doesn't destroy columns, because EMF-Facet will cerate it, if they are required, for
+ * the next added element in the table)
+ */
+ protected Command getShowHideDirectFeatureColumnsCommand(final PapyrusTableInstance papyrusTable, final NatTableWidget widget, final Collection<ETypedElement> selectedFeatures) {
+ final CompoundCommand compoundCmd = new CompoundCommand("Show/Hide direct features command"); //$NON-NLS-1$
+
+ //1. calculus of the columns to show/add
+ final List<ETypedElement> featuresToAdd = new ArrayList<ETypedElement>(selectedFeatures);
+ featuresToAdd.removeAll(this.initialDirectFeatureSelected);
+ //these columns should be set To Visible OR created
+
+ //2. calculus of the columns to hide
+ final List<Object> directFeaturesToHide = new ArrayList<Object>(this.initialDirectFeatureSelected);
+ directFeaturesToHide.removeAll(selectedFeatures);
+
+ //these columns should be hidden
+ final List<Column> columnsToHide = new ArrayList<Column>();
+ for(final Object current : directFeaturesToHide) {
+ final Column toHide = this.columnsFeatureMap.get(current);
+ if(toHide != null) {
+ columnsToHide.add(toHide);
+ }
+ }
+
+ final List<Column> columnsToShow = new ArrayList<Column>();
+
+ //not useful for direct features
+ final List<ETypedElement> columnsToCreate = new ArrayList<ETypedElement>();
+
+ for(final Object currentColumn : featuresToAdd) {
+ if(this.columnsFeatureMap.containsKey(currentColumn)) {
+ columnsToShow.add(this.columnsFeatureMap.get(currentColumn));
+ } else {
+ columnsToCreate.add((ETypedElement)currentColumn);
+ }
+ }
+
+ final TransactionalEditingDomain domain = getEditingDomain();
+
+ Command showHideColumnsCommand = TableInstanceCommandFactory.createShowHideColumnCommand(widget, columnsToShow, columnsToHide, false);
+ if(showHideColumnsCommand != null && showHideColumnsCommand.canExecute()) {
+ compoundCmd.append(showHideColumnsCommand);
+ }
+
+ //columns to create should always be null with direct features!
+ assert columnsToCreate.isEmpty();
+ if(!compoundCmd.isEmpty() && compoundCmd.canExecute()) {
+ return compoundCmd;
+ }
+ return null;
+
+ }
+
+ /**
+ *
+ * - when the AddtionalContentsfacetSet is empty -> it should be removed from the resource
+ * - when the AddtionalContentsfacetSet is not required by a table -> it should be remove of the facetSet referenced by the table
+ * - when a subfacetset is required by any table -> it should be removed of the list of the subfacetset owned by the AddtionalContentsFacetSet
+ *
+ * /!\We assume that the facet used for columns are not used in the same time for others things!
+ *
+ *
+ * This method is complex because, we should manage :
+ * <ul>
+ * <li>the new-selected facet feature used to create new columns</li>
+ * <li>the non-selected facet feature used to remove new columns</li>
+ * <li>the facets of the selected facet features to apply them to the table</li>
+ * <li>the facets of the non-selected facet features to unapply them to the table</li>
+ * <li>the facetset useful to store them in the additional contents EPcakge</li>
+ * <li>the facetset useless to unstore them in the additional contents EPcakge</li>
+ * <li>the creation/destruction of the additional contents EPackage</li>
+ * </ul>
+ *
+ *
+ *
+ * @param papyrusTable
+ * the papyrus table
+ * @param widget
+ * the widget
+ * @param selectedAdditionalFeatures
+ * the addtional features selected
+ * @return
+ * the command to create and destroy the required columns (can be <code>null</code>)
+ * /!\ EMF-Facet allows to hide EMF-Facet columns, so if such column already exists but are not visible, we show them
+ */
+ protected Command getCreateDestroyAdditonalFeatureColumnsCommand(final PapyrusTableInstance papyrusTable, final NatTableWidget widget, final Collection<ETypedElement> selectedAdditionalFeatures) {
+
+ final CompoundCommand compoundCmd = new CompoundCommand("Show/Hide additional features command"); //$NON-NLS-1$
+ final ModelSet resourceSet = (ModelSet)papyrusTable.eResource().getResourceSet();
+ final Resource notationResource = resourceSet.getAssociatedResource(papyrusTable.eResource(), NotationModel.NOTATION_FILE_EXTENSION);
+ final TransactionalEditingDomain domain = getEditingDomain();
+ EPackage additionFeatureRootEPackage = AdditionalContentsUtils.getAdditionalContentsEPackage(papyrusTable);
+
+ //1. calculus of the columns to show/add
+ //these columns should be set to visible or created
+ final List<ETypedElement> featuresToAdd = new ArrayList<ETypedElement>(selectedAdditionalFeatures);
+ featuresToAdd.removeAll(this.initialAdditionalFeatureSelected);
+
+ //we should take into account that EMF-Facet allows to destroy AND hide columns, so some columns can already exists but are currently not visible
+ final List<ETypedElement> columnsToCreate = new ArrayList<ETypedElement>();
+ columnsToCreate.addAll(featuresToAdd);
+ final List<Column> existingColumnsToShow = new ArrayList<Column>();
+
+ final ListIterator<ETypedElement> iter = columnsToCreate.listIterator();
+ while(iter.hasNext()) {
+ final ETypedElement current = iter.next();
+ if(this.columnsFeatureMap.containsKey(current)) {
+ existingColumnsToShow.add(this.columnsFeatureMap.get(current));
+ //the current column already exists, so we should not create it
+ iter.remove();
+ }
+ }
+
+ //2. calculus of the columns to hide/destroy
+ final List<ETypedElement> additionalFeaturesToHide = new ArrayList<ETypedElement>(this.initialAdditionalFeatureSelected);
+ additionalFeaturesToHide.removeAll(selectedAdditionalFeatures);
+
+
+ //3. determine which subfacet and subfacetset for additional contents are useful
+ final Set<FacetSet> requiredSubFacetSets = new HashSet<FacetSet>();
+ final Set<Facet> requiredFacets = new HashSet<Facet>();
+ final Set<FacetSet> requiredRootFacetSet = new HashSet<FacetSet>();
+ for(final ETypedElement current : selectedAdditionalFeatures) {
+ if(current instanceof FacetStructuralFeature) {
+ final Facet facet = (Facet)current.eContainer();
+ requiredFacets.add(facet);
+ requiredSubFacetSets.add((FacetSet)facet.eContainer());
+ requiredRootFacetSet.add(getRootFacetSet(current));
+ }
+ }
+
+ //4. determine which subfacet set for additional contents should be added to the additionalcontents epackage
+ final Collection<FacetSet> facetSetsToStore = getFacetSetToStore(requiredSubFacetSets);
+
+
+ //5. determine which subfacetset for additional contents are not useful in the current table
+ //5 bis. determine which subfacetset for additional contents are never used in the whole model.
+ final Set<FacetSet> uselessRootFacetSetsInAllExistingTable = new HashSet<FacetSet>();
+ final Set<FacetSet> uselessRootFacetSetsInCurrentTable = new HashSet<FacetSet>();
+ if(additionFeatureRootEPackage != null) {
+ for(final EPackage set : additionFeatureRootEPackage.getESubpackages()) {
+ if(set instanceof FacetSet && !requiredRootFacetSet.contains(set)) {
+ uselessRootFacetSetsInCurrentTable.add((FacetSet)set);
+ final TreeIterator<EObject> it = set.eAllContents();
+ boolean useless = true;
+ while(it.hasNext() && useless) {
+ final EObject value = it.next();
+ if(value instanceof FacetStructuralFeature) {
+ final ECrossReferenceAdapter eCrossReference = CrossReferenceAdapter.getCrossReferenceAdapter(papyrusTable.eResource().getResourceSet());
+ final Collection<Setting> references = eCrossReference.getInverseReferences(value, false);
+ final Iterator<Setting> settingIter = references.iterator();
+ while(settingIter.hasNext() && useless) {
+ final EObject ref = settingIter.next().getEObject();
+ //TODO check with memory analyzer! because we can found existing columns with no resources and no container
+ if(ref instanceof Column && ref.eContainer() != null && ref.eResource() != null) {
+ useless = papyrusTable.getTable().getColumns().contains(ref);
+ }
+ }
+ }
+ }
+ if(useless) {
+ uselessRootFacetSetsInAllExistingTable.add((FacetSet)set);
+ }
+ }
+ }
+ }
+
+ // 6.we calculate the new registered FacetSet for the addition contents facetset
+ final Collection<FacetSet> newRegisteredRootFacetSetValue = new HashSet<FacetSet>();
+ final Collection<FacetSet> oldRegisteredRootFacetSetValue = new HashSet<FacetSet>();
+ if(additionFeatureRootEPackage != null) {
+ for(final EPackage current : additionFeatureRootEPackage.getESubpackages()) {
+ if(current instanceof FacetSet) {
+ oldRegisteredRootFacetSetValue.add((FacetSet)current);
+ }
+ }
+ }
+ newRegisteredRootFacetSetValue.addAll(oldRegisteredRootFacetSetValue);
+ newRegisteredRootFacetSetValue.addAll(facetSetsToStore);
+ newRegisteredRootFacetSetValue.removeAll(uselessRootFacetSetsInAllExistingTable);
+
+
+ // 7.store/unstore the generated facetsets used by columns
+ if(additionFeatureRootEPackage == null && newRegisteredRootFacetSetValue.size() != 0) {
+ additionFeatureRootEPackage = AdditionalContentsUtils.createAdditionalContentsEPackage();
+ compoundCmd.append(addToResourceAdditionalContentsEPackage(domain, notationResource, additionFeatureRootEPackage));
+ compoundCmd.append(storeProfileFacetSet(domain, notationResource, additionFeatureRootEPackage, facetSetsToStore));
+ } else if(additionFeatureRootEPackage != null && !newRegisteredRootFacetSetValue.equals(oldRegisteredRootFacetSetValue)) {
+ compoundCmd.append(storeProfileFacetSet(domain, notationResource, additionFeatureRootEPackage, facetSetsToStore));
+ compoundCmd.append(unstoreProfileFacetSet(domain, notationResource, additionFeatureRootEPackage, uselessRootFacetSetsInAllExistingTable));
+ }
+
+
+ //8. get the command to create columns
+ if(columnsToCreate.size() != 0) {
+ final Command createColumns = createAddColumnsCommand(domain, papyrusTable, columnsToCreate);
+ if(createColumns != null && createColumns.canExecute()) {
+ compoundCmd.append(createColumns);
+ }
+ }
+
+ //9. get the command to destroy columns (only if the AdditionContentsFacetSet continues to be referenced by the current table. If not, the columns will be automatically destroyed
+ if(additionalFeaturesToHide.size() != 0) {//&& !removeAdditionalContentsFacetSetFromTheCurrentTable) {
+ final Command removeColumns = createRemoveColumnsCommand(domain, papyrusTable, additionalFeaturesToHide);
+ if(removeColumns != null && removeColumns.canExecute()) {
+ compoundCmd.append(removeColumns);
+ }
+ }
+
+
+ //10. if the addition contents epackage is useless, we destroy it
+ if(newRegisteredRootFacetSetValue.size() == 0 && additionFeatureRootEPackage != null) {
+ compoundCmd.append(removeFromNotationResourceAdditionalContentsEPackage(domain, notationResource, additionFeatureRootEPackage));
+ }
+
+
+ //11. we add the command to apply the required facet to the table
+ final Collection<Facet> facetsToSetInTableContext = getFacetsToApplyOnTheTable(papyrusTable, requiredFacets);
+ compoundCmd.append(updateFacetsAppliedToTheTable(domain, papyrusTable, facetsToSetInTableContext));//the selected facets
+
+ if(!compoundCmd.isEmpty()) {
+ return compoundCmd;
+ }
+ return null;
+ }
+
+ private Collection<Facet> getFacetsToApplyOnTheTable(final PapyrusTableInstance papyrusTable, final Collection<Facet> requiredFacets) {
+ final Collection<Facet> facetsForOtherThings = getFacetUsedForOtherThingsThanColumns(papyrusTable);
+ final Collection<Facet> facetsToSetInTableContext = new ArrayList<Facet>();
+ facetsToSetInTableContext.addAll(facetsForOtherThings);
+ facetsToSetInTableContext.addAll(requiredFacets);
+ return facetsToSetInTableContext;
+ }
+
+ private Collection<FacetSet> getFacetSetToStore(Set<FacetSet> requiredSubFacetSets) {
+ final Set<FacetSet> toAddToResource = new HashSet<FacetSet>();
+ for(final FacetSet set : requiredSubFacetSets) {
+ if(set.eResource() == null) {
+ toAddToResource.add(getRootFacetSet(set));
+ }
+ }
+ return toAddToResource;
+ }
+
+ private Collection<FacetSet> getAllOwnedFacetSet(final FacetSet set) {
+ final Collection<FacetSet> coll = new ArrayList<FacetSet>();
+ if(set instanceof ProfileFacetSet) {
+ for(final ProfileFacetSet profileSet : ((ProfileFacetSet)set).getSubProfileFacetSet()) {
+ coll.add(profileSet);
+ coll.addAll(getAllOwnedFacetSet(profileSet));
+ }
+ }
+ return coll;
+ }
+
+ private Collection<FacetSet> getOwnedFacetSets(EPackage additionFeatureRootFacetSet) {
+ final Collection<FacetSet> ownedFacetSets = new ArrayList<FacetSet>();
+ for(final EPackage pack : additionFeatureRootFacetSet.getESubpackages()) {
+ if(pack instanceof FacetSet) {
+ ownedFacetSets.add((FacetSet)pack);
+ }
+ }
+ return ownedFacetSets;
+ }
+
+
+
+
+ /**
+ *
+ * @return
+ * the editing domain used by this handler or <code>null</code> if not found
+ */
+ protected TransactionalEditingDomain getEditingDomain() {
+ TransactionalEditingDomain domain = null;
+ domain = TransactionUtil.getEditingDomain(getPapyrusTable());
+ return domain;
+ }
+
+ /**
+ *
+ * @return
+ * the current table editor, or <code>null</code> if not found
+ */
+ private AbstractNattableEditor getCurrentTableEditor() {
+ IWorkbenchPart part = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
+ if (part instanceof IMultiDiagramEditor) {
+ part = ((IMultiDiagramEditor)part).getActiveEditor();
+ }
+ if (part instanceof AbstractNattableEditor) {
+ return (AbstractNattableEditor)part;
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the papyrus table
+ */
+ protected PapyrusTableInstance getPapyrusTable() {
+ final IEditorPart part = getCurrentTableEditor();
+ if(part != null) {
+ return (PapyrusTableInstance)part.getAdapter(PapyrusTableInstance.class);
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the table widget
+ */
+ protected NatTableWidget getTableWidget() {
+ final IAdaptable editor = getCurrentTableEditor();
+ if(editor != null) {
+ final INatTableWidgetProvider provider = (INatTableWidgetProvider)editor.getAdapter(INatTableWidgetProvider.class);
+ if(provider != null) {
+ return (NatTableWidget)provider.getNatTableWidget();
+ }
+ }
+ return null;
+ }
+
+ /**
+ *
+ * @return
+ * the label provider by for the dialog
+ */
+ private ILabelProvider getLabelProvider() {
+ final AdapterFactory factory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE);
+ final ILabelProvider labelProvider = new AdapterFactoryLabelProvider(factory);
+ return labelProvider;
+ }
+
+
+
+ private Command createAddColumnsCommand(final TransactionalEditingDomain domain, final PapyrusTableInstance pTable, final Collection<ETypedElement> columnsToAdd) {
+ final CompoundCommand cmd = new CompoundCommand("Create New Columns");
+ final ICommandFactory factory = ICommandFactoriesRegistry.INSTANCE.getCommandFactoryFor(domain);
+ final int width = 100;
+ for(final ETypedElement current : columnsToAdd) {
+ if(current instanceof FacetAttribute) {
+ FacetAttributeColumn col = TableinstanceFactory.eINSTANCE.createFacetAttributeColumn();
+ col.setAttribute((FacetAttribute)current);
+ col.setWidth(width);
+ Command addCommand = factory.createAddCommand(domain, pTable.getTable(), TableinstancePackage.eINSTANCE.getTableInstance_Columns(), col);
+ if(addCommand.canExecute()) {
+ cmd.append(addCommand);
+ }
+ } else if(current instanceof FacetReference) {
+ FacetReferenceColumn col = TableinstanceFactory.eINSTANCE.createFacetReferenceColumn();
+ col.setReference((FacetReference)current);
+ col.setWidth(width);
+ Command addCommand = factory.createAddCommand(domain, pTable.getTable(), TableinstancePackage.eINSTANCE.getTableInstance_Columns(), col);
+ if(addCommand.canExecute()) {
+ cmd.append(addCommand);
+ }
+ }
+ //FIXME : and others kind of columns?
+ }
+ if(cmd.canExecute()) {
+ return cmd;
+ }
+ return null;
+ }
+
+ private Command createRemoveColumnsCommand(final TransactionalEditingDomain domain, final PapyrusTableInstance pTable, final Collection<ETypedElement> columnsToDestroy) {
+ final CompoundCommand cmd = new CompoundCommand("Destroy existing Columns");
+ final ICommandFactory factory = ICommandFactoriesRegistry.INSTANCE.getCommandFactoryFor(domain);
+ for(final ETypedElement current : columnsToDestroy) {
+ if(current instanceof EStructuralFeature) {
+ Column column = columnsFeatureMap.get(current);
+ Command rmColumnCmd = factory.createRemoveCommand(domain, pTable.getTable(), TableinstancePackage.eINSTANCE.getTableInstance_Columns(), column);
+ if(rmColumnCmd.canExecute()) {
+ cmd.append(rmColumnCmd);
+ }
+ }
+ }
+ if(cmd.canExecute()) {
+ return cmd;
+ }
+ return null;
+ }
+
+
+ /**
+ *
+ * @param papyrusTable
+ * the papyrus table
+ * @return
+ * the collection of FacetSet which are not used for columns, but for other stuff
+ */
+ private Collection<Facet> getFacetUsedForOtherThingsThanColumns(final PapyrusTableInstance papyrusTable) {
+ final Set<Facet> setForOtherThings = new HashSet<Facet>();
+ for(final Facet current : papyrusTable.getTable().getFacets2()) {
+ //setForOtherThings.add(getRootFacetSet(current));
+ setForOtherThings.add(current);
+ }
+ for(final Column current : papyrusTable.getTable().getColumns()) {
+ if(current instanceof FeatureColumn) {
+ final ETypedElement element = ((FeatureColumn)current).getFeature();
+ if(element instanceof FacetStructuralFeature) {
+ setForOtherThings.remove(((FacetStructuralFeature)element).eContainer());
+ }
+ }
+ }
+ return setForOtherThings;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param res
+ * a resource
+ * @param pack
+ * the package to remove from resource
+ * @return
+ * the command to remove the packge from the resource
+ */
+ public static final Command removeFromNotationResourceAdditionalContentsEPackage(final TransactionalEditingDomain domain, final Resource resource, final EPackage pack) {
+ final ICommand removeFacetSet = new AbstractTransactionalCommand(domain, "Remove FacetSet from the resource", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ resource.getContents().remove(pack);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return new GMFtoEMFCommandWrapper(removeFacetSet);
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource
+ * @param ePackage
+ * the package to add to the resource
+ * @return
+ * the command to add the package from the resource
+ */
+ public static final Command addToResourceAdditionalContentsEPackage(final TransactionalEditingDomain domain, final Resource resource, final EPackage ePackage) {
+ final ICommand removeFacetSet = new AbstractTransactionalCommand(domain, "Add FacetSet from the resource", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ resource.getContents().add(ePackage);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ return new GMFtoEMFCommandWrapper(removeFacetSet);
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param resource
+ * the resource
+ * @param additionFeatureRootEPackage
+ * the package container for the facetsets
+ * @param newRegisteredSubFacetSet
+ * the facetsets to register
+ * @return
+ * tehc command to register the facetset AND register their associated queries
+ */
+ public static final Command storeProfileFacetSet(final TransactionalEditingDomain domain, final Resource resource, final EPackage additionFeatureRootEPackage, final Collection<FacetSet> newRegisteredSubFacetSet) {
+ final CompoundCommand cc = new CompoundCommand("Store Generated facetSet and Queries");
+ final ModelSet modelSet = (ModelSet)resource.getResourceSet();
+ final Resource notationResource = modelSet.getAssociatedResource(resource, NotationModel.NOTATION_FILE_EXTENSION);
+ for(final FacetSet set : newRegisteredSubFacetSet) {
+ final Collection<ModelQuery> queriesToSave = getAllUnregisteredQueries(set);
+ if(!queriesToSave.isEmpty()) {
+ final ModelQuerySet querySet = QueryFactory.eINSTANCE.createModelQuerySet();
+ querySet.setName("QueriesFor_" + set.getName());
+ querySet.setDescription(NLS.bind("Queries used by the generated facetset {0}", set.getName()));
+ querySet.getAssociatedMetamodels().add(UMLPackage.eINSTANCE);
+ querySet.getAssociatedMetamodels().add(EcorePackage.eINSTANCE);
+ querySet.getQueries().addAll(queriesToSave);
+ final ICommand addQuerySet = new AbstractTransactionalCommand(domain, "Add QuerySetToResource", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ notationResource.getContents().add(querySet);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.append(new GMFtoEMFCommandWrapper(addQuerySet));
+ }
+
+ }
+
+ final ICommand cmd = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ additionFeatureRootEPackage.getESubpackages().addAll(newRegisteredSubFacetSet);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.append(new GMFtoEMFCommandWrapper(cmd));
+ return cc;
+ }
+
+ /**
+ *
+ * @param eobject
+ * an eobject
+ * @return
+ * the list of the unregistered queries referenced by the eobject
+ */
+ public static final Collection<ModelQuery> getAllUnregisteredQueries(final EObject eobject) {
+ final Collection<ModelQuery> allQueries = getAllQueries(eobject);
+ final Collection<ModelQuery> notYetRegistered = new ArrayList<ModelQuery>();
+ for(ModelQuery modelQuery : allQueries) {
+ if(modelQuery.eResource() == null) {
+ notYetRegistered.add(modelQuery);
+ }
+ }
+ return notYetRegistered;
+ }
+
+ /**
+ *
+ * @param eobject
+ * an eobject
+ * @return
+ * the list owning all the queries referenced by the eobject
+ */
+ public static final Collection<ModelQuery> getAllQueries(final EObject eobject) {
+ final Collection<ModelQuery> queries = new HashSet<ModelQuery>();
+ if(eobject instanceof ProfileFacetSet) {
+ for(final FacetSet set : ((ProfileFacetSet)eobject).getSubProfileFacetSet()) {
+ queries.addAll(getAllQueries(set));
+ }
+ for(final Facet facet : ((ProfileFacetSet)eobject).getStereotypeFacets()) {
+ queries.addAll(getAllQueries(facet));
+ }
+ } else if(eobject instanceof StereotypeFacet) {
+ for(final StereotypePropertyElement feature : ((StereotypeFacet)eobject).getStereotypePropertyElements()) {
+ queries.addAll(getAllQueries(feature));
+ }
+ queries.add(((StereotypeFacet)eobject).getConditionQuery());
+ } else if(eobject instanceof FacetStructuralFeature) {
+ final FacetStructuralFeature feature = (FacetStructuralFeature)eobject;
+ final ModelQuery setQuery = feature.getSetQuery();
+ final ModelQuery getQuery = feature.getValueQuery();
+ if(setQuery != null) {
+ queries.add(setQuery);
+ }
+ if(getQuery != null) {
+ queries.add(getQuery);
+ }
+ }
+ return queries;
+ }
+
+ /**
+ *
+ * @param domain
+ * the domain
+ * @param resource
+ * the resource where the the epackage is stored
+ * @param additionFeatureRootEPackage
+ * the epackage owning the facetset
+ * @param toRemove
+ * the facetset to remove
+ * @return
+ * the command to remove the facetset from the epackage AND to remove the associated queries from the resource
+ */
+ public static final Command unstoreProfileFacetSet(final TransactionalEditingDomain domain, final Resource resource, final EPackage additionFeatureRootEPackage, final Collection<FacetSet> toRemove) {
+ final CompoundCommand cc = new CompoundCommand("Unstore Generated facetSet and Queries");
+
+ for(final FacetSet set : toRemove) {
+ final Collection<ModelQuery> allQueries = getAllQueries(set);
+ final Collection<ModelQuerySet> querySets = new ArrayList<ModelQuerySet>();
+ for(final ModelQuery modelQuery : allQueries) {
+ querySets.add(modelQuery.getModelQuerySet());
+ final ICommand removeQuerySet = new AbstractTransactionalCommand(domain, "Add QuerySetToResource", null) { //$NON-NLS-1$
+
+ @Override
+ protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
+ resource.getContents().removeAll(querySets);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.append(new GMFtoEMFCommandWrapper(removeQuerySet));
+ }
+ }
+
+
+ final ICommand cmd = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ additionFeatureRootEPackage.getESubpackages().removeAll(toRemove);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ cc.append(new GMFtoEMFCommandWrapper(cmd));
+
+ return cc;
+ }
+
+ /**
+ *
+ * @param domain
+ * the editing domain
+ * @param pTable
+ * the papyrus table
+ * @param facets
+ * the facets to set to the table context
+ * @return
+ * // * the command to update (clear, then addAll) the facets referenced by the table
+ */
+ public static final Command updateFacetsAppliedToTheTable(final TransactionalEditingDomain domain, final PapyrusTableInstance pTable, final Collection<Facet> facets) {
+ ICommand updateContext = new AbstractTransactionalCommand(domain, null, null) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ EList<Facet> currentFacets = pTable.getTable().getFacets2();
+ currentFacets.clear();
+ currentFacets.addAll(facets);
+ return CommandResult.newOKCommandResult();
+ }
+ };
+
+ return new GMFtoEMFCommandWrapper(updateContext);
+ }
+
+ @Override
+ public boolean isEnabled() {
+ if(getPapyrusTable() != null) {
+ if(getCurrentTableEditor() instanceof AbstractUMLTableEditor) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+
+
+ /**
+ * @return the allDirectFeatures
+ */
+ public final SortedSet<ETypedElement> getAllDirectFeatures() {
+ return allDirectFeatures;
+ }
+
+
+
+ /**
+ * @return the allAdditionalContents
+ */
+ public final Collection<FacetSet> getAllAdditionalContents() {
+ return allAdditionalContents;
+ }
+
+
+
+ /**
+ * @return the initialDirectFeatureSelected
+ */
+ public final Collection<ETypedElement> getInitialDirectFeatureSelected() {
+ return initialDirectFeatureSelected;
+ }
+
+
+
+ /**
+ * @return the initialAdditionalFeatureSelected
+ */
+ public final Collection<ETypedElement> getInitialAdditionalFeatureSelected() {
+ return initialAdditionalFeatureSelected;
+ }
+
+
+
+ /**
+ * @return the facetSetsUsedInTheTable
+ */
+ public final Collection<FacetSet> getFacetSetsUsedInTheTable() {
+ return facetSetsUsedInTheTable;
+ }
+
+
+
+ /**
+ * @return the columnsFeatureMap
+ */
+ public final Map<ETypedElement, Column> getColumnsFeatureMap() {
+ return columnsFeatureMap;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/listener/ApplyProfileTriggerListener.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/listener/ApplyProfileTriggerListener.java
new file mode 100644
index 00000000000..1ce7d7923c9
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/listener/ApplyProfileTriggerListener.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.listener;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.TriggerListener;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ *
+ * This listener allows us to update the ProfileFacetSet when a profile has changes
+ *
+ */
+public class ApplyProfileTriggerListener extends TriggerListener {
+
+ @Override
+ protected Command trigger(TransactionalEditingDomain domain, Notification notification) {
+ if(notification.getFeature() == UMLPackage.eINSTANCE.getProfileApplication_AppliedProfile()) {
+ //TODO
+ }
+ return null;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/menu/ContributionFactory.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/menu/ContributionFactory.java
new file mode 100644
index 00000000000..66f424f0783
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/menu/ContributionFactory.java
@@ -0,0 +1,77 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.menu;
+
+import org.eclipse.core.expressions.EvaluationResult;
+import org.eclipse.core.expressions.Expression;
+import org.eclipse.core.expressions.IEvaluationContext;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.jface.action.MenuManager;
+import org.eclipse.papyrus.uml.table.common.handler.SelectAdditionColumnsPopupUpHandler;
+import org.eclipse.swt.widgets.Menu;
+import org.eclipse.ui.menus.ExtensionContributionFactory;
+import org.eclipse.ui.menus.IContributionRoot;
+import org.eclipse.ui.services.IServiceLocator;
+
+
+public class ContributionFactory extends ExtensionContributionFactory {
+
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ public void createContributionItems(IServiceLocator serviceLocator, IContributionRoot additions) {
+
+ final SelectAdditionColumnsPopupUpHandler handler = new SelectAdditionColumnsPopupUpHandler();
+ if(handler.isEnabled()) {
+ MenuManager manager = new MenuManager("Select Additional Columns") {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public void fill(Menu parent, int index) {
+ super.fill(parent, index);
+ getMenu().getParentItem().setEnabled(true);
+ //FIXME : set the image
+ //Image image = Activator.getImage("IMG_OBJ_ADD"); //$NON-NLS-1$
+ //getMenu().getParentItem().setImage(image);
+ }
+
+
+ };
+
+ manager.setVisible(true);
+
+ //we delegate to the handler the menu item creation and their management
+ handler.addContributionItems(manager);
+
+ Expression visibleWhen = new Expression() {
+
+ /**
+ *
+ * {@inheritDoc}
+ */
+ @Override
+ public EvaluationResult evaluate(IEvaluationContext context) throws CoreException {
+ return EvaluationResult.TRUE;
+ }
+ };
+
+ additions.addContributionItem(manager, visibleWhen);
+ }
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/Messages.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/Messages.java
new file mode 100644
index 00000000000..42eb095a310
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/Messages.java
@@ -0,0 +1,90 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+public class Messages extends NLS {
+
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.table.common.messages.messages"; //$NON-NLS-1$
+
+ public static String AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage;
+
+ public static String ColumnsToShowDialog_AdditionalFeatures;
+
+ public static String ColumnsToShowDialog_AdvancedMode;
+
+ public static String ColumnsToShowDialog_default_columns;
+
+ public static String ColumnsToShowDialog_DeselectAll;
+
+ public static String ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures;
+
+ public static String ColumnsToShowDialog_DeselecteAllAvailableFeatures;
+
+ public static String ColumnsToShowDialog_DeselectedAll;
+
+ public static String ColumnsToShowDialog_DirectFeatures;
+
+ public static String ColumnsToShowDialog_SelecColumnsToShow;
+
+ public static String ColumnsToShowDialog_SelectAll;
+
+ public static String ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures;
+
+ public static String ColumnsToShowDialog_SelectAllAvailablesFeatures;
+
+ public static String ColumnsToShowDialog_ShowAllPossibilities;
+
+ public static String PasteInPapyrusTableCommandProvider_0;
+
+ public static String PasteInPapyrusTableCommandProvider_1;
+
+ public static String PasteInPapyrusTableCommandProvider_2;
+
+ public static String PasteInPapyrusTableCommandProvider_3;
+ public static String PasteInPapyrusTableCommandProvider_Pasting;
+
+ public static String PasteInPapyrusTableCommandProvider_PastingInTable;
+
+ public static String PasteInPapyrusTableCommandProvider_ProblemsToSetPropertyValue;
+
+ public static String PasteInPapyrusTableCommandProvider_ProblemToApplyStereotype;
+
+ public static String PasteInPapyrusTableCommandProvider_ProblemToSetStereotypeValue;
+
+ public static String PasteInPapyrusTableCommandProvider_RequiredStereotypeCantBeFound;
+
+ public static String PasteInPapyrusTableCommandProvider_RequiredStereotypeNotApplied;
+
+ public static String PasteInPapyrusTableCommandProvider_StereotypePropertyCantBeResolved;
+
+ public static String PasteInPapyrusTableCommandProvider_TheEnumerationLiteralCantBeFound;
+
+ public static String PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied;
+
+ public static String PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement;
+ public static String PasteInTableHandler_PasteCancelled;
+
+ public static String PasteInTableHandler_PasteCreation;
+
+ public static String PasteInTableHandler_ThePasteCommandCantBeExecuted;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/messages.properties b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/messages.properties
new file mode 100644
index 00000000000..957725b7cad
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/messages/messages.properties
@@ -0,0 +1,32 @@
+AbstractUMLTableEFacetEditor_UMLTableCreationErrorMessage=A UML Table can't be created with a non-UML element as context ({0})
+ColumnsToShowDialog_AdditionalFeatures=Additional Features
+ColumnsToShowDialog_AdvancedMode=Advanced Mode
+ColumnsToShowDialog_default_columns=Default Columns
+ColumnsToShowDialog_DeselectAll=Deselect All
+ColumnsToShowDialog_DeselectAllAvailableAdditionalFeatures=Deselect all available additional features.
+ColumnsToShowDialog_DeselecteAllAvailableFeatures=Deselect all available features.
+ColumnsToShowDialog_DeselectedAll=Deselect All
+ColumnsToShowDialog_DirectFeatures=Direct Features
+ColumnsToShowDialog_SelecColumnsToShow=Select the columns to show
+ColumnsToShowDialog_SelectAll=Select All
+ColumnsToShowDialog_SelectAllAvailableAdditionalFeatures=Select all available additional features.
+ColumnsToShowDialog_SelectAllAvailablesFeatures=Select all available features.
+ColumnsToShowDialog_ShowAllPossibilities=Show all possibilities
+PasteInPapyrusTableCommandProvider_0=The String {0} is not valid to create a {1}.
+PasteInPapyrusTableCommandProvider_1=Paste Command In FlowPort Table
+PasteInPapyrusTableCommandProvider_2=Create Paste Action
+PasteInPapyrusTableCommandProvider_3=Launch Progress Monitor Dialog
+PasteInPapyrusTableCommandProvider_Pasting=Pasting
+PasteInPapyrusTableCommandProvider_PastingInTable=Pasting in Table
+PasteInPapyrusTableCommandProvider_ProblemsToSetPropertyValue=Problems to set properties value
+PasteInPapyrusTableCommandProvider_ProblemToApplyStereotype=Problems to apply stereotype
+PasteInPapyrusTableCommandProvider_ProblemToSetStereotypeValue=Problems to set stereotype properties value
+PasteInPapyrusTableCommandProvider_RequiredStereotypeCantBeFound=Stereotype {0} required by the column can' be found
+PasteInPapyrusTableCommandProvider_RequiredStereotypeNotApplied=The required stereotype {0} is not applied on the element {1}.
+PasteInPapyrusTableCommandProvider_StereotypePropertyCantBeResolved=The stereotype property called by {0} can't be resolved
+PasteInPapyrusTableCommandProvider_TheEnumerationLiteralCantBeFound=The enumeration literal {0} can't be found
+PasteInPapyrusTableCommandProvider_TheStereotypeCantBeApplied=The stereotype {0} can' be applied on {1}
+PasteInPapyrusTableCommandProvider_TheTextCantBeMappedOnAnExistingElement=The text {0} can't be mapped to an existing element
+PasteInTableHandler_PasteCancelled=Paste Action Canceled
+PasteInTableHandler_PasteCreation=Paste creation...
+PasteInTableHandler_ThePasteCommandCantBeExecuted=The paste command can't be executed
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractAdditionalContentsProvider.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractAdditionalContentsProvider.java
new file mode 100644
index 00000000000..d5b5d476eee
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractAdditionalContentsProvider.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.provider;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.infra.table.instance.util.TableContentsUtils;
+
+
+/**
+ *
+ * This class is used for additional contents providers
+ *
+ */
+public abstract class AbstractAdditionalContentsProvider {
+
+ /**
+ * The managed Papyrus Table
+ */
+ protected PapyrusTableInstance pTable;
+
+ /**
+ * the contents of the table
+ */
+ protected Collection<EObject> tableContents;
+
+ /**
+ *
+ * the managed Papyrus Table
+ */
+ public void setPapyrusTable(final PapyrusTableInstance table) {
+ this.pTable = table;
+ this.tableContents = TableContentsUtils.getTableContents(table, table.getTable().getContext(), false);
+ }
+
+ /**
+ *
+ * @return
+ * the available facet set to display additional contents/columns
+ */
+ public abstract Collection<FacetSet> getAdditionalFeatures();
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractPasteInTableCommandProvider.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractPasteInTableCommandProvider.java
new file mode 100644
index 00000000000..9db7cdeafea
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/AbstractPasteInTableCommandProvider.java
@@ -0,0 +1,187 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.provider;
+
+import java.util.List;
+
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.facet.widgets.nattable.INatTableWidget;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Column;
+import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.TableInstance2;
+import org.eclipse.emf.facet.widgets.nattable.internal.NatTableWidget;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.emf.type.core.ElementTypeRegistry;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResource;
+import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
+import org.eclipse.papyrus.uml.table.common.Activator;
+
+
+
+/**
+ *
+ * Abstract class for PasteInTableCommandProvider
+ *
+ */
+public abstract class AbstractPasteInTableCommandProvider implements IPasteInTableCommandProvider {
+
+ //FIXME : we can't get the visible command when a dialog is open during the command creation
+ protected List<Column> visibleColumns;
+
+ /**
+ * the error message for the command
+ */
+ protected String pasteErrorMessage = null;
+
+
+ /**
+ *
+ * @see org.eclipse.papyrus.uml.table.efacet.common.provider.sysml.table.efacet.flowport.provider.internal.provider.IPasteInTableCommandProvider#getPasteErrorMessage()
+ *
+ * @return
+ */
+ public final String getPasteErrorMessage() {
+ return this.pasteErrorMessage;
+ }
+
+ /**
+ *
+ * @param papyrusTable
+ * the papyrus table
+ * @return
+ * the editing domain to use for the PapyrusTable
+ */
+ protected TransactionalEditingDomain getEditingDomain(final PapyrusTableInstance papyrusTable) {
+ TransactionalEditingDomain domain = null;
+ ServicesRegistry serviceRegistry = null;
+ try {
+ serviceRegistry = ServiceUtilsForResource.getInstance().getServiceRegistry(papyrusTable.eResource());
+ } catch (final ServiceException e) {
+ Activator.log.error("ServicesRegistry not found", e); //$NON-NLS-1$
+ }
+ try {
+ domain = ServiceUtils.getInstance().getTransactionalEditingDomain(serviceRegistry);
+ } catch (final ServiceException e) {
+ Activator.log.error("EdtingDomain not found", e); //$NON-NLS-1$
+ }
+ return domain;
+ }
+
+ /**
+ *
+ * @param papyrusTable
+ * the papyrus table
+ * @return
+ * the containement feature for the created element
+ */
+ protected EReference getContainementFeature(final PapyrusTableInstance papyrusTable) {
+ return papyrusTable.getPastedElementContainmentFeature();
+ }
+
+ /**
+ *
+ * @param clipboardContents
+ * @see org.eclipse.papyrus.infra.table.efacet.common.editor.AbstractTableEditor#isPasteEnabled(java.lang.String)
+ *
+ * @return
+ */
+ public boolean isPasteEnabled(final PapyrusTableInstance papyrusTable, final String clipboardContents, final INatTableWidget iTableWidget) {
+ if((clipboardContents != null) && !"".equals(clipboardContents)) { //$NON-NLS-1$
+ final String[] rows = getRows(clipboardContents);
+ if(rows != null && rows.length != 0) {
+ final String[] cells = getCells(rows[0]);
+
+ /*
+ * we verify that we know :
+ * - the type to create
+ * - the containment feature for the created type
+ * - the correct number of cells according to the number of managed columns for the paste
+ * - we don't do other test, because we need to provide error message to the user when the paste is not possible
+ */
+ if((getIElementTypeToCreateElement(papyrusTable) != null) && (getContainementFeature(papyrusTable) != null) && (cells.length == getVisibleColumns(iTableWidget).size())) {
+ return true;
+ }
+ }
+ }
+ return false;
+ }
+
+ /**
+ *
+ * @param table
+ * a table represented by a String
+ * @return the rows for this table
+ */
+ protected String[] getRows(final String table) {
+ final String[] rows = table.split(ROW_SEPARATOR);
+ return rows;
+ }
+
+ /**
+ *
+ * @param row
+ * a row represented by a String
+ * @return the cells for this row
+ */
+ protected String[] getCells(final String row) {
+ return row.split(COLUMN_SEPARATOR);
+ }
+
+ /**
+ *
+ * @param pTable
+ * the papyrus table
+ * @return
+ * the type of element to create for a paste action
+ */
+ protected IElementType getIElementTypeToCreateElement(final PapyrusTableInstance pTable) {
+ final String id = pTable.getPastedElementId();
+ return ElementTypeRegistry.getInstance().getType(id);
+ }
+
+
+ /**
+ *
+ * @param widget
+ * the table widget
+ * @return
+ * the visible columns for the widget
+ */
+ protected List<Column> getVisibleColumns(final INatTableWidget widget) {
+ return ((NatTableWidget)widget).getVisibleColumnsUsingCustomizationEngine((TableInstance2)widget.getTableInstance());
+ }
+
+ /**
+ *
+ * @param iTableWidget
+ * the table widget
+ * @return
+ * the list of the managed features
+ */
+ /*
+ protected List<EStructuralFeature> getManagedFeatures(final INatTableWidget iTableWidget) {
+ final List<EStructuralFeature> features = new ArrayList<EStructuralFeature>();
+ // for(final Column col : getManagedColumns(iTableWidget)) {
+ for(final Column col : visibleColumns) {
+ features.add((EStructuralFeature)((FeatureColumn)col).getFeature());
+ }
+ return features;
+ }
+
+ protected abstract Collection<Column> getManagedColumns(INatTableWidget iTableWidget);
+ */
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/EMFFacetColumnsProvider.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/EMFFacetColumnsProvider.java
new file mode 100644
index 00000000000..6486489e4d7
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/EMFFacetColumnsProvider.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.table.common.provider;
+
+import java.util.Collection;
+import java.util.HashSet;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.facet.infra.facet.Facet;
+import org.eclipse.emf.facet.infra.facet.FacetSet;
+import org.eclipse.emf.facet.infra.facet.core.FacetSetCatalog;
+
+
+/**
+ *
+ * This providers provides the list of the registered FacetSet available to display new columns in the table
+ *
+ */
+public class EMFFacetColumnsProvider extends AbstractAdditionalContentsProvider {
+
+ @Override
+ public Collection<FacetSet> getAdditionalFeatures() {
+ final HashSet<FacetSet> availableFacetSets = new HashSet<FacetSet>();
+ availableFacetSets.addAll(FacetSetCatalog.getSingleton().getAllFacetSets());
+ if(pTable.getTable().getTableConfiguration() != null) {
+ //FIXME
+// for(Facet facet : pTable.getTable().getTableConfiguration().getDefaultFacets()) {
+// availableFacetSets.add(FacetUtils.getRootFacetSet(facet));
+// }
+ }
+ for(Facet facet : pTable.getTable().getFacets2()) {
+ availableFacetSets.add(getRootFacetSet(facet));
+ }
+ return availableFacetSets;
+ }
+
+ private FacetSet getRootFacetSet(final Facet facet){
+ final EObject container = facet.eContainer();
+ assert container instanceof FacetSet;
+ return getRootFacetSet((FacetSet)container);
+ }
+
+ private FacetSet getRootFacetSet(final FacetSet set){
+ final EObject container = set.eContainer();
+ if(container!=null){
+ if(container instanceof FacetSet){
+ return getRootFacetSet((FacetSet)container);
+ }else{
+ return set;
+ }
+ }
+ return set;
+ }
+}
diff --git a/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/IPasteInTableCommandProvider.java b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/IPasteInTableCommandProvider.java
new file mode 100644
index 00000000000..c32b98ee7f8
--- /dev/null
+++ b/deprecated/org.eclipse.papyrus.uml.table.common/src/org/eclipse/papyrus/uml/table/common/provider/IPasteInTableCommandProvider.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials