Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2014-11-03 22:21:40 +0000
committerChristian W. Damus2014-11-05 23:17:27 +0000
commit31a95fd28af8c8453239d742e57c718499dc1b96 (patch)
tree16e740eb16f504d96cfc1008277cc06c2f4b3f79
parent5503597a07d880a28abfa8739a73d94a55b4aad0 (diff)
downloadorg.eclipse.papyrus-31a95fd.tar.gz
org.eclipse.papyrus-31a95fd.tar.xz
org.eclipse.papyrus-31a95fd.zip
399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files
https://bugs.eclipse.org/bugs/show_bug.cgi?id=399859 Support basic stereotype repair use cases in decorator model resources. (+56 squashed commits) Squashed commits: [3eaa4ad] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Improve re-application of externalized profiles for migration scenarios, doing away with hacky internalize and re-externalize steps that make a mess of the ordering of stereotype applications in the resource contents. ---- [fa20519] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Complete the copyright updates. ---- [5af536d] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Pluggable profile-application delegate API makes the private AppliedProfilesProvider redundant. ---- [b1e7f68] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Further copyright updates. ---- [ed0788d] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Now that the required UML2 API is available we can remove work-arounds for access to custom profile- and stereotype-application helpers. ---- [b262c2c] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Fix copyright headers. ---- [c4f04a5] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Support for migration of externally applied profiles to a new version. ---- [1892e18] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Additional slightly less trivial test cases for control-mode refactoring. ---- [7e530bd] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Don't create eCrossReferences() lists that compute and cache derived references that don't need refactoring. ---- [a35a57e] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files The undo of control refactoring for unloaded resources needs the same split treatment as for uncontrol. ---- [83249b2] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Automated tests for control-mode participant for refactoring of decorator models. ---- [d4a5149] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Fixes undo/redo of the uncontrolled refactoring for unloaded decorator models, which when undoing would find that the base uncontrol's undo hadn't yet restored the sub-unit resource in which we need to resolve referenced objects. ---- [46f4998] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Fixes to the automatic saving of decorator-model refactoring in (un)control command: - improve the determination of the editor to save (if any) - ensure that we only try to run the save runnable in the workbench window if on the UI thread ---- [1e65796] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Only prompt the user about save requirement if the control action was UI-initiated. Duh. ---- [75ea465] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Initial support for refactoring of currently loaded and unloaded decorator models that apply profiles directly or indirectly to the packages being controlled. ---- [71dfab4] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Fix errors in Javadocs and allow the control command to re-create a resource that the resource set had attempted to load for proxy resolution but failed because it doesn't exist. ---- [45fe94e] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Packages must also inherit externally applied profiles from their nesting package chain. ---- [24428c1] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Refresh the property sheet for the selected package after externalizing profiles to ensure that the "Applications" tab is showing. ---- [4763809">4763809] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Replace "Decorator Model" terminology in the UI with simply "Profile Application". ---- [77c00fb] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Remember the user's last auto-prompt load selections for initial selection on next open of the same resource. ---- [651fe70] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Improve JUnit test coverage of core plug-in. ---- [f2d5e7a] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Add an action in the Decorators property tab for packages to duplicate a loaded or unloaded decorator model with support for filtering out certain profile applications. ---- [37eb425] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Fix failure to refresh diagram for CSS styles affected by loading a decorator model the first time (and ensure all subsequent, also). ---- [1d62d00] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Fix problem in refreshing decorator model names in the Decorators property tab. Fix broken "Don't show this again" options in the load-decorator-models wizard. ---- [8ad5bd0] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Option to suppress prompt to unload conflicting decorator models in the Decorator property tab for packages and instead just automatically unload them (supporting quick switch use case). ---- [dde50a3] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Do not confuse users by showing the "decorator models available" icon decoration in Model Explorer on models that are decorated by the decorator model that the user opened in the editor. Only show the icon for referenced ("library") models that are reachable from such models. ---- [a82eb1b] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Improve liveness of action enablement and other tasks (esp. on the UI thread) that depend on the decorator model index. Implement a general-purpose Jobs-based ListenableFuture to support reporting blocked UI tasks in the blocked-jobs dialog. A few more rename refactorings in the API. Improve JUnit test coverage (and fix problems found by new tests). ---- [1cdaa01] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Implement Decorators property tab for packages that have decorator models, to provide easy access to loading and unloading them. ---- [de1cc1c] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Rationalize the handling of empty decorator models by prompting to delete and deleting all Papyrus model member resources in case of deletion. ---- [9bb18ac] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Never prompt to load additional decorator models when opening a decorator model, even if the user model that it decorates has more decorators available and the preference to auto-prompt is enabled. ---- [b1e3315] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Promote the Workspace Model Index and any-root-namespace content type describer APIs to the infra layer. ---- [f708155] 399859: [Decorator Models] Papyrus shall enable to manage profile applications in separate files Ensure responsiveness of label decorators. Apply label decorations to workspace resources in Project Explorer that are decorator models. ---- [4379197">4379197] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files WORKAROUNDS for absence of the required new UML API until it becomes available. ---- [68db5f0] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files WORKAROUNDS for absence of the required new UML API until it becomes available. ---- [0bf4163] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Add missing dependency information to top POMs. ---- [04d0935] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Add new plug-ins to top POMs. ---- [d4346cf] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Releng integration. ---- [40cfc0d] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Fix further refresh issues in diagrams when loading decorator models. When existing stereotype applications are loaded, they won't emit SET notifications for the base_Xyz references. Instead, they eventually emit RESOLVE notifications when their base reference proxies are resolved. ---- [f393d19] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Further API refactorings for 'decorator model' terminology. ---- [a3e9dd4] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Only prompt to load decorator models if opening in an editor. ---- [38885bc] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Refactor for 'decorator model' terminology and move the plug-ins into the main source tree. ---- [63c305e] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Various usability enhancements: - label decorators in Model Explorer and applied profiles in package properties indicating source profile externalization model names - prevent conflicts in externalization of profile applications into existing resources - never present profile application resources as available that conflict with native profile applications - revert ModelSet save change that breaks initialization of model from existing UML resource ---- [c1bb42b] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Profile application externalization wizard enhancements: - remember last file extension entered by the user (in case more than just .uml) - let user specify the model name, when creating a new file - verify that when adding to an existing file, it's a profile application model - include the profile application model name in the index ---- [4d1169b] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Enforce uniqueness of profile applications: prevent loading of multiple external profile applications that apply the same profile to the same package. ---- [ac15898] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Require saving dirty profile-application resources before unloading them. ---- [9ad9b0f] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Ensure that PapyrusListeners see changes in profile-application resources as well as the user-model resources. Fix the PapyrusStereotypeListener to handle unloading of a resource containing stereotype applications to interpret the stereotypes as being unapplied. ---- [4c52edd] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Handle problems in (re)building the workspace model index, add a listener protocol, and make it independent of the UML layer. ---- [402c77c] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Add a label decorator (just a placeholder icon for now) for models that have available unloaded profile applications. Add a preference (enabled by default) to prompt to load available profile applications on opening a model, if it has unloaded profile applications available. ---- [8566806">8566806] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Add some JUnit tests for the workspace model index framework. ---- [6f500b8] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Ensure that the user models to which a profile-application model contributes profile applications are loaded when the latter is loaded in the Papyrus Editor. ---- [16a0884] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Enable storage of profile applications in UML resources anywhere in the workspace, even in different projects than the models to which they are applied. Uses a new workspace-wide index of cross references between profile-application resources and user model resources, built at start-up and maintained in the background as the workspace changes. ---- [6fe515d] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Hide profile application models in the Model Explorer by default. ---- [69ef817] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Added context-menu actions in the Model Explorer for loading available profile applications that are not yet loaded and for unloading and loaded externalized profile applications (for any currently open controlled units). ---- [d9bb954] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Initial implementation of separate storage of profile applications and their defined stereotype applications in a separate resource. Includes - externalize profile applications refactoring wizard - internalize profile applications refactoring wizard - load profile applications context-menu action in Project Explorer - unload profile applications context-menu action in Model Explorer - enhanced Profile applications table in Properties view for packages ---- [b8578c3] 399859: [Profiles] Papyrus shall enable to manage profile applications in separate files Propagate standard JDT preferences to the sandbox projects. Signed-off-by: Christian W. Damus <give.a.damus@gmail.com> ---- [ec61dd2] 399859: [Profile Applications] Papyrus shall enable to manage profile applications in separate files Update build dependencies to pick up latest UML2 integration build with new APIs required for profile applications feature. Change-Id: Ifa20519ec3209393c88e0a1ac322eac715e541f4
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml7
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/.project17
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/build.properties7
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/epl-v10.html304
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.properties132
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.xml49
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/license.html107
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/pom.xml14
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml236
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/.project17
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/build.properties5
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/epl-v10.html304
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/feature.xml72
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/license.html107
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/pom.xml15
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/schema/model.exsd38
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java8
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java16
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java118
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/JobBasedFuture.java335
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java7
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath14
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/AnyRootNamespaceContentHandler.java104
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/IWorkspaceModelIndexListener.java61
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndex.java864
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexAdapter.java58
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexEvent.java76
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFunctions.java98
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFPredicates.java63
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ICallableWithProgress.java45
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ReferenceCounted.java175
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/UIUtil.java152
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java25
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IControlCommandParticipant.java12
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IUncontrolCommandParticipant.java17
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java12
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingLabelProvider.java25
-rw-r--r--plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingStyledLabelProvider.java61
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.classpath (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.classpath)0
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.project (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.project)2
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/META-INF/MANIFEST.MF31
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/about.html (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/about.html)0
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/build.properties (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/build.properties)4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/documentation.pdoc4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.properties12
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.xml11
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/pom.xml14
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/Activator.java118
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/DecoratorModelControlModeParticipant.java142
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/PackageRefactoringContext.java265
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/AbstractDecoratorModelRefactoringCommand.java142
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/ConfirmSaveCommand.java57
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DecoratorModelRefactoringCommandFactory.java235
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DirectionConstraint.java32
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/LoadedDecoratorModelRefactoringCommand.java56
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/SaveModelCommand.java147
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/UnloadedDecoratorModelRefactoringCommand.java67
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdater.java61
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdaterDelegate.java94
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/CrossReferenceUpdater.java122
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IDecoratorModelUpdaterDelegate.java35
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IRefactoringStep.java31
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/LoadedDecoratorModelUpdaterDelegate.java49
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostControlDecoratorModelUpdater.java103
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostUncontrolDecoratorModelUpdater.java114
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/UnloadedDecoratorModelUpdaterDelegate.java52
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.classpath (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.classpath)0
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.project (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.project)2
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF35
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/OSGI-INF/l10n/bundle.properties3
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/about.html28
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/build.properties11
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/documentation.pdoc4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/dup_resource.pngbin0 -> 595 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/externalize.gifbin0 -> 329 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/internalize.gifbin0 -> 327 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/unload_resource.pngbin0 -> 4355 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/dtool16/load_resource.pngbin0 -> 4218 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/etool16/load_resource.pngbin0 -> 4323 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/plugin.xml (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/plugin.xml)0
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/pom.xml14
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResource.ctx33
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi27
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageDecoratorModels.xwt12
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageProfile.xwt12
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/constraints/HasExternalizedProfileApplicationsConstraint.java83
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/Messages.java43
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/messages.properties12
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/Activator.java111
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/AppliedProfilesObservableList.java65
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/DecoratorModelsObservableList.java243
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElement.java46
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElementFactory.java48
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/DecoratorModelPropertyEditor.java340
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java208
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.classpath (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.classpath)0
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.project (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.project)2
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF42
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/about.html28
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/build.properties10
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/documentation.pdoc4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/icons/full/ovr16/profileApps.pngbin0 -> 2993 bytes
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.properties38
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.xml273
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/pom.xml14
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Activator.java111
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Startup.java32
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/ExternalizeProfilesHandler.java51
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/InternalizeProfilesHandler.java51
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/LoadAvailableDecoratorModelsHandler.java61
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadDecoratorModelHandler.java273
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadLoadedDecoratorModelsHandler.java74
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/expressions/PackagePropertyTester.java134
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/Messages.java98
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/messages.properties67
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/DecoratorModelPreferencePage.java47
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/ProfileExternalizationUIPreferences.java69
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/WhenKind.java32
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/AvailableDecoratorModelsSnippet.java169
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java192
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java185
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/EncapsulatedAdapterFactoryLabelProvider.java65
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java149
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractManageProfileApplicationsWizard.java168
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractNewDecoratorModelPage.java205
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationSelectionPage.java227
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationsPage.java36
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ConflictingDecoratorModelsPage.java216
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DecoratorModelSelectionPage.java319
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelPage.java176
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelWizard.java156
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsPage.java143
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsWizard.java138
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsPage.java76
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsWizard.java83
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadDecoratorModelsPage.java120
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadProfileApplicationsWizard.java230
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/UnloadProfileApplicationsWizard.java93
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/ui/providers/DeleteEmptyDecoratorModelsPolicy.java119
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.classpath7
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.project28
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF39
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/about.html28
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/build.properties12
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/conception.textile (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/conception.textile)20
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/documentation.pdoc4
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.di (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.notation)0
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel46
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.notation86
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.uml55
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/profileExternalization.ecore32
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties14
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.xml83
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml14
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/Activator.java (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/Activator.java)26
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java1201
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/IDeleteEmptyDecoratorModelsPolicy.java33
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusProfileApplicationHelper.java61
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusStereotypeApplicationHelper.java46
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/CreateDecoratorModelCommand.java130
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/DeleteDecoratorModelCommand.java105
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/ReclaimProfileApplicationsCommand.java44
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SaveDecoratorModelCommand.java74
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SeparateProfileApplicationsCommand.java53
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/FilePropertyTester.java54
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/Messages.java37
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/messages.properties6
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java222
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelCopier.java207
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java589
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndexEvent.java42
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelReadOnlyHandler.java79
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelResourceSet.java116
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/IDecoratorModelIndexListener.java27
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/index/ProfileIndexHandler.java367
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java260
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/UMLSnippet.java118
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java92
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java56
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java249
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java274
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java121
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java345
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java88
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java148
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java136
-rw-r--r--plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java231
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveStereotypeApplicationToControlResource.java10
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java36
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java167
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ApplyProfileAction.java27
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ZombieStereotypesDescriptor.java52
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF1
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileApplicationContentProvider.java22
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java71
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ui/RefreshProfileDialog.java22
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationEditor.java51
-rw-r--r--plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationPropertyEditor.java10
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CustomUMLUtil.java16
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ProfileUtil.java63
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml1
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/schema/profileApplicationDelegates.exsd125
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java56
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProfileApplicationObservableList.java31
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/IProfileApplicationDelegate.java135
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/ProfileApplicationDelegateRegistry.java245
-rw-r--r--releng/org.eclipse.papyrus.oomph/setups/papyrus.setup2
-rw-r--r--releng/top-pom-extra-tests.xml594
-rwxr-xr-xreleng/top-pom-extras.xml1128
-rw-r--r--releng/top-pom-main-tests.xml649
-rwxr-xr-xreleng/top-pom-main.xml1391
-rwxr-xr-xreleng/top-pom-rcp.xml384
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/META-INF/MANIFEST.MF18
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/OSGI-INF/l10n/bundle.properties3
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResource.ctx1078
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi15
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/ui/SinglePackageProfile.xwt13
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/Activator.java61
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/OneResourceOnlyStrategyLocationPropertyEditor.java53
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/ResourcePerProfileStrategyLocationPropertyEditor.java46
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/META-INF/MANIFEST.MF27
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/plugin.xml19
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.di23
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.notation202
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.uml158
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile4
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di9
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml4
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile4
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di9
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml21
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.ExternalResourcesTestProfileProfile9
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation208
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml25
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.notation97
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.profiles9
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.uml23
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.ExternalResourcesTestProfileProfile2
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.SysMLProfile4
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.notation143
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.uml32
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.di9
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.notation2
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.uml5
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.notation2
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.uml21
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.notation208
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.uml26
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/icons/testProfile.gifbin553 -> 0 bytes
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractChangeStrategyTests.java251
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java472
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java60
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceloading/ResourceLoading.java29
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java60
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java68
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/META-INF/MANIFEST.MF22
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/documentation.pdoc4
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/plugin.xml16
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/Activator.java55
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/AbstractStereotypeApplicationLocationStrategy.java35
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExtendedProfileApplicationHelper.java34
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExternalResourceProfileUtils.java173
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/IStereotypeApplicationLocationStrategy.java51
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/OneResourceOnlyStrategy.java112
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/PapyrusStereotypeApplicationHelper.java111
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ResourcePerProfileStrategy.java261
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StandardApplicationLocationStrategy.java72
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StrategyRegistry.java62
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/UpdateStereotypeApplicationsLocationCommand.java56
-rw-r--r--sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java252
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java23
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java330
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF182
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java5
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.classpath14
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referenced.uml4
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referencing.uml8
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexTest.java443
-rw-r--r--tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/tests/AllTests.java15
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/MoreMatchers.java55
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/SynchronousExecutorService.java188
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java214
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java22
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ServiceRegistryModelSetFixture.java41
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.project28
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/META-INF/MANIFEST.MF31
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/build.properties (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/build.properties)5
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.launch (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/org.eclipse.papyrus.uml.profile.externalresource.tests.launch)12
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/pom.xml14
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.di (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.di)3
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.notation)0
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.uml18
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.di (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.di)13
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.manifest6
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.notation227
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.uml42
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.ecore.uml57
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.di (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.di)7
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.notation218
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.uml117
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.di (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.di)13
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.manifest7
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.notation227
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.uml51
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AbstractDecoratorModelControlModeTest.java633
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java121
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AllTests.java (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AllTests.java)10
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/ControlModeWithDecoratorModelsTest.java407
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.project28
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/META-INF/MANIFEST.MF33
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/build.properties (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/build.properties)4
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/org.eclipse.papyrus.uml.decoratormodel.tests.launch45
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/pom.xml14
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/package1.decorator.uml29
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/profile/profile1.profile.uml184
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.di21
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.manifest4
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.notation271
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.uml63
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/package1.decorator.uml42
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/profile/profile1.profile.uml184
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.di21
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.manifest4
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.notation271
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.uml63
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.di18
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.manifest6
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.notation227
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.uml39
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.ecore.uml51
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.di (renamed from sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.di)7
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.notation181
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.uml100
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.di18
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.manifest6
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.notation227
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.uml47
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/package1.decorator.uml42
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/profile/profile1.profile.uml184
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.di21
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.manifest4
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.notation271
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.uml63
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/DecoratorModelUtilsTest.java348
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/PapyrusStereotypeApplicationHelperTest.java153
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/tests/FilePropertyTesterTest.java80
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelCopierTest.java141
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelIndexTest.java295
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AbstractProfileExternalizationTest.java477
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AllTests.java39
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ExternalizeProfileApplicationTest.java155
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/InternalizeProfileApplicationTest.java112
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ProfileMigrationTest.java89
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/StereotypeApplicationRepairTest.java195
380 files changed, 31670 insertions, 7487 deletions
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
index 5a01cd1d889..1d28dcbff77 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
@@ -1,10 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.sdk.feature" label="Papyrus UML" plugin="org.eclipse.papyrus.infra.core" provider-name="Eclipse Modeling Project" version="1.1.0.qualifier">
<copyright url="http://www.eclipse.org/legal/epl-v10.html">
- Copyright (c) 2012, 2013 CEA LIST
+ Copyright (c) 2012, 2014 CEA LIST and others
All rights reserved. This program and the accompanying materials
-are made available under the terms of the Eclipse Public License
-v1.0
+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
</copyright>
@@ -83,6 +82,8 @@ http://www.eclipse.org/legal/epl-v10.html
<includes id="org.eclipse.papyrus.infra.viewpoints.feature" version="0.0.0"/>
+ <includes id="org.eclipse.papyrus.uml.decoratormodel.feature" version="0.0.0"/>
+
<plugin download-size="0" id="com.google.guava" install-size="0" unpack="false" version="15.0.0.v201403281430"/>
</feature> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/.project b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/.project
new file mode 100644
index 00000000000..ba67a87a6d9
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.decoratormodel.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/build.properties b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/build.properties
new file mode 100644
index 00000000000..b9ce3341aac
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/build.properties
@@ -0,0 +1,7 @@
+bin.includes = feature.xml,\
+ build.properties,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/epl-v10.html b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/epl-v10.html
new file mode 100644
index 00000000000..cb1073a4bad
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.properties b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.properties
new file mode 100644
index 00000000000..11ac9ede269
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.properties
@@ -0,0 +1,132 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.xml
new file mode 100644
index 00000000000..b7fe5e2e827
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/feature.xml
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.uml.decoratormodel.feature"
+ label="Papyrus Decorator Models"
+ version="1.1.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2014 CEA LIST and others
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.decoratormodel"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.decoratormodel.controlmode"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.decoratormodel.ui"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.decoratormodel.properties"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/license.html b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/license.html
new file mode 100644
index 00000000000..c3d34c3c21e
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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 9, 2014</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>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <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>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>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/pom.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/pom.xml
new file mode 100644
index 00000000000..84a3a8e7fad
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel.feature</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project> \ No newline at end of file
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml
index a9f64e1ff45..a89f52cb9d4 100644
--- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.feature/feature.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<feature
- id="org.eclipse.papyrus.tests.feature"
- label="%featureName"
- version="1.1.0.qualifier"
- provider-name="%providerName">
-
- <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.tests.feature"
+ label="%featureName"
+ version="1.1.0.qualifier"
+ provider-name="%providerName">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
Copyright (c) 2008-2014 CEA LIST, Atos Origin, Conselleria de
Infraestructuras y Transporte, Generalitat de la Comunitat Valenciana
and others
@@ -13,111 +13,115 @@ 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
- </copyright>
-
- <license url="%licenseURL">
- %license
- </license>
-
- <includes
- id="org.eclipse.papyrus.tests.uml.diagram.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.infra.services.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.sysml.diagram.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.sysml.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.uml.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.views.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.infra.nattable.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.sysml.nattable.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.uml.nattable.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.infra.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.infra.core.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.tests.uml.tools.feature"
- version="0.0.0"/>
-
- <includes
- id="org.eclipse.papyrus.uml.textedit.tests.feature"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.papyrus.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.bundles.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.customization.properties.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.editor.integration.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.infra.gmfdiag.css.tests"
- download-size="0"
- install-size="0"
- version="0.0.0"/>
-
- <plugin
- id="org.eclipse.papyrus.junit.utils"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
- <plugin
- id="org.eclipse.papyrus.junit.framework"
- download-size="0"
- install-size="0"
- version="0.0.0"
- unpack="false"/>
-
-</feature>
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <includes
+ id="org.eclipse.papyrus.tests.uml.diagram.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.infra.services.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.sysml.diagram.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.sysml.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.uml.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.views.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.infra.nattable.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.sysml.nattable.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.uml.nattable.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.infra.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.infra.core.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.uml.tools.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.tests.uml.decoratormodel.feature"
+ version="0.0.0"/>
+
+ <includes
+ id="org.eclipse.papyrus.uml.textedit.tests.feature"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.papyrus.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.bundles.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.customization.properties.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.editor.integration.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.infra.gmfdiag.css.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"/>
+
+ <plugin
+ id="org.eclipse.papyrus.junit.utils"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.junit.framework"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/.project b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/.project
new file mode 100644
index 00000000000..1df6a2ecc9f
--- /dev/null
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.tests.uml.decoratormodel.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/build.properties b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/build.properties
new file mode 100644
index 00000000000..67be479779f
--- /dev/null
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/build.properties
@@ -0,0 +1,5 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/epl-v10.html b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/epl-v10.html
new file mode 100644
index 00000000000..cb1073a4bad
--- /dev/null
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/feature.xml
new file mode 100644
index 00000000000..e66a7621aa9
--- /dev/null
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/feature.xml
@@ -0,0 +1,72 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<feature
+ id="org.eclipse.papyrus.tests.uml.decoratormodel.feature"
+ label="Papyrus UML Decor Model Tests Feature"
+ version="1.1.0.qualifier"
+ provider-name="Eclipse Modeling Project">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2014 CEA LIST and others
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License
+v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="license.html">
+ Eclipse Foundation Software User Agreement
+March 17, 2005
+
+Usage Of Content
+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.
+
+Applicable Licenses
+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 http://www.eclipse.org/legal/epl-v10.html. For purposes of the EPL, &quot;Program&quot; will mean the Content.
+
+Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse.org CVS repository (&quot;Repository&quot;) in CVS modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).
+
+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;).
+Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&quot; ARchive) in a directory named &quot;plugins&quot;.
+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.
+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.
+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:
+
+The top-level (root) directory
+Plug-in and Fragment directories
+Inside Plug-ins and Fragments packaged as JARs
+Sub-directories of the directory named &quot;src&quot; of certain Plug-ins
+Feature directories
+Note: if a Feature made available by the Eclipse Foundation is installed using the Eclipse Update Manager, 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.
+
+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):
+
+Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)
+Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)
+Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)
+IBM Public License 1.0 (available at http://oss.software.ibm.com/developerworks/opensource/license10.html)
+Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)
+Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)
+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.
+
+Cryptography
+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&apos;s laws, regulations and policies concerning the import, possession, or use, and re-export of encryption software, to see if this is permitted.
+
+Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both.
+ </license>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.decoratormodel.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+ <plugin
+ id="org.eclipse.papyrus.uml.decoratormodel.controlmode.tests"
+ download-size="0"
+ install-size="0"
+ version="0.0.0"
+ unpack="false"/>
+
+</feature>
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/license.html b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/license.html
new file mode 100644
index 00000000000..c3d34c3c21e
--- /dev/null
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!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 9, 2014</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>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <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>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>
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/pom.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/pom.xml
new file mode 100644
index 00000000000..b56be93764b
--- /dev/null
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../releng/top-pom-main-tests.xml</relativePath>
+ </parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.tests.uml.decoratormodel.feature</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/model.exsd b/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/model.exsd
index 3e924caa53e..d9644724ac7 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/model.exsd
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/model.exsd
@@ -58,9 +58,10 @@ Registered model can be retrieved from the ModelSet.
</documentation>
</annotation>
<complexType>
- <sequence minOccurs="0" maxOccurs="unbounded">
+ <choice minOccurs="0" maxOccurs="unbounded">
<element ref="modelSnippet"/>
- </sequence>
+ <element ref="dependency"/>
+ </choice>
<attribute name="description" type="string">
<annotation>
<documentation>
@@ -150,6 +151,39 @@ The code is executed right after the modelSet is loaded.
</complexType>
</element>
+ <element name="dependency">
+ <complexType>
+ <choice minOccurs="1" maxOccurs="unbounded">
+ <element ref="loadAfter"/>
+ <element ref="unloadBefore"/>
+ </choice>
+ </complexType>
+ </element>
+
+ <element name="loadAfter">
+ <complexType>
+ <attribute name="identifier" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="unloadBefore">
+ <complexType>
+ <attribute name="identifier" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appInfo>
<meta.section type="since"/>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
index b97d551c383..c9b798632be 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
+ * Copyright (c) 2010, 2014 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -11,6 +11,7 @@
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - manage models by URI, not IFile (CDO)
* Christian W. Damus (CEA) - bug 437052
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
@@ -269,6 +270,10 @@ public abstract class AbstractBaseModel extends AbstractModel implements IVersio
protected Map<Object, Object> getSaveOptions() {
+ return getDefaultSaveOptions();
+ }
+
+ public static Map<Object, Object> getDefaultSaveOptions() {
Map<Object, Object> saveOptions = new HashMap<Object, Object>();
// default save options.
@@ -288,7 +293,6 @@ public abstract class AbstractBaseModel extends AbstractModel implements IVersio
return saveOptions;
}
-
@Override
public void saveCopy(IPath targetPathWithoutExtension, Map<Object, Object> targetMap) {
// OutputStream targetStream = getOutputStream(targetPath);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
index 653351be6a5..9ee222ffaca 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,17 +9,20 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 437052
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
import java.io.IOException;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.Set;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.papyrus.infra.core.Activator;
/**
@@ -33,9 +36,20 @@ public abstract class EMFLogicalModel extends AbstractBaseModel implements IEMFM
protected final Set<Resource> resources = new HashSet<Resource>();
public Set<Resource> getResources() {
+ pruneDeletedResources();
return resources;
}
+ protected void pruneDeletedResources() {
+ ResourceSet rset = getModelManager();
+ for (Iterator<Resource> iter = resources.iterator(); iter.hasNext();) {
+ if (iter.next().getResourceSet() != rset) {
+ // This resource was deleted
+ iter.remove();
+ }
+ }
+ }
+
@Override
protected void configureResource(Resource resourceToConfigure) {
super.configureResource(resourceToConfigure);
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java
index 727a02170d1..862d550115d 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/ResourceAdapter.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,10 +8,12 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.infra.core.resource;
+import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.Notifier;
@@ -21,6 +23,13 @@ import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.ResourceSetChangeEvent;
+import org.eclipse.emf.transaction.ResourceSetListener;
+import org.eclipse.emf.transaction.RollbackException;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+
+import com.google.common.collect.ImmutableList;
/**
@@ -38,6 +47,15 @@ public abstract class ResourceAdapter extends AdapterImpl {
// Don't need to track resources as targets (there are multiple)
if (newTarget instanceof ResourceSet) {
super.setTarget(newTarget);
+
+ // Discover existing resources. Iterate the current set; any new additions
+ // will be discovered automatically
+ for (Resource next : ImmutableList.copyOf(((ResourceSet) newTarget).getResources())) {
+ handleResourceAdded(next);
+ if (next.isLoaded()) {
+ handleResourceLoaded(next);
+ }
+ }
}
}
@@ -203,4 +221,102 @@ public abstract class ResourceAdapter extends AdapterImpl {
protected void handleRootRemoved(Resource resource, EObject root) {
// Pass
}
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A variant of the {@link ResourceAdapter} that is attached to a {@link TransactionalEditingDomain} to process batched notifications.
+ */
+ public static class Transactional extends ResourceAdapter implements ResourceSetListener {
+ private final boolean isPrecommit;
+
+ private final NotificationFilter filter = NotificationFilter.NOT_TOUCH.and(createFilter());
+
+ /**
+ * Initializes me as a post-commit resource notification handler.
+ */
+ public Transactional() {
+ this(false);
+ }
+
+ /**
+ * Initializes me as a pre- or post-commit resource notification handler.
+ *
+ * @param isPrecommit
+ * {@code true} to react to pre-commit notifications; {@code false} to react to post-commit notifications
+ */
+ public Transactional(boolean isPrecommit) {
+ this.isPrecommit = isPrecommit;
+ }
+
+ @Override
+ public boolean isAggregatePrecommitListener() {
+ return false;
+ }
+
+ @Override
+ public boolean isPrecommitOnly() {
+ return isPrecommit;
+ }
+
+ @Override
+ public boolean isPostcommitOnly() {
+ return !isPrecommit;
+ }
+
+ /**
+ * Subclasses may override/extend this method to create custom filters, perhaps based on the default filter create by the superclass.
+ * <b>Note</b> that this method is invoked by the superclass constructor, so subclasses must not attempt to access their own state.
+ *
+ * @return my notification filter
+ */
+ protected NotificationFilter createFilter() {
+ return NotificationFilter.createNotifierTypeFilter(ResourceSet.class).or(
+ NotificationFilter.createNotifierTypeFilter(Resource.class));
+ }
+
+ @Override
+ public NotificationFilter getFilter() {
+ return filter;
+ }
+
+ @Override
+ public void resourceSetChanged(ResourceSetChangeEvent event) {
+ handleResourceSetChangeEvent(event);
+ }
+
+ @Override
+ public Command transactionAboutToCommit(ResourceSetChangeEvent event) throws RollbackException {
+ handleResourceSetChangeEvent(event);
+ return null;
+ }
+
+ protected void handleResourceSetChangeEvent(ResourceSetChangeEvent event) {
+ for (Notification next : event.getNotifications()) {
+ notifyChanged(next);
+ }
+ }
+
+ @Override
+ public final void setTarget(Notifier newTarget) {
+ // Don't attach me to anything. I am fed directly by the editing domain
+ }
+
+ @Override
+ public final void unsetTarget(Notifier oldTarget) {
+ // Pass
+ }
+
+ @Override
+ protected final void addAdapter(Notifier notifier) {
+ // Don't attach me to anything. I am fed directly by the editing domain
+ }
+
+ @Override
+ protected final void removeAdapter(Notifier notifier) {
+ // Pass
+ }
+ }
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/JobBasedFuture.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/JobBasedFuture.java
new file mode 100644
index 00000000000..f5fb41b133b
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/JobBasedFuture.java
@@ -0,0 +1,335 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.utils;
+
+import java.util.concurrent.CancellationException;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Executor;
+import java.util.concurrent.ScheduledFuture;
+import java.util.concurrent.ScheduledThreadPoolExecutor;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+import java.util.concurrent.atomic.AtomicReference;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.core.runtime.ProgressMonitorWrapper;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.IJobManager;
+import org.eclipse.core.runtime.jobs.ILock;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.papyrus.infra.core.Activator;
+
+import com.google.common.util.concurrent.ExecutionList;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * A Guava {@link ListenableFuture} implemented as an Eclipse {@link Job} to ensure that, in case the UI thread ever has to wait
+ * for the future result, the blockage is reported to the user with opportunity to cancel.
+ * <p>
+ * <b>Note</b> that no scheduling rule must be {@linkplain Job#setRule(ISchedulingRule) set} on instances of this class. Nor must the implementation of the {@link #compute(IProgressMonitor)} method attempt to
+ * {@linkplain IJobManager#beginRule(ISchedulingRule, IProgressMonitor) begin} an ad hoc rule. Doing either will almost certainly cause deadlock or worse.
+ */
+public abstract class JobBasedFuture<V> extends Job implements ListenableFuture<V> {
+ private static final ScheduledThreadPoolExecutor TIMEOUT_EXECUTOR = new ScheduledThreadPoolExecutor(1);
+
+ private final CountDownLatch started = new CountDownLatch(1);
+ private final ILock runningLock = Job.getJobManager().newLock();
+ private final ISchedulingRule rule = new ISchedulingRule() {
+
+ @Override
+ public boolean isConflicting(ISchedulingRule rule) {
+ return rule == this;
+ }
+
+ @Override
+ public boolean contains(ISchedulingRule rule) {
+ return rule == this;
+ }
+ };
+
+ private final AtomicReference<State> state = new AtomicReference<State>(State.RUNNING);
+
+ private volatile Throwable exception;
+ private final ExecutionList executions = new ExecutionList();
+
+ private volatile V value;
+
+ static {
+ TIMEOUT_EXECUTOR.setKeepAliveTime(10, TimeUnit.SECONDS);
+ TIMEOUT_EXECUTOR.allowCoreThreadTimeOut(true);
+ }
+
+ public JobBasedFuture(String name) {
+ super(name);
+
+ setSystem(true);
+ setRule(rule);
+ }
+
+ final boolean transition(State from, State to) {
+ return state.compareAndSet(from, to);
+ }
+
+ final State state() {
+ return state.get();
+ }
+
+ final boolean isInState(State state) {
+ return this.state.get() == state;
+ }
+
+ @Override
+ protected final IStatus run(IProgressMonitor monitor) {
+ IStatus result = Status.OK_STATUS;
+
+ runningLock.acquire();
+ started.countDown();
+
+ try {
+ setValue(compute(monitor));
+ } catch (CoreException e) {
+ result = e.getStatus();
+ fail(e);
+ } catch (ThreadDeath d) {
+ throw d;
+ } catch (Throwable t) {
+ result = new Status(IStatus.ERROR, Activator.PLUGIN_ID, "Uncaught exception in future job", t); //$NON-NLS-1$
+ fail(t);
+ } finally {
+ runningLock.release();
+ }
+
+ return result;
+ }
+
+ protected abstract V compute(IProgressMonitor monitor) throws Exception;
+
+ @Override
+ public boolean cancel(boolean mayInterruptIfRunning) {
+ boolean result = transition(State.RUNNING, State.CANCELLED);
+
+ if (result) {
+ try {
+ cancel();
+ } finally {
+ executions.execute();
+ }
+ }
+
+ return result;
+ }
+
+ boolean fail(Throwable t) {
+ boolean result = transition(State.RUNNING, State.FAILED);
+
+ if (result) {
+ exception = t;
+ executions.execute();
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isCancelled() {
+ return isInState(State.CANCELLED);
+ }
+
+ @Override
+ public boolean isDone() {
+ return !isInState(State.RUNNING);
+ }
+
+ @Override
+ public V get() throws InterruptedException, ExecutionException {
+ awaitDone(0L);
+
+ return getValue();
+ }
+
+ @Override
+ public V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException {
+ if (!awaitDone(unit.toMillis(timeout))) {
+ throw new TimeoutException();
+ }
+
+ return getValue();
+ }
+
+ final boolean awaitDone(long timeoutMillis) throws InterruptedException {
+ // Check for short-circuit in case of running a listener on completion that
+ // then (obviously) tries to get our value
+ boolean result = isDone();
+
+ if (!result) {
+ Job current = Job.getJobManager().currentJob();
+ if ((current == null) || (current.getRule() == null)) {
+ result = uiSafeAwaitDone(timeoutMillis);
+ } else {
+ result = lockBasedAwaitDone(timeoutMillis);
+ }
+ }
+
+ return result;
+ }
+
+ private boolean lockBasedAwaitDone(long timeoutMillis) throws InterruptedException {
+ boolean result = false;
+
+ // Synchronize first on the start of execution of the job. This should never block for very long because the job
+ // will not have a scheduling rule that anyone else can begin
+
+ if (timeoutMillis <= 0L) {
+ started.await();
+ runningLock.acquire();
+
+ try {
+ result = isDone();
+ } finally {
+ runningLock.release();
+ }
+ } else {
+ final long startedWaiting = System.currentTimeMillis();
+ if (started.await(timeoutMillis, TimeUnit.MILLISECONDS)) {
+ long remaining = timeoutMillis - (System.currentTimeMillis() - startedWaiting);
+ if (remaining > 0L) {
+ if (runningLock.acquire(remaining)) {
+ try {
+ result = isDone();
+ } finally {
+ runningLock.release();
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private boolean uiSafeAwaitDone(long timeoutMillis) throws InterruptedException {
+ boolean result = false;
+
+ // Synchronize first on the start of execution of the job. This should never block for very long because the job
+ // will not have a scheduling rule that anyone else can begin
+
+ if (timeoutMillis <= 0L) {
+ started.await();
+
+ try {
+ Job.getJobManager().beginRule(rule, null);
+ result = isDone();
+ } finally {
+ Job.getJobManager().endRule(rule);
+ }
+ } else {
+ final long startedWaiting = System.currentTimeMillis();
+ if (started.await(timeoutMillis, TimeUnit.MILLISECONDS)) {
+ long remaining = timeoutMillis - (System.currentTimeMillis() - startedWaiting);
+ final IProgressMonitor monitor = new TimeoutMonitor();
+
+ ScheduledFuture<?> timeout = TIMEOUT_EXECUTOR.schedule(new Runnable() {
+
+ @Override
+ public void run() {
+ monitor.setCanceled(true);
+ }
+ }, remaining, TimeUnit.MILLISECONDS);
+
+ try {
+ try {
+ Job.getJobManager().beginRule(rule, monitor);
+ timeout.cancel(false);
+ result = isDone();
+ } finally {
+ Job.getJobManager().endRule(rule);
+ Thread.interrupted(); // clear interrupt state, just in case
+ }
+ } catch (OperationCanceledException e) {
+ // timed out
+ }
+ }
+ }
+
+ return result;
+ }
+
+ final boolean setValue(V value) {
+ boolean result = transition(State.RUNNING, State.DONE);
+
+ if (result) {
+ this.value = value;
+ executions.execute();
+ }
+
+ return result;
+ }
+
+ final V getValue() throws ExecutionException {
+ V result = null;
+
+ final State state = state();
+ switch (state) {
+ case CANCELLED:
+ throw new CancellationException(String.format("Job \"%s\" was cancelled", getName()));
+ case FAILED:
+ throw new ExecutionException(exception);
+ case DONE:
+ result = this.value;
+ break;
+ default:
+ throw new IllegalStateException(state.name());
+ }
+
+ return result;
+ }
+
+ @Override
+ public void addListener(Runnable listener, Executor executor) {
+ executions.add(listener, executor);
+ }
+
+ //
+ // Nested types
+ //
+
+ private enum State {
+ RUNNING, CANCELLED, FAILED, DONE;
+ }
+
+ private static class TimeoutMonitor extends ProgressMonitorWrapper {
+ private Thread thread;
+
+ TimeoutMonitor() {
+ super(new NullProgressMonitor());
+
+ thread = Thread.currentThread();
+ }
+
+ @Override
+ public void setCanceled(boolean b) {
+ boolean wasCanceled = isCanceled();
+ super.setCanceled(b);
+ if (!wasCanceled && b) {
+ thread.interrupt();
+ }
+ }
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java
index 652d2d3371f..159ee2c3364 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly/src/org/eclipse/papyrus/infra/emf/readonly/PapyrusROTransactionalEditingDomain.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos Origin, CEA, and others.
+ * Copyright (c) 2011, 2014 Atos Origin, CEA, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -14,6 +14,7 @@
* Christian W. Damus (CEA) - bug 429826
* Christian W. Damus (CEA) - bug 422257
* Christian W. Damus (CEA) - bug 415639
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.infra.emf.readonly;
@@ -109,7 +110,9 @@ public class PapyrusROTransactionalEditingDomain extends TransactionalEditingDom
}
protected void handleCrossResourceContainmentProxy(Notification notification) {
- if (notification.getEventType() == Notification.RESOLVE) {
+ // If it's not an EReference, then it's a feature-map EAttribute from an unknown-schema AnyType
+ // and it won't contain cross-resource containment references (at least, not that we could tell)
+ if ((notification.getEventType() == Notification.RESOLVE) && (notification.getFeature() instanceof EReference)) {
EReference reference = (EReference) notification.getFeature();
if (reference.isContainment()) {
InternalEObject newValue = (InternalEObject) notification.getNewValue();
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath
index 2d1a4302f04..ad32c83a788 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.classpath
@@ -1,7 +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 kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..410244d65a6 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
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.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
index 8c7bca4dadc..d259619ae52 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/META-INF/MANIFEST.MF
@@ -9,6 +9,7 @@ Export-Package: org.eclipse.papyrus.infra.emf,
org.eclipse.papyrus.infra.emf.providers.strategy,
org.eclipse.papyrus.infra.emf.requests,
org.eclipse.papyrus.infra.emf.resource,
+ org.eclipse.papyrus.infra.emf.resource.index,
org.eclipse.papyrus.infra.emf.utils
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
@@ -41,5 +42,5 @@ Bundle-Name: EMF Tools
Bundle-Activator: org.eclipse.papyrus.infra.emf.Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.emf;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/AnyRootNamespaceContentHandler.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/AnyRootNamespaceContentHandler.java
new file mode 100644
index 00000000000..5d4d7c3ea04
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/AnyRootNamespaceContentHandler.java
@@ -0,0 +1,104 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.regex.Pattern;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ContentHandler;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.ecore.xmi.impl.RootXMLContentHandlerImpl;
+import org.eclipse.emf.ecore.xml.type.XMLTypeDocumentRoot;
+
+import com.google.common.base.Strings;
+
+/**
+ * A XML content type handler that matches a namespace pattern against any of the namespaces declared in the document's root element.
+ * It therefore does not support the {@link RootXMLContentHandlerImpl#ELEMENT_NAMES} and {@link RootXMLContentHandlerImpl#KIND} configuration attributes.
+ */
+public class AnyRootNamespaceContentHandler extends RootXMLContentHandlerImpl {
+
+ public AnyRootNamespaceContentHandler(Map<String, String> parameters) {
+ super(parameters);
+ }
+
+ public AnyRootNamespaceContentHandler(String contentTypeID, String[] extensions, String namespace) {
+ super(contentTypeID, extensions, null, namespace, null);
+ }
+
+ public AnyRootNamespaceContentHandler(String contentTypeID, String[] extensions, Pattern namespacePattern) {
+ super(contentTypeID, extensions, null, namespacePattern, null);
+ }
+
+ @Override
+ public Map<String, Object> contentDescription(URI uri, InputStream inputStream, Map<?, ?> options, Map<Object, Object> context) throws IOException {
+ Map<String, Object> result;
+ String contentType = contentTypeID;
+
+ try {
+ result = super.contentDescription(uri, inputStream, options, context);
+
+ XMLResource xmlResource = load(uri, inputStream, options, context);
+ EList<EObject> contents = xmlResource.getContents();
+ if (!contents.isEmpty()) {
+ EObject eObject = contents.get(0);
+ if (eObject instanceof XMLTypeDocumentRoot) {
+ String matchedNamespace = null;
+ XMLTypeDocumentRoot documentRoot = (XMLTypeDocumentRoot) eObject;
+ for (String next : documentRoot.getXMLNSPrefixMap().values()) {
+ if (isMatchingNamespace(next)) {
+ matchedNamespace = next;
+ break;
+ }
+ }
+
+ if (matchedNamespace != null) {
+ result.put(VALIDITY_PROPERTY, ContentHandler.Validity.VALID);
+ } else {
+ // If none of the root namespaces matched, then we can be assured
+ // that the resource is not of this content type
+ result.put(VALIDITY_PROPERTY, ContentHandler.Validity.INVALID);
+ }
+
+ if (contentType == null) {
+ contentType = matchedNamespace;
+ }
+ }
+ }
+ } catch (IOException e) {
+ throw e;
+ } catch (Exception e) {
+ throw new IOException("Uncaught exception in describing resource content.", e); //$NON-NLS-1$
+ }
+
+ result.put(CONTENT_TYPE_PROPERTY, Strings.nullToEmpty(contentType));
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ public static class Describer extends RootXMLContentHandlerImpl.Describer {
+ @Override
+ protected ContentHandler createContentHandler(Map<String, String> parameters) {
+ return new AnyRootNamespaceContentHandler(parameters);
+ }
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/IWorkspaceModelIndexListener.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/IWorkspaceModelIndexListener.java
new file mode 100644
index 00000000000..7f76ceb8afb
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/IWorkspaceModelIndexListener.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.resource.index;
+
+import java.util.EventListener;
+
+/**
+ * Listener protocol for notifications of {@link WorkspaceModelIndex} events.
+ */
+public interface IWorkspaceModelIndexListener extends EventListener {
+ /**
+ * Notifies me that the index is about to {@linkplain WorkspaceModelIndexEvent#ABOUT_TO_RECALCULATE re-calculate} changes in some project.
+ *
+ * @param event
+ * the event object
+ */
+ void indexAboutToRecalculate(WorkspaceModelIndexEvent event);
+
+ /**
+ * Notifies me that the index has finished {@linkplain WorkspaceModelIndexEvent#RECALCULATED re-calculation} of changes in some project.
+ *
+ * @param event
+ * the event object
+ */
+ void indexRecalculated(WorkspaceModelIndexEvent event);
+
+ /**
+ * Notifies me that the index is about to {@linkplain WorkspaceModelIndexEvent#ABOUT_TO_CALCULATE fully calculate} the index for some project.
+ *
+ * @param event
+ * the event object
+ */
+ void indexAboutToCalculate(WorkspaceModelIndexEvent event);
+
+ /**
+ * Notifies me that the index has finished {@linkplain WorkspaceModelIndexEvent#CALCULATED full calculation} for some project.
+ *
+ * @param event
+ * the event object
+ */
+ void indexCalculated(WorkspaceModelIndexEvent event);
+
+ /**
+ * Notifies me that the index {@linkplain WorkspaceModelIndexEvent#FAILED failed} to (re-)calculate some project.
+ *
+ * @param event
+ * the event object
+ */
+ void indexFailed(WorkspaceModelIndexEvent event);
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndex.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndex.java
new file mode 100644
index 00000000000..d0960e3595a
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndex.java
@@ -0,0 +1,864 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.resource.index;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+import java.util.Map;
+import java.util.Queue;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.IResourceChangeEvent;
+import org.eclipse.core.resources.IResourceChangeListener;
+import org.eclipse.core.resources.IResourceDelta;
+import org.eclipse.core.resources.IResourceDeltaVisitor;
+import org.eclipse.core.resources.IResourceVisitor;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.QualifiedName;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.core.runtime.content.IContentTypeManager;
+import org.eclipse.core.runtime.jobs.IJobChangeEvent;
+import org.eclipse.core.runtime.jobs.IJobChangeListener;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.core.runtime.jobs.JobChangeAdapter;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.utils.JobBasedFuture;
+import org.eclipse.papyrus.infra.emf.Activator;
+
+import com.google.common.base.Function;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Queues;
+import com.google.common.collect.SetMultimap;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * A general-purpose index of model resources in the Eclipse workspace.
+ */
+public class WorkspaceModelIndex<T> {
+ private static final int MAX_INDEX_RETRIES = 3;
+
+ private final IndexHandler<? extends T> indexer;
+
+ private final QualifiedName indexKey;
+ private final IContentTypeManager mgr;
+ private final IContentType contentType;
+
+ private final SetMultimap<IProject, IFile> index = HashMultimap.create();
+ private final IResourceChangeListener workspaceListener = new WorkspaceListener();
+
+ private final Map<IProject, AbstractIndexJob> activeJobs = Maps.newHashMap();
+ private final JobWrangler jobWrangler;
+
+ private final CopyOnWriteArrayList<IWorkspaceModelIndexListener> listeners = Lists.newCopyOnWriteArrayList();
+
+ public WorkspaceModelIndex(String name, String contentType, IndexHandler<? extends T> indexer) {
+ this(name, contentType, indexer, 0);
+ }
+
+ public WorkspaceModelIndex(String name, String contentType, IndexHandler<? extends T> indexer, int maxConcurrentJobs) {
+ super();
+
+ this.indexKey = new QualifiedName("org.eclipse.papyrus.modelindex", name); //$NON-NLS-1$
+ this.mgr = Platform.getContentTypeManager();
+ this.contentType = this.mgr.getContentType(contentType);
+ this.indexer = indexer;
+
+ jobWrangler = new JobWrangler(maxConcurrentJobs);
+
+ startIndex();
+ }
+
+ public void dispose() {
+ ResourcesPlugin.getWorkspace().removeResourceChangeListener(workspaceListener);
+ Job.getJobManager().cancel(this);
+
+ synchronized (index) {
+ for (IFile next : index.values()) {
+ try {
+ next.setSessionProperty(indexKey, null);
+ } catch (CoreException e) {
+ // Just continue, best-effort. There's nothing else to do
+ }
+ }
+
+ index.clear();
+ }
+ }
+
+ private void startIndex() {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ workspace.addResourceChangeListener(workspaceListener, IResourceChangeEvent.POST_CHANGE);
+
+ index(Arrays.asList(workspace.getRoot().getProjects()));
+ }
+
+ void index(Collection<? extends IProject> projects) {
+ List<Job> jobs = Lists.newArrayListWithCapacity(projects.size());
+ for (IProject next : projects) {
+ jobs.add(new IndexProjectJob(next));
+ }
+ schedule(jobs);
+ }
+
+ /**
+ * Obtains an asynchronous future result that is scheduled to run after any pending indexing work has completed.
+ * The {@code function} is <em>not</em> invoked under synchronization on the index; it is passed a copy of the
+ * last consistent state of the index after any pending calculations have completed.
+ *
+ * @param function
+ * the function to schedule. Its input is the complete index map
+ *
+ * @return the future result of the function applied to the index
+ */
+ public <V> ListenableFuture<V> afterIndex(final Function<? super Map<IFile, T>, V> function) {
+ return Futures.transform(getIndex(), function);
+ }
+
+ /**
+ * Obtains an asynchronous future result that is scheduled to run after any pending indexing work has completed.
+ * The {@code callable} is invoked under synchronization on the index, so it must be careful about how it
+ * synchronizes on other objects to avoid deadlocks.
+ *
+ * @param callable
+ * the operation to schedule
+ *
+ * @return the future result of the operation
+ */
+ public <V> ListenableFuture<V> afterIndex(final Callable<V> callable) {
+ ListenableFuture<V> result;
+
+ if (Job.getJobManager().find(this).length == 0) {
+ // Result is available now
+ try {
+ result = Futures.immediateFuture(callable.call());
+ } catch (Exception e) {
+ result = Futures.immediateFailedFuture(e);
+ }
+ } else {
+ JobBasedFuture<V> job = new JobBasedFuture<V>(NLS.bind("Wait for model index \"{0}\"", indexKey.getLocalName())) {
+ {
+ // setSystem(true);
+ }
+
+ @Override
+ protected V compute(IProgressMonitor monitor) throws Exception {
+ V result;
+
+ Job.getJobManager().join(WorkspaceModelIndex.this, monitor);
+ synchronized (index) {
+ result = callable.call();
+ }
+
+ return result;
+ }
+ };
+ job.schedule();
+ result = job;
+ }
+
+ return result;
+ }
+
+ /**
+ * Schedules an operation to run after any pending indexing work has completed.
+ * The {@code runnable} is invoked under synchronization on the index, so it must be careful about how it
+ * synchronizes on other objects to avoid deadlocks.
+ *
+ * @param runnable
+ * the operation to schedule
+ */
+ public void afterIndex(final Runnable runnable) {
+ afterIndex(new Callable<Void>() {
+ @Override
+ public Void call() throws Exception {
+ runnable.run();
+ return null;
+ }
+ });
+ }
+
+ /**
+ * Obtains the index when it is ready.
+ *
+ * @return the future value of the index, when it is ready
+ */
+ public ListenableFuture<Map<IFile, T>> getIndex() {
+ return afterIndex(new Callable<Map<IFile, T>>() {
+ @Override
+ public Map<IFile, T> call() {
+ return map();
+ }
+ });
+ }
+
+ /**
+ * @precondition The {@link #index} monitor is held.
+ */
+ private Map<IFile, T> map() {
+ ImmutableMap.Builder<IFile, T> result = ImmutableMap.builder();
+
+ for (IFile next : index.values()) {
+ try {
+ @SuppressWarnings("unchecked")
+ T value = (T) next.getSessionProperty(indexKey);
+ if (value != null) {
+ result.put(next, value);
+ }
+ } catch (CoreException e) {
+ Activator.log.error("Failed to access index data for file " + next.getFullPath(), e); //$NON-NLS-1$
+ }
+ }
+
+ return result.build();
+ }
+
+ void process(IFile file) throws CoreException {
+ IProject project = file.getProject();
+
+ if (match(file)) {
+ add(project, file);
+ } else {
+ remove(project, file);
+ }
+ }
+
+ boolean match(IFile file) {
+ boolean result = false;
+
+ if (file.isAccessible()) {
+ InputStream input = null;
+
+ try {
+ input = file.getContents(true);
+ IContentType[] contentTypes = mgr.findContentTypesFor(input, file.getName());
+ for (int i = 0; (i < contentTypes.length) && !result; i++) {
+ result = contentTypes[i].isKindOf(contentType);
+ }
+ } catch (Exception e) {
+ Activator.log.error("Failed to index file " + file.getFullPath(), e); //$NON-NLS-1$
+ } finally {
+ if (input != null) {
+ try {
+ input.close();
+ } catch (IOException e) {
+ Activator.log.error("Failed to close indexed file " + file.getFullPath(), e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ void add(IProject project, IFile file) throws CoreException {
+ synchronized (index) {
+ index.put(project, file);
+ file.setSessionProperty(indexKey, indexer.index(file));
+ }
+ }
+
+ void remove(IProject project, IFile file) throws CoreException {
+ synchronized (index) {
+ index.remove(project, file);
+ indexer.unindex(file);
+
+ if (file.exists()) {
+ file.setSessionProperty(indexKey, null);
+ }
+ }
+ }
+
+ void remove(IProject project) throws CoreException {
+ synchronized (index) {
+ if (index.containsKey(project)) {
+ for (IFile next : index.get(project)) {
+ indexer.unindex(next);
+ }
+ index.removeAll(project);
+ }
+ }
+ }
+
+ ReindexProjectJob reindex(IProject project, Iterable<? extends IndexDelta> deltas) {
+ ReindexProjectJob result = null;
+
+ synchronized (activeJobs) {
+ AbstractIndexJob active = activeJobs.get(project);
+
+ if (active != null) {
+ switch (active.kind()) {
+ case REINDEX:
+ @SuppressWarnings("unchecked")
+ ReindexProjectJob reindex = (ReindexProjectJob) active;
+ reindex.addDeltas(deltas);
+ break;
+ case INDEX:
+ @SuppressWarnings("unchecked")
+ IndexProjectJob index = (IndexProjectJob) active;
+ ReindexProjectJob followup = index.getFollowup();
+ if (followup != null) {
+ followup.addDeltas(deltas);
+ } else {
+ followup = new ReindexProjectJob(project, deltas);
+ index.setFollowup(followup);
+ }
+ break;
+ case MASTER:
+ throw new IllegalStateException("Master job is in the active table."); //$NON-NLS-1$
+ }
+ } else {
+ // No active job. We'll need a new one
+ result = new ReindexProjectJob(project, deltas);
+ }
+ }
+
+ return result;
+ }
+
+ IResourceVisitor getWorkspaceVisitor(final IProgressMonitor monitor) {
+ return new IResourceVisitor() {
+
+ @Override
+ public boolean visit(IResource resource) throws CoreException {
+ if (resource.getType() == IResource.FILE) {
+ process((IFile) resource);
+ }
+
+ return !monitor.isCanceled();
+ }
+ };
+ }
+
+ private void schedule(Collection<? extends Job> jobs) {
+ // Synchronize on the active jobs because this potentially alters the wrangler's follow-up job
+ synchronized (activeJobs) {
+ jobWrangler.add(jobs);
+ }
+ }
+
+ public void addListener(IWorkspaceModelIndexListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ public void removeListener(IWorkspaceModelIndexListener listener) {
+ listeners.remove(listener);
+ }
+
+ private void notifyStarting(AbstractIndexJob indexJob) {
+ if (!listeners.isEmpty()) {
+ WorkspaceModelIndexEvent event;
+
+ switch (indexJob.kind()) {
+ case INDEX:
+ event = new WorkspaceModelIndexEvent(this, WorkspaceModelIndexEvent.ABOUT_TO_CALCULATE, indexJob.getProject());
+ for (IWorkspaceModelIndexListener next : listeners) {
+ try {
+ next.indexAboutToCalculate(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in index listsner.", e); //$NON-NLS-1$
+ }
+ }
+ break;
+ case REINDEX:
+ event = new WorkspaceModelIndexEvent(this, WorkspaceModelIndexEvent.ABOUT_TO_RECALCULATE, indexJob.getProject());
+ for (IWorkspaceModelIndexListener next : listeners) {
+ try {
+ next.indexAboutToRecalculate(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in index listsner.", e); //$NON-NLS-1$
+ }
+ }
+ break;
+ case MASTER:
+ // Pass
+ break;
+ }
+ }
+ }
+
+ private void notifyFinished(AbstractIndexJob indexJob, IStatus status) {
+ if (!listeners.isEmpty()) {
+ WorkspaceModelIndexEvent event;
+
+ if ((status != null) && (status.getSeverity() >= IStatus.ERROR)) {
+ event = new WorkspaceModelIndexEvent(this, WorkspaceModelIndexEvent.FAILED, indexJob.getProject());
+ for (IWorkspaceModelIndexListener next : listeners) {
+ try {
+ next.indexFailed(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in index listsner.", e); //$NON-NLS-1$
+ }
+ }
+ } else {
+ switch (indexJob.kind()) {
+ case INDEX:
+ event = new WorkspaceModelIndexEvent(this, WorkspaceModelIndexEvent.CALCULATED, indexJob.getProject());
+ for (IWorkspaceModelIndexListener next : listeners) {
+ try {
+ next.indexCalculated(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in index listsner.", e); //$NON-NLS-1$
+ }
+ }
+ break;
+ case REINDEX:
+ event = new WorkspaceModelIndexEvent(this, WorkspaceModelIndexEvent.RECALCULATED, indexJob.getProject());
+ for (IWorkspaceModelIndexListener next : listeners) {
+ try {
+ next.indexRecalculated(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in index listsner.", e); //$NON-NLS-1$
+ }
+ }
+ break;
+ case MASTER:
+ // Pass
+ break;
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ /**
+ * Callback interface for the index client to update the index.
+ */
+ public static interface IndexHandler<T> {
+ /**
+ * Updates the index for a file that matches our selection criteria.
+ *
+ * @param file
+ * a file that exists and matches the index selection criteria
+ *
+ * @return the object to store in the index for this {@code file}
+ */
+ T index(IFile file);
+
+ /**
+ * Updates the index for a file that no longer exists or no longer matches our selection criteria.
+ *
+ * @param file
+ * a file that no longer exists or otherwise no longer matches our selection criteria. It is removed from the index
+ */
+ void unindex(IFile file);
+ }
+
+ private enum JobKind {
+ MASTER, INDEX, REINDEX;
+
+ boolean isSystem() {
+ return this != MASTER;
+ }
+ }
+
+ private abstract class AbstractIndexJob extends Job {
+ private final IProject project;
+
+ AbstractIndexJob(String name, IProject project) {
+ super(name);
+
+ this.project = project;
+
+ if (project != null) {
+ setRule(project);
+ synchronized (activeJobs) {
+ if (!activeJobs.containsKey(project)) {
+ activeJobs.put(project, this);
+ }
+ }
+ }
+
+ setSystem(kind().isSystem());
+ }
+
+ @Override
+ public boolean belongsTo(Object family) {
+ return family == WorkspaceModelIndex.this;
+ }
+
+ final IProject getProject() {
+ return project;
+ }
+
+ abstract JobKind kind();
+
+ @Override
+ protected final IStatus run(IProgressMonitor monitor) {
+ IStatus result;
+
+ try {
+ result = doRun(monitor);
+ } finally {
+ synchronized (activeJobs) {
+ AbstractIndexJob followup = getFollowup();
+
+ if (project != null) {
+ if (followup == null) {
+ activeJobs.remove(project);
+ } else {
+ activeJobs.put(project, followup);
+ }
+ }
+
+ if (followup != null) {
+ // Kick off the follow-up job
+ followup.schedule();
+ }
+ }
+ }
+
+ return result;
+ }
+
+ protected abstract IStatus doRun(IProgressMonitor monitor);
+
+ protected AbstractIndexJob getFollowup() {
+ return null;
+ }
+ }
+
+ private class JobWrangler extends AbstractIndexJob {
+ private final Queue<Job> queue = Queues.newArrayDeque();
+ private final Set<Job> pending = Sets.newHashSet();
+ private final Set<IProject> failedProjects = Sets.newHashSet();
+
+ private final Lock pendingLock = new ReentrantLock();
+ private final Condition pendingCheck = pendingLock.newCondition();
+
+ private final int maxPending;
+
+ JobWrangler(int maxConcurrentJobs) {
+ super("Workspace model indexer", null);
+
+ this.maxPending = (maxConcurrentJobs <= 0) ? Integer.MAX_VALUE : maxConcurrentJobs;
+ }
+
+ @Override
+ JobKind kind() {
+ return JobKind.MASTER;
+ }
+
+ void add(Iterable<? extends Job> jobs) {
+ pendingLock.lock();
+
+ try {
+ if (queue.isEmpty() && pending.isEmpty()) {
+ // I am a new job
+ schedule();
+ }
+
+ Iterables.addAll(queue, jobs);
+ pendingCheck.signalAll();
+ } finally {
+ pendingLock.unlock();
+ }
+ }
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) {
+ IJobChangeListener listener = new JobChangeAdapter() {
+ private final Map<IProject, Integer> retries = Maps.newHashMap();
+
+ @Override
+ public void aboutToRun(IJobChangeEvent event) {
+ Job starting = event.getJob();
+
+ if (pending.contains(starting)) {
+ // one of mine is starting
+ @SuppressWarnings("unchecked")
+ AbstractIndexJob indexJob = (AbstractIndexJob) starting;
+ notifyStarting(indexJob);
+ }
+ }
+
+ @Override
+ public void done(IJobChangeEvent event) {
+ pendingLock.lock();
+ try {
+ final Job finished = event.getJob();
+ if (pending.remove(finished)) {
+ // one of mine finished
+ pendingCheck.signalAll();
+
+ @SuppressWarnings("unchecked")
+ AbstractIndexJob indexJob = (AbstractIndexJob) finished;
+ IProject project = indexJob.getProject();
+
+ notifyFinished(indexJob, event.getResult());
+
+ if ((event.getResult() != null) && (event.getResult().getSeverity() >= IStatus.ERROR)) {
+ // Indexing failed to complete. Need to re-build the index
+ if (project != null) {
+ int count = retries.containsKey(project) ? retries.get(project) : 0;
+ if (count++ < MAX_INDEX_RETRIES) {
+ // Only retry up to three times
+ failedProjects.add(project);
+ }
+ retries.put(project, ++count);
+ }
+ }
+ }
+ } finally {
+ pendingLock.unlock();
+ }
+ }
+ };
+
+ getJobManager().addJobChangeListener(listener);
+
+ try {
+ pendingLock.lock();
+
+ try {
+ for (;;) {
+ for (Job next = queue.poll(); next != null; next = queue.poll()) {
+ while (pending.size() >= maxPending) {
+ pendingCheck.awaitUninterruptibly();
+ }
+ pending.add(next);
+ next.schedule();
+ }
+
+ if (pending.isEmpty() && queue.isEmpty()) {
+ if (failedProjects.isEmpty()) {
+ // Done with wrangling jobs, for now
+ break;
+ } else {
+ // Rebuild the index for these projects, from scratch
+ index(failedProjects); // This adds to my queue
+ failedProjects.clear();
+ }
+ } else {
+ // Wait for something new to come into the queue or for the pending set to drain
+ pendingCheck.awaitUninterruptibly();
+ }
+ }
+ } finally {
+ pendingLock.unlock();
+ }
+ } finally {
+ getJobManager().removeJobChangeListener(listener);
+ }
+
+ return Status.OK_STATUS;
+ }
+ }
+
+ private class IndexProjectJob extends AbstractIndexJob {
+ private ReindexProjectJob followup;
+
+ IndexProjectJob(IProject project) {
+ super("Indexing project " + project.getName(), project);
+ }
+
+ @Override
+ JobKind kind() {
+ return JobKind.INDEX;
+ }
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) {
+ IStatus result = Status.OK_STATUS;
+ final IProject project = getProject();
+
+ monitor.beginTask("Indexing models in project " + project.getName(), IProgressMonitor.UNKNOWN);
+
+ try {
+ if (project.isAccessible()) {
+ project.accept(getWorkspaceVisitor(monitor));
+ } else {
+ remove(project);
+ }
+
+ if (monitor.isCanceled()) {
+ result = Status.CANCEL_STATUS;
+ }
+ } catch (CoreException e) {
+ result = e.getStatus();
+ } finally {
+ monitor.done();
+ }
+
+ return result;
+ }
+
+ void setFollowup(ReindexProjectJob followup) {
+ this.followup = followup;
+ }
+
+ @Override
+ protected ReindexProjectJob getFollowup() {
+ return followup;
+ }
+ }
+
+ private class WorkspaceListener implements IResourceChangeListener {
+ @Override
+ public void resourceChanged(IResourceChangeEvent event) {
+ final Multimap<IProject, IndexDelta> deltas = ArrayListMultimap.create();
+
+ try {
+ event.getDelta().accept(new IResourceDeltaVisitor() {
+
+ @Override
+ public boolean visit(IResourceDelta delta) throws CoreException {
+ if (delta.getResource().getType() == IResource.FILE) {
+ IFile file = (IFile) delta.getResource();
+
+ switch (delta.getKind()) {
+ case IResourceDelta.CHANGED:
+ if ((delta.getFlags() & (IResourceDelta.SYNC | IResourceDelta.CONTENT | IResourceDelta.REPLACED)) != 0) {
+ // Re-index in place
+ deltas.put(file.getProject(), new IndexDelta(file, IndexDelta.DeltaKind.REINDEX));
+ }
+ break;
+ case IResourceDelta.REMOVED:
+ deltas.put(file.getProject(), new IndexDelta(file, IndexDelta.DeltaKind.UNINDEX));
+ break;
+ case IResourceDelta.ADDED:
+ deltas.put(file.getProject(), new IndexDelta(file, IndexDelta.DeltaKind.INDEX));
+ break;
+ }
+ }
+ return true;
+ }
+ });
+ } catch (CoreException e) {
+ Activator.log.error("Failed to analyze resource changes for re-indexing.", e); //$NON-NLS-1$
+ }
+
+ if (!deltas.isEmpty()) {
+ List<Job> jobs = Lists.newArrayListWithCapacity(deltas.keySet().size());
+ for (IProject next : deltas.keySet()) {
+ ReindexProjectJob reindex = reindex(next, deltas.get(next));
+ if (reindex != null) {
+ jobs.add(reindex);
+ }
+ }
+ schedule(jobs);
+ }
+ }
+ }
+
+ private static class IndexDelta {
+ private final IFile file;
+
+ private final DeltaKind kind;
+
+ IndexDelta(IFile file, DeltaKind kind) {
+ this.file = file;
+ this.kind = kind;
+ }
+
+ //
+ // Nested types
+ //
+
+ enum DeltaKind {
+ INDEX, REINDEX, UNINDEX
+ }
+ }
+
+ private class ReindexProjectJob extends AbstractIndexJob {
+ private final IProject project;
+ private final ConcurrentLinkedQueue<IndexDelta> deltas;
+
+ ReindexProjectJob(IProject project, Iterable<? extends IndexDelta> deltas) {
+ super("Re-indexing project " + project.getName(), project);
+ this.project = project;
+ this.deltas = Queues.newConcurrentLinkedQueue(deltas);
+ }
+
+ @Override
+ JobKind kind() {
+ return JobKind.REINDEX;
+ }
+
+ void addDeltas(Iterable<? extends IndexDelta> deltas) {
+ Iterables.addAll(this.deltas, deltas);
+ }
+
+ @Override
+ protected IStatus doRun(IProgressMonitor monitor) {
+ IStatus result = Status.OK_STATUS;
+
+ monitor.beginTask("Re-indexing models in project " + project.getName(), IProgressMonitor.UNKNOWN);
+
+ try {
+ for (IndexDelta next = deltas.poll(); next != null; next = deltas.poll()) {
+ if (monitor.isCanceled()) {
+ result = Status.CANCEL_STATUS;
+ break;
+ }
+
+ try {
+ switch (next.kind) {
+ case INDEX:
+ case REINDEX:
+ process(next.file);
+ break;
+ case UNINDEX:
+ remove(project, next.file);
+ break;
+ }
+ } catch (CoreException e) {
+ result = e.getStatus();
+ break;
+ } finally {
+ monitor.worked(1);
+ }
+ }
+ } finally {
+ monitor.done();
+ }
+
+ return result;
+ }
+
+ @Override
+ protected AbstractIndexJob getFollowup() {
+ // If I still have work to do, then I am my own follow-up
+ return deltas.isEmpty() ? null : this;
+ }
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexAdapter.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexAdapter.java
new file mode 100644
index 00000000000..5f122ae72ff
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexAdapter.java
@@ -0,0 +1,58 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.resource.index;
+
+/**
+ * A convenience superclass for selective call-back implementation in {@link WorkspaceModelIndex} listeners.
+ */
+public class WorkspaceModelIndexAdapter implements IWorkspaceModelIndexListener {
+
+ public WorkspaceModelIndexAdapter() {
+ super();
+ }
+
+ @Override
+ public void indexAboutToRecalculate(WorkspaceModelIndexEvent event) {
+ indexAboutToCalculateOrRecalculate(event);
+ }
+
+ @Override
+ public void indexRecalculated(WorkspaceModelIndexEvent event) {
+ indexCalculatedOrRecalculated(event);
+ }
+
+ @Override
+ public void indexAboutToCalculate(WorkspaceModelIndexEvent event) {
+ indexAboutToCalculateOrRecalculate(event);
+ }
+
+ @Override
+ public void indexCalculated(WorkspaceModelIndexEvent event) {
+ indexCalculatedOrRecalculated(event);
+ }
+
+ @Override
+ public void indexFailed(WorkspaceModelIndexEvent event) {
+ // Pass
+ }
+
+ protected void indexAboutToCalculateOrRecalculate(WorkspaceModelIndexEvent event) {
+ // Pass
+ }
+
+ protected void indexCalculatedOrRecalculated(WorkspaceModelIndexEvent event) {
+ // Pass
+ }
+
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexEvent.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexEvent.java
new file mode 100644
index 00000000000..2bec19dc288
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexEvent.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.resource.index;
+
+import java.util.EventObject;
+
+import org.eclipse.core.resources.IProject;
+
+/**
+ * Event object notifying {@link IWorkspaceModelIndexListener}s of changes in the index.
+ */
+public class WorkspaceModelIndexEvent extends EventObject {
+
+ /** Event type indicating that the index is about to be re-calculated for some project based on changes in that project. */
+ public static final int ABOUT_TO_RECALCULATE = 0;
+
+ /** Event type indicating that the index has finished re-calculating for some project based on changes in that project. */
+ public static final int RECALCULATED = 1;
+
+ /** Event type indicating that the index is about to be fully calculated for some project. */
+ public static final int ABOUT_TO_CALCULATE = 2;
+
+ /** Event type indicating that the index has finished a full calculation for some project. */
+ public static final int CALCULATED = 3;
+
+ /** Event type indicating that the index (re-)calculation was interrupted or otherwise failed and the index is now out of sync for some project. */
+ public static final int FAILED = 4;
+
+
+ private static final long serialVersionUID = 1L;
+
+ private final int eventType;
+
+ private final IProject project;
+
+ /**
+ * Initializes me.
+ *
+ * @param source
+ * the index that has changed
+ * @param eventType
+ * the kind of change
+ * @param project
+ * the project for which the index changed
+ */
+ public WorkspaceModelIndexEvent(WorkspaceModelIndex<?> source, int eventType, IProject project) {
+ super(source);
+
+ this.eventType = eventType;
+ this.project = project;
+ }
+
+ @Override
+ public WorkspaceModelIndex<?> getSource() {
+ return (WorkspaceModelIndex<?>) super.getSource();
+ }
+
+ public int getEventType() {
+ return eventType;
+ }
+
+ public IProject getProject() {
+ return project;
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFunctions.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFunctions.java
new file mode 100644
index 00000000000..20996f1277f
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFFunctions.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+
+import com.google.common.base.Function;
+
+/**
+ * Useful Guava {@link Function}s for working with EMF models.
+ */
+public class EMFFunctions {
+
+ private EMFFunctions() {
+ super();
+ }
+
+ /**
+ * Obtains a function that obtains the URI of an EMF object.
+ *
+ * @return an EMF object URI function
+ *
+ * @see EcoreUtil#getURI(EObject)
+ */
+ public static Function<EObject, URI> objectURI() {
+ return new Function<EObject, URI>() {
+ @Override
+ public URI apply(EObject input) {
+ return (input == null) ? null : EcoreUtil.getURI(input);
+ }
+ };
+ }
+
+ /**
+ * Obtains a function that obtains the URI of a resource.
+ *
+ * @return a resource URI function
+ *
+ * @see Resource#getURI()
+ */
+ public static Function<Resource, URI> resourceURI() {
+ return new Function<Resource, URI>() {
+ @Override
+ public URI apply(Resource input) {
+ return (input == null) ? null : input.getURI();
+ }
+ };
+ }
+
+ /**
+ * Obtains a function that trims the fragments of URIs.
+ *
+ * @return a URI fragment trimming function
+ *
+ * @see URI#trimFragment()
+ */
+ public static Function<URI, URI> trimURIFragment() {
+ return new Function<URI, URI>() {
+ @Override
+ public URI apply(URI input) {
+ return (input == null) ? null : input.trimFragment();
+ }
+ };
+ }
+
+ public static Function<EObject, Object> getFeature(final EStructuralFeature feature) {
+ return new Function<EObject, Object>() {
+ @Override
+ public Object apply(EObject input) {
+ return (input == null) ? null : input.eGet(feature);
+ }
+ };
+ }
+
+ public static <T> Function<EObject, T> getFeature(final EStructuralFeature feature, final Class<T> ofType) {
+ return new Function<EObject, T>() {
+ @Override
+ public T apply(EObject input) {
+ return (input == null) ? null : ofType.cast(input.eGet(feature));
+ }
+ };
+ }
+}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFPredicates.java b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFPredicates.java
new file mode 100644
index 00000000000..18b7a7937e8
--- /dev/null
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.emf/src/org/eclipse/papyrus/infra/emf/utils/EMFPredicates.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.utils;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+
+import com.google.common.base.Predicate;
+
+/**
+ * Useful Guava {@link Predicate}s for working with EMF models.
+ */
+public class EMFPredicates {
+
+ private EMFPredicates() {
+ super();
+ }
+
+ /**
+ * Obtains a predicate testing that an EMF object is not a proxy. It is formulated this
+ * way on the expectation that usually one would want to filter for objects that aren't
+ * proxies. Otherwise, just do {@code Predicates.not(EMFPredicates.notProxy())}.
+ *
+ * @return a predicate that matches EMF objects that are not proxies
+ *
+ * @see EObject#eIsProxy()
+ */
+ public static Predicate<EObject> notProxy() {
+ return new Predicate<EObject>() {
+ @Override
+ public boolean apply(EObject input) {
+ return (input != null) && !input.eIsProxy();
+ }
+ };
+ }
+
+ /**
+ * Obtains a predicate testing that a resource is loaded.
+ *
+ * @return an is-loaded predicate
+ *
+ * @see Resource#isLoaded()
+ */
+ public static Predicate<Resource> isLoaded() {
+ return new Predicate<Resource>() {
+ @Override
+ public boolean apply(Resource input) {
+ return (input != null) && input.isLoaded();
+ }
+ };
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ICallableWithProgress.java b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ICallableWithProgress.java
new file mode 100644
index 00000000000..2efd39b53ed
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ICallableWithProgress.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.tools.util;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.concurrent.Callable;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+
+/**
+ * The {@link Callable} analogue of an {@link IRunnableWithProgress}.
+ */
+public interface ICallableWithProgress<V> {
+ /**
+ * Invokes me in a runnable context with a progress monitor.
+ *
+ * @param monitor
+ * the progress monitor to use to display progress and receive
+ * requests for cancellation
+ * @exception InvocationTargetException
+ * if the run method must propagate a checked exception,
+ * it should wrap it inside an <code>InvocationTargetException</code>; runtime exceptions are automatically
+ * wrapped in an <code>InvocationTargetException</code> by the calling context
+ * @exception InterruptedException
+ * if the operation detects a request to cancel,
+ * using <code>IProgressMonitor.isCanceled()</code>, it should exit by throwing <code>InterruptedException</code>
+ *
+ * @see UIUtil#call(IRunnableContext, ICallableWithProgress)
+ * @see IRunnableContext#run
+ */
+ V call(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException;
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ReferenceCounted.java b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ReferenceCounted.java
new file mode 100644
index 00000000000..6c0444c3086
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/ReferenceCounted.java
@@ -0,0 +1,175 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.tools.util;
+
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.atomic.AtomicInteger;
+
+/**
+ * A convenient reference-counting utility with automatic disposal and asynchronous auto-disposal (intended
+ * for use with the UI event-loop executor service). Sub-classes leveraging the self-disposing behaviour of
+ * the self-owning instance must override the {@link #dispose()} method.
+ */
+public class ReferenceCounted<T> {
+ private final T owner;
+ private final AtomicInteger refCount = new AtomicInteger();
+ private Runnable disposeAction;
+ private final ExecutorService autoReleaseExecutor;
+
+ /**
+ * Initializes me with my owner for which I count references.
+ * <p>
+ * I do not support {@link #autoRelease()}.
+ *
+ * @param owner
+ * my owner
+ * @param disposeAction
+ * action to run when the reference count reaches zero to dispose my {@code owner}
+ *
+ * @throws IllegalArgumentException
+ * if the {@code disposeAction} is {@code null} because, really,
+ * why would you need reference counting for an object that doesn't need to be disposed?
+ */
+ public ReferenceCounted(T owner, Runnable disposeAction) {
+ this(owner, null, disposeAction);
+ }
+
+ /**
+ * Initializes me with my owner for which I count references.
+ * <p>
+ * I support {@link #autoRelease()} using the given executor.
+ *
+ * @param owner
+ * my owner
+ * @param autoReleaseExecutor
+ * the executor on which to schedule auto-release invocations
+ * @param disposeAction
+ * action to run when the reference count reaches zero to dispose my {@code owner}
+ *
+ * @throws IllegalArgumentException
+ * if the {@code disposeAction} is {@code null} because, really,
+ * why would you need reference counting for an object that doesn't need to be disposed?
+ */
+ public ReferenceCounted(T owner, ExecutorService autoReleaseExecutor, Runnable disposeAction) {
+ super();
+
+ if (disposeAction == null) {
+ throw new IllegalArgumentException("null disposeAction"); //$NON-NLS-1$
+ }
+
+ this.owner = owner;
+ this.autoReleaseExecutor = autoReleaseExecutor;
+ this.disposeAction = disposeAction;
+ }
+
+ /**
+ * Initializes me as a self-disposing reference-counted instance. This constructor is only suitable
+ * for chaining from subclasses.
+ * <p>
+ * I do not support {@link #autoRelease()}.
+ */
+ protected ReferenceCounted() {
+ this((ExecutorService) null);
+ }
+
+ /**
+ * Initializes me as a self-disposing reference-counted instance. This constructor is only suitable
+ * for chaining from subclasses.
+ * <p>
+ * I support {@link #autoRelease()} using the given executor.
+ *
+ * @param autoReleaseExecutor
+ * the executor on which to schedule auto-release invocations
+ */
+ @SuppressWarnings("unchecked")
+ protected ReferenceCounted(ExecutorService autoReleaseExecutor) {
+ super();
+
+ this.owner = (T) this;
+ this.disposeAction = new SelfDisposeAction();
+ this.autoReleaseExecutor = autoReleaseExecutor;
+ }
+
+ /**
+ * Retains me, incrementing my retain count. The caller must eventually {@link #release()} me (even if via the {@link #autoRelease()} method)
+ * if I am to become disposable.
+ *
+ * @return my owner, for convenience of call chaining
+ */
+ public final T retain() {
+ refCount.incrementAndGet();
+ return owner;
+ }
+
+ /**
+ * Releases me, decrementing my retain count. When my retain count reaches zero, I dispose myself using the
+ * configured dispose-action runnable.
+ */
+ public final void release() {
+ if (refCount.decrementAndGet() <= 0) {
+ if (disposeAction != null) {
+ try {
+ disposeAction.run();
+ } finally {
+ disposeAction = null;
+ }
+ }
+ }
+ }
+
+ /**
+ * Automatically releases me some time in the future, as determined by the auto-release executor with which
+ * I was configured. A particularly convenient executor is one that posts an asynchronous execution on the
+ * display thread, to automatically dispose my owner (or me, as the case may be) when the display thread
+ * returns to the event loop.
+ *
+ * @return my owner, for convenience of call chaining
+ *
+ * @throws IllegalStateException
+ * if I have no auto-release executor
+ */
+ public final T autoRelease() {
+ if (autoReleaseExecutor == null) {
+ throw new IllegalStateException("no auto-release executor available"); //$NON-NLS-1$
+ }
+
+ // Don't submit the dispose action because we could still be retained!
+ autoReleaseExecutor.execute(new Runnable() {
+
+ public void run() {
+ release();
+ }
+ });
+ return owner;
+ }
+
+ /**
+ * For classes that extend the {@code ReferenceCount}, this must be overridden to implement disposal.
+ * The default implementation throws {@link UnsupportedOperationException} to ensure that subclasses
+ * override it.
+ */
+ protected void dispose() {
+ throw new UnsupportedOperationException("dispose is unimplemented"); //$NON-NLS-1$
+ }
+
+ //
+ // Nested types
+ //
+
+ private class SelfDisposeAction implements Runnable {
+ public void run() {
+ dispose();
+ }
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/UIUtil.java b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/UIUtil.java
index a6ea02ed31e..945be4fc150 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/UIUtil.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.tools/src/org/eclipse/papyrus/infra/tools/util/UIUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,10 +8,12 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.infra.tools.util;
+import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Date;
import java.util.LinkedList;
@@ -19,15 +21,21 @@ import java.util.List;
import java.util.Queue;
import java.util.concurrent.AbstractExecutorService;
import java.util.concurrent.Callable;
+import java.util.concurrent.Executor;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.concurrent.FutureTask;
import java.util.concurrent.RejectedExecutionException;
import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
import java.util.concurrent.locks.Condition;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.jface.operation.IRunnableContext;
+import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IMemento;
@@ -53,7 +61,19 @@ public class UIUtil {
* @return the executor
*/
public static ExecutorService createUIExecutor(Display display) {
- return new UIExecutorService(display);
+ return new DisplayExecutorService(display);
+ }
+
+ /**
+ * Create an executor that runs tasks asynchronously on an observable {@link Realm}. If you need synchronous execution, schedule {@link Future}s and {@linkplain Future#get() wait} for them.
+ *
+ * @param realm
+ * the observable realm on which thread to execute tasks
+ *
+ * @return the executor
+ */
+ public static ExecutorService createObservableExecutor(Realm realm) {
+ return new RealmExecutorService(realm);
}
/**
@@ -132,11 +152,97 @@ public class UIUtil {
return asyncCall(Display.getDefault(), callable);
}
+ /**
+ * Calls a {@code callable} in the given {@code context}.
+ *
+ * @param fork
+ * {@code true} if the runnable should be run in a separate thread,
+ * and {@code false} to run in the same thread
+ * @param cancelable
+ * {@code true} to enable the cancellation, and {@code false} to make the operation uncancellable
+ * @param runnable
+ * the runnable to run
+ *
+ * @exception InvocationTargetException
+ * wraps any exception or error which occurs
+ * while running the runnable
+ * @exception InterruptedException
+ * propagated by the context if the runnable
+ * acknowledges cancellation by throwing this exception. This should not be thrown
+ * if {@code cancelable} is {@code false}.
+ */
+ public static <V> V call(IRunnableContext context, boolean fork, boolean cancelable, ICallableWithProgress<V> callable) throws InvocationTargetException, InterruptedException {
+ class RunnableWrapper implements IRunnableWithProgress {
+ final ICallableWithProgress<V> delegate;
+
+ V result;
+
+ RunnableWrapper(ICallableWithProgress<V> delegate) {
+ this.delegate = delegate;
+ }
+
+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ result = delegate.call(monitor);
+ }
+ }
+
+ RunnableWrapper wrapper = new RunnableWrapper(callable);
+ context.run(fork, cancelable, wrapper);
+ return wrapper.result;
+ }
+
+ /**
+ * Obtains a simple executor that asynchronously executes at most one task on the default
+ * display thread. While any task is still pending execution on this executor,
+ * all others are silently discarded. This is useful for cases where, for example, UI
+ * refreshes are posted repeatedly from independent events that aren't aware of each other
+ * but where each refresh task would repeat the same work.
+ *
+ * @param display
+ * a display on which thread to execute tasks
+ *
+ * @return the executor
+ *
+ * @see #createAsyncOnceExecutor(Display)
+ */
+ public static Executor createAsyncOnceExecutor() {
+ return createAsyncOnceExecutor(Display.getDefault());
+ }
+
+ /**
+ * Obtains a simple executor that asynchronously executes at most one task on the given {@code display}'s thread. While any task is still pending execution on this executor,
+ * all others are silently discarded. This is useful for cases where, for example, UI
+ * refreshes are posted repeatedly from independent events that aren't aware of each other
+ * but where each refresh task would repeat the same work.
+ *
+ * @param display
+ * a display on which thread to execute tasks
+ *
+ * @return the executor
+ */
+ public static Executor createAsyncOnceExecutor(final Display display) {
+ return new Executor() {
+ private final AtomicBoolean pending = new AtomicBoolean();
+
+ public void execute(final Runnable task) {
+ if (pending.compareAndSet(false, true)) {
+ display.asyncExec(new Runnable() {
+
+ public void run() {
+ pending.set(false);
+ task.run();
+ }
+ });
+ }
+ }
+ };
+ }
+
//
// Nested types
//
- private static class UIExecutorService extends AbstractExecutorService {
+ private static abstract class UIExecutorService extends AbstractExecutorService {
private final Lock lock = new ReentrantLock();
@@ -144,12 +250,10 @@ public class UIUtil {
private final Queue<RunnableWrapper> pending = new LinkedList<RunnableWrapper>();
- private final Display display;
-
private volatile boolean shutdown;
- UIExecutorService(Display display) {
- this.display = display;
+ UIExecutorService() {
+ super();
}
public void execute(Runnable command) {
@@ -157,9 +261,11 @@ public class UIUtil {
throw new RejectedExecutionException("Executor service is shut down"); //$NON-NLS-1$
}
- display.asyncExec(enqueue(command));
+ asyncExec(enqueue(command));
}
+ abstract void asyncExec(Runnable runnable);
+
public List<Runnable> shutdownNow() {
List<Runnable> result = new ArrayList<Runnable>();
@@ -286,4 +392,34 @@ public class UIUtil {
}
}
};
+
+ private static class DisplayExecutorService extends UIExecutorService {
+ private final Display display;
+
+ DisplayExecutorService(Display display) {
+ super();
+
+ this.display = display;
+ }
+
+ @Override
+ void asyncExec(Runnable runnable) {
+ display.asyncExec(runnable);
+ }
+ }
+
+ private static class RealmExecutorService extends UIExecutorService {
+ private final Realm realm;
+
+ RealmExecutorService(Realm realm) {
+ super();
+
+ this.realm = realm;
+ }
+
+ @Override
+ void asyncExec(Runnable runnable) {
+ realm.asyncExec(runnable);
+ }
+ }
}
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java
index e5068461254..e989776a7c0 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/commands/CreateControlResource.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 Atos.
- *
+ * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.infra.services.controlmode.commands;
@@ -55,7 +55,15 @@ public class CreateControlResource extends AbstractControlResourceCommand {
Resource resource = getResourceSet().getResource(getTargetUri(), false);
boolean resourceInSet = resource != null;
if (resourceInSet) {
- return CommandResult.newErrorCommandResult("The resource is already in the resource set");
+ if (failedToLoadBecauseNonexistent(resource)) {
+ // It doesn't exist, so by re-creating it we may actually help to fix unresolved proxies
+ // (such as from an out-of-date sash model)
+ resource.getResourceSet().getResources().remove(resource);
+ resource = null;
+ resourceInSet = false;
+ } else {
+ return CommandResult.newErrorCommandResult("The resource is already in the resource set");
+ }
}
Resource newResource = getResourceSet().createResource(getTargetUri());
if (newResource == null) {
@@ -70,6 +78,17 @@ public class CreateControlResource extends AbstractControlResourceCommand {
return CommandResult.newOKCommandResult(newResource);
}
+ boolean failedToLoadBecauseNonexistent(Resource resource) {
+ boolean result = false;
+
+ if (resource.getContents().isEmpty() && !resource.getErrors().isEmpty()) {
+ // Does it exist to load it?
+ result = !resource.getResourceSet().getURIConverter().exists(resource.getURI(), null);
+ }
+
+ return result;
+ }
+
@Override
protected IStatus doUndo(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
IStatus superStatus = super.doUndo(monitor, info);
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IControlCommandParticipant.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IControlCommandParticipant.java
index b121fdd4830..e9f6e8ede2c 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IControlCommandParticipant.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IControlCommandParticipant.java
@@ -1,5 +1,6 @@
/*******************************************************************************
- * Copyright (c) 2013 Atos.
+ * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
+ *
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -7,6 +8,8 @@
*
* Contributors:
* Arthur Daussy <a href="mailto:arthur.daussy@atos.net"> - initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
******************************************************************************/
package org.eclipse.papyrus.infra.services.controlmode.participants;
@@ -35,7 +38,8 @@ public interface IControlCommandParticipant extends IControlModeParticipant {
/**
* Ask the participant for command that will be executed before the control command
- * The returned command should not be null (use {@link UnexecutableCommand}
+ * The returned command should be {@code null} if no pre-control command is
+ * required (an {@link UnexecutableCommand} blocks all pre-control execution).
*
* @param request
* @return
@@ -44,7 +48,9 @@ public interface IControlCommandParticipant extends IControlModeParticipant {
/**
* Ask the participant for command that will be executed after the control command
- *
+ * The returned command should be {@code null} if no post-control command is
+ * required (an {@link UnexecutableCommand} blocks all post-control execution).
+ *
* @param request
* @return
*/
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IUncontrolCommandParticipant.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IUncontrolCommandParticipant.java
index 791f1b014cb..4bfaacadce7 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IUncontrolCommandParticipant.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode/src/org/eclipse/papyrus/infra/services/controlmode/participants/IUncontrolCommandParticipant.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 Atos.
- *
+ * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,11 +8,13 @@
*
* Contributors:
* Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.infra.services.controlmode.participants;
import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
/**
@@ -33,16 +34,20 @@ public interface IUncontrolCommandParticipant extends IControlModeParticipant {
public boolean provideUnControlCommand(ControlModeRequest request);
/**
- * Ask the participant for command that will be executed before the control/uncontrol command
- *
+ * Ask the participant for command that will be executed before the uncontrol command
+ * The returned command should be {@code null} if no pre-uncontrol command is
+ * required (an {@link UnexecutableCommand} blocks all pre-uncontrol execution).
+ *
* @param request
* @return
*/
public ICommand getPreUncontrolCommand(ControlModeRequest request);
/**
- * Ask the participant for command that will be executed after the control/uncontrol command
- *
+ * Ask the participant for command that will be executed after the uncontrol command
+ * The returned command should be {@code null} if no post-uncontrol command is
+ * required (an {@link UnexecutableCommand} blocks all post-uncontrol execution).
+ *
* @param request
* @return
*/
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
index 0002e105505..1c9ecd9e80d 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/editors/MultipleValueEditor.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
+ * Copyright (c) 2010, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 402525
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.editors;
@@ -21,6 +22,7 @@ import org.eclipse.core.databinding.observable.IChangeListener;
import org.eclipse.core.databinding.observable.list.IObservableList;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
@@ -246,8 +248,10 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
remove.setEnabled(!readOnly);
up.setEnabled(ordered && !readOnly);
down.setEnabled(ordered && !readOnly);
- edit.setEnabled(this.referenceFactory != null && referenceFactory.canEdit() && !readOnly);
+ if (edit != null) {
+ edit.setEnabled(this.referenceFactory != null && referenceFactory.canEdit() && !readOnly);
+ }
if (modelProperty != null && this.upperBound != MANY) {
if (modelProperty.size() >= this.upperBound) {
@@ -312,7 +316,7 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
* @param labelProvider
* The label provider for this editor
*/
- public void setLabelProvider(ILabelProvider labelProvider) {
+ public void setLabelProvider(IBaseLabelProvider labelProvider) {
treeViewer.setLabelProvider(labelProvider);
}
@@ -578,7 +582,7 @@ public class MultipleValueEditor extends AbstractListEditor implements Selection
*/
@Override
public void widgetDefaultSelected(SelectionEvent e) {
- if (e.widget == tree && edit.isEnabled()) {
+ if ((e.widget == tree) && (edit != null) && edit.isEnabled()) {
editAction();
}
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingLabelProvider.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingLabelProvider.java
index 16d174f58c2..cdfdef64464 100644
--- a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingLabelProvider.java
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingLabelProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,11 +8,15 @@
*
* Contributors:
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.widgets.providers;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
+import org.eclipse.jface.viewers.LabelProvider;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
import org.eclipse.swt.graphics.Image;
/**
@@ -20,14 +24,17 @@ import org.eclipse.swt.graphics.Image;
* possibility of overriding certain labels.
*/
public class DelegatingLabelProvider
- implements ILabelProvider {
+ extends LabelProvider {
private final ILabelProvider delegate;
+ private ILabelProviderListener forwardingListener;
public DelegatingLabelProvider(ILabelProvider delegate) {
super();
this.delegate = delegate;
+
+ delegate.addListener(getForwardingListener());
}
@Override
@@ -98,7 +105,21 @@ public class DelegatingLabelProvider
*/
@Override
public void dispose() {
+ delegate.removeListener(getForwardingListener());
delegate.dispose();
}
+ private ILabelProviderListener getForwardingListener() {
+ if (forwardingListener == null) {
+ forwardingListener = new ILabelProviderListener() {
+
+ @Override
+ public void labelProviderChanged(LabelProviderChangedEvent event) {
+ fireLabelProviderChanged(new LabelProviderChangedEvent(DelegatingLabelProvider.this, event.getElements()));
+ }
+ };
+ }
+
+ return forwardingListener;
+ }
}
diff --git a/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingStyledLabelProvider.java b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingStyledLabelProvider.java
new file mode 100644
index 00000000000..b08a0ac5b89
--- /dev/null
+++ b/plugins/infra/widget/org.eclipse.papyrus.infra.widgets/src/org/eclipse/papyrus/infra/widgets/providers/DelegatingStyledLabelProvider.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.widgets.providers;
+
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.StyledString;
+
+/**
+ * A styled label provider that delegates to another styled label provider with the option to override certain labels.
+ */
+public class DelegatingStyledLabelProvider extends DelegatingLabelProvider implements IStyledLabelProvider {
+
+ private final IStyledLabelProvider delegate;
+
+ public DelegatingStyledLabelProvider(ILabelProvider delegate) {
+ super(delegate);
+
+ if (!(delegate instanceof IStyledLabelProvider)) {
+ throw new IllegalArgumentException("delegate is not a styled label provider"); //$NON-NLS-1$
+ }
+
+ this.delegate = (IStyledLabelProvider) delegate;
+ }
+
+ @Override
+ public StyledString getStyledText(Object element) {
+ StyledString result = customGetStyledText(element);
+ if (result == null) {
+ result = delegatedGetStyledText(element);
+ }
+ return result;
+ }
+
+ /**
+ * Override in subclasses to return custom styled text to override the delegate.
+ * The default implementation simply returns {@code null}.
+ *
+ * @param element
+ * an element for which to provide styled text
+ * @return the custom styled text, or {@code null} to delegate
+ */
+ protected StyledString customGetStyledText(Object element) {
+ return null;
+ }
+
+ protected final StyledString delegatedGetStyledText(Object element) {
+ return delegate.getStyledText(element);
+ }
+}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.classpath b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.classpath
index ad32c83a788..ad32c83a788 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.classpath
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.classpath
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.project b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.project
index f90bdf8616c..3e210335afd 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.project
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.uml.profile.externalresource.tests</name>
+ <name>org.eclipse.papyrus.uml.decoratormodel.controlmode</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..94d61f00da6
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..daf0b902c2c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.decoratormodel.controlmode;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;bundle-version="2.10.0";visibility:=reexport,
+ org.eclipse.uml2.types;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;visibility:=reexport,
+ org.eclipse.uml2.common;visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
+ org.eclipse.papyrus.uml.decoratormodel;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.1.0",
+ org.eclipse.ui;bundle-version="3.107.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.decoratormodel.internal.controlmode;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;x-internal:=true
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/about.html b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/about.html
index d35d5aed64c..d35d5aed64c 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/about.html
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/about.html
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/build.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/build.properties
index 4b957fe857b..ec9cbd2972b 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/build.properties
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/build.properties
@@ -4,4 +4,6 @@ bin.includes = META-INF/,\
.,\
about.html,\
documentation.pdoc,\
- plugin.xml
+ plugin.xml,\
+ plugin.properties
+src.includes = about.html
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/documentation.pdoc b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/documentation.pdoc
new file mode 100644
index 00000000000..9c2acff120a
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/documentation.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="Control-mode participants for management of externalized profile applications.">
+ <referent firstName="Christian" lastName="Damus" eMail="give.a.damus@gmail.com" currentCompany="independent"/>
+</doc:Documentation>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.properties
new file mode 100644
index 00000000000..a1a12f40362
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.properties
@@ -0,0 +1,12 @@
+# Copyright (c) 2014 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+
+pluginName = Papyrus Decorator Models Control Mode Extensions
+providerName = Eclipse Modeling Project
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.xml
new file mode 100644
index 00000000000..d30b4fae382
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/plugin.xml
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.papyrus.infra.services.controlmode.participant">
+ <participant
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.DecoratorModelControlModeParticipant">
+ </participant>
+ </extension>
+
+</plugin>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/pom.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/pom.xml
new file mode 100644
index 00000000000..666d54e42e5
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel.controlmode</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/Activator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/Activator.java
new file mode 100644
index 00000000000..f5898c8bdc0
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/Activator.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode;
+
+import java.util.concurrent.ExecutorService;
+
+import org.eclipse.core.runtime.Plugin;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.tools.util.UIUtil;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends Plugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.decoratormodel.controlmode"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /** logger helper */
+ public static LogHelper log;
+
+ private ExecutorService executorService;
+
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+
+ executorService = UIUtil.createUIExecutor(Display.getDefault());
+
+ plugin = this;
+ log = new LogHelper(this);
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ executorService.shutdown();
+ executorService = null;
+
+ plugin = null;
+ log = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ IWorkbenchWindow result = null;
+
+ IWorkbench bench = PlatformUI.getWorkbench();
+ if (bench != null) {
+ result = bench.getActiveWorkbenchWindow();
+ if (result == null) {
+ IWorkbenchWindow[] allWindows = bench.getWorkbenchWindows();
+ if (allWindows.length > 0) {
+ result = allWindows[0];
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public ExecutorService getExecutorService() {
+ return executorService;
+ }
+
+ /**
+ * Changes my executor service for asynchronous processing in control-mode refactorings.
+ *
+ * @param executorService
+ * the new executor service. Must not be {@code null}
+ *
+ * @return the formerly installed executor service (please restore it when you have finished with yours)
+ *
+ * @throws IllegalArgumentException
+ * if {@code executorService} is {@code null}
+ */
+ public ExecutorService setExecutorService(ExecutorService executorService) {
+ if (executorService == null) {
+ throw new IllegalArgumentException("null executorService"); //$NON-NLS-1$
+ }
+
+ ExecutorService result = this.executorService;
+ this.executorService = executorService;
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/DecoratorModelControlModeParticipant.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/DecoratorModelControlModeParticipant.java
new file mode 100644
index 00000000000..53a0c916d56
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/DecoratorModelControlModeParticipant.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode;
+
+import static org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext.getPackagesBeingControlled;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand;
+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.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands.ConfirmSaveCommand;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands.DecoratorModelRefactoringCommandFactory;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Control-mode participant for handling dependent decorator models that apply profiles to the
+ * package(s) being controlled in new resource(s).
+ */
+public class DecoratorModelControlModeParticipant implements IControlCommandParticipant, IUncontrolCommandParticipant {
+ static final String PARTICIPANT_ID = Activator.PLUGIN_ID + ".participant"; //$NON-NLS-1$
+
+ public DecoratorModelControlModeParticipant() {
+ super();
+ }
+
+ @Override
+ public String getID() {
+ return PARTICIPANT_ID;
+ }
+
+ @Override
+ public int getPriority() {
+ // We really want this to be the last participant to run, both in control and uncontrol cases
+ return -100;
+ }
+
+ @Override
+ public boolean provideControlCommand(ControlModeRequest request) {
+ return hasExternalProfileApplications(request, true);
+ }
+
+ @Override
+ public ICommand getPreControlCommand(ControlModeRequest request) {
+ // Refactoring is done as a post-process
+ ICommand result = null;
+
+ if (request.isUIAction() && hasExternalProfileApplications(request, false)) {
+ // Refactoring will require save, so prompt the user
+ result = new ConfirmSaveCommand(Activator.getActiveWorkbenchWindow().getShell());
+ }
+
+ try {
+ result = CompositeCommand.compose(result, DecoratorModelRefactoringCommandFactory.createPreCommand(request));
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ result = new UnexecutableCommand(e.getStatus());
+ }
+
+ return result;
+ }
+
+ @Override
+ public ICommand getPostControlCommand(ControlModeRequest request) {
+ try {
+ return DecoratorModelRefactoringCommandFactory.createPostCommand(request);
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ return new UnexecutableCommand(e.getStatus());
+ }
+ }
+
+ @Override
+ public boolean provideUnControlCommand(ControlModeRequest request) {
+ return hasExternalProfileApplications(request, true);
+ }
+
+ @Override
+ public ICommand getPreUncontrolCommand(ControlModeRequest request) {
+ // Refactoring is done as a post-process
+ ICommand result = null;
+
+ if (request.isUIAction() && hasExternalProfileApplications(request, false)) {
+ // Refactoring will require save, so prompt the user
+ result = new ConfirmSaveCommand(Activator.getActiveWorkbenchWindow().getShell());
+ }
+
+ try {
+ result = CompositeCommand.compose(result, DecoratorModelRefactoringCommandFactory.createPreCommand(request));
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ result = new UnexecutableCommand(e.getStatus());
+ }
+
+ return result;
+ }
+
+ @Override
+ public ICommand getPostUncontrolCommand(ControlModeRequest request) {
+ try {
+ return DecoratorModelRefactoringCommandFactory.createPostCommand(request);
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ return new UnexecutableCommand(e.getStatus());
+ }
+ }
+
+ protected boolean hasExternalProfileApplications(ControlModeRequest request, boolean includeLoaded) {
+ boolean result = false;
+
+ for (Package next : getPackagesBeingControlled(request.getTargetObject())) {
+ try {
+ result = !DecoratorModelUtils.getAllDecoratorModelAppliedProfileDefinitions(next, includeLoaded, true).isEmpty();
+ } catch (CoreException e) {
+ // Assume that some refactoring is needed (the commands may later fail or, hopefully,
+ // find nothing to do)
+ result = true;
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+
+ if (result) {
+ break;
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/PackageRefactoringContext.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/PackageRefactoringContext.java
new file mode 100644
index 00000000000..2bd604621c9
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/PackageRefactoringContext.java
@@ -0,0 +1,265 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.papyrus.infra.emf.utils.EMFFunctions;
+import org.eclipse.papyrus.infra.emf.utils.EMFPredicates;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.infra.tools.util.ReferenceCounted;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.base.Functions;
+import com.google.common.collect.Collections2;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.MapMaker;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * Contextual information about the control/uncontrol refactoring of a package
+ * that informs the refactoring of dependent decorator models.
+ */
+public class PackageRefactoringContext extends ReferenceCounted<PackageRefactoringContext> {
+ private static Map<Package, PackageRefactoringContext> contexts = new MapMaker().weakKeys().weakValues().makeMap();
+
+ private final Package package_;
+ private final URI oldUserModelURI;
+ private final URI newUserModelURI;
+
+ private final TransactionalEditingDomain domain;
+ private final Set<Package> affectedPackages;
+ private final Set<ProfileApplication> preRefactoringProfileApplications;
+
+ // Map of profile URI to decorator-model URI to applied definition URI
+ private final Map<URI, Map<URI, URI>> allExternalAppliedProfiles;
+ // Just those that are inherited from the parent package
+ private final Map<URI, Map<URI, URI>> inheritedExternalAppliedProfiles;
+
+ private final Set<URI> affectedDecoratorModels;
+ private final Set<URI> affectedLoadedDecoratorModels;
+ private final Set<URI> affectedUnloadedDecoratorModels;
+
+ private Map<Object, Object> data;
+
+ private PackageRefactoringContext(Package package_, URI oldUserModelURI, URI newUserModelURI) {
+ super(Activator.getDefault().getExecutorService());
+
+ this.package_ = package_;
+ this.oldUserModelURI = oldUserModelURI;
+ this.newUserModelURI = newUserModelURI;
+
+ this.domain = TransactionUtil.getEditingDomain(package_);
+ this.affectedPackages = ImmutableSet.copyOf(getPackagesBeingControlled(package_));
+ this.preRefactoringProfileApplications = ImmutableSet.copyOf(package_.getProfileApplications());
+
+ // Find URIs of decorator models attached to these packages and all their ancestors because
+ // all of those profiles are applied to these packages, except for any that are loaded
+ // because their proxies will take care of themselves
+
+ Set<Package> allPackages = Sets.newHashSet(affectedPackages);
+ for (Package next : affectedPackages) {
+ allPackages.addAll(next.allOwningPackages());
+ }
+
+ Set<URI> decorators = Sets.newHashSet();
+ Map<URI, Map<URI, URI>> allExternal = null;
+ Map<URI, Map<URI, URI>> inheritedExternal = null;
+ try {
+ allExternal = DecoratorModelUtils.getAllDecoratorModelAppliedProfileDefinitions(package_);
+ if (package_.getNestingPackage() != null) {
+ inheritedExternal = DecoratorModelUtils.getAllDecoratorModelAppliedProfileDefinitions(package_.getNestingPackage());
+ }
+
+ for (Package next : allPackages) {
+ decorators.addAll(DecoratorModelIndex.getInstance().getDecoratorModelsForPackage(EcoreUtil.getURI(next)));
+ }
+ } catch (CoreException e) {
+ // TODO
+ Activator.getDefault().getLog().log(e.getStatus());
+ allExternal = Collections.emptyMap();
+ }
+
+ this.allExternalAppliedProfiles = (allExternal != null) ? allExternal : Collections.<URI, Map<URI, URI>> emptyMap();
+ this.inheritedExternalAppliedProfiles = (inheritedExternal != null) ? inheritedExternal : Collections.<URI, Map<URI, URI>> emptyMap();
+ this.affectedDecoratorModels = ImmutableSet.copyOf(decorators);
+
+ Set<URI> allLoaded = Sets.newHashSet(Iterables.transform(Iterables.filter(domain.getResourceSet().getResources(), EMFPredicates.isLoaded()), EMFFunctions.resourceURI()));
+ this.affectedLoadedDecoratorModels = ImmutableSet.copyOf(Sets.intersection(decorators, allLoaded));
+ decorators.removeAll(allLoaded);
+ this.affectedUnloadedDecoratorModels = ImmutableSet.copyOf(decorators);
+ }
+
+ static PackageRefactoringContext get(Package package_, ControlModeRequest request) {
+ PackageRefactoringContext result = contexts.get(package_);
+
+ if (result == null) {
+ result = new PackageRefactoringContext(package_, request.getSourceURI(), request.getNewURI());
+ contexts.put(package_, result);
+ }
+
+ return result;
+ }
+
+ static void remove(PackageRefactoringContext context) {
+ if (contexts.get(context.getPackage()) == context) {
+ contexts.remove(context.getPackage());
+ }
+ }
+
+ /**
+ * Obtains the current package refactoring context for the specified {@code request}, if any.
+ * <b>Note</b> that this method {@linkplain ReferenceCounted#retain() retains} the resulting context.
+ *
+ * @param request
+ * a request
+ * @return the retained context, or {@code null} if none
+ */
+ public static PackageRefactoringContext getInstance(ControlModeRequest request) {
+ return (request.getTargetObject() instanceof Package) ? get((Package) request.getTargetObject(), request).retain() : null;
+ }
+
+ @Override
+ protected void dispose() {
+ remove(this);
+ data = null;
+ }
+
+ public TransactionalEditingDomain getEditingDomain() {
+ return domain;
+ }
+
+ public Package getPackage() {
+ return package_;
+ }
+
+ public URI getOldUserModelURI() {
+ return oldUserModelURI;
+ }
+
+ public URI getNewUserModelURI() {
+ return newUserModelURI;
+ }
+
+ public Set<ProfileApplication> getPreRefactoringProfileApplications() {
+ return preRefactoringProfileApplications;
+ }
+
+ public Set<Profile> getPreRefactoringAppliedProfiles() {
+ return ImmutableSet.copyOf(Collections2.transform(getPreRefactoringProfileApplications(), //
+ EMFFunctions.getFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE, Profile.class)));
+ }
+
+ public Set<URI> getPreRefactoringAppliedProfileURIs() {
+ return ImmutableSet.copyOf(Collections2.transform(getPreRefactoringProfileApplications(), //
+ Functions.compose(EMFFunctions.objectURI(), EMFFunctions.getFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE, Profile.class))));
+ }
+
+ public Set<ProfileApplication> getPostRefactoringProfileApplications() {
+ return Sets.difference(Sets.newHashSet(package_.getProfileApplications()), preRefactoringProfileApplications);
+ }
+
+ public Set<Profile> getPostRefactoringAppliedProfiles() {
+ return ImmutableSet.copyOf(Collections2.transform(getPostRefactoringProfileApplications(), //
+ EMFFunctions.getFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE, Profile.class)));
+ }
+
+ public Set<URI> getPostRefactoringAppliedProfileURIs() {
+ return ImmutableSet.copyOf(Collections2.transform(getPostRefactoringProfileApplications(), //
+ Functions.compose(EMFFunctions.objectURI(), EMFFunctions.getFeature(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE, Profile.class))));
+ }
+
+ public Set<Package> getAffectedPackages() {
+ return affectedPackages;
+ }
+
+ public Map<URI, Map<URI, URI>> getAllExternalProfileApplications() {
+ return allExternalAppliedProfiles;
+ }
+
+ public Map<URI, Map<URI, URI>> getInheritedExternalProfileApplications() {
+ return inheritedExternalAppliedProfiles;
+ }
+
+ public Set<URI> getAffectedDecoratorModels() {
+ return affectedDecoratorModels;
+ }
+
+ public Set<URI> getAffectedLoadedDecoratorModels() {
+ return affectedLoadedDecoratorModels;
+ }
+
+ public Set<URI> getAffectedUnloadedDecoratorModels() {
+ return affectedUnloadedDecoratorModels;
+ }
+
+ public Map<URI, URI> getAllExternalProfileApplicationsFor(URI decoratorModelURI) {
+ return getExternalProfileApplicationsFor(decoratorModelURI, getAllExternalProfileApplications());
+ }
+
+ public Map<URI, URI> getInheritedExternalProfileApplicationsFor(URI decoratorModelURI) {
+ return getExternalProfileApplicationsFor(decoratorModelURI, getInheritedExternalProfileApplications());
+ }
+
+ private Map<URI, URI> getExternalProfileApplicationsFor(URI decoratorModelURI, Map<URI, Map<URI, URI>> source) {
+ ImmutableMap.Builder<URI, URI> result = ImmutableMap.builder();
+
+ for (Map.Entry<URI, Map<URI, URI>> next : source.entrySet()) {
+ URI definition = next.getValue().get(decoratorModelURI);
+ if (definition != null) {
+ result.put(next.getKey(), definition);
+ }
+ }
+
+ return result.build();
+ }
+
+ public static Iterable<Package> getPackagesBeingControlled(final EObject object) {
+ return new Iterable<Package>() {
+
+ @Override
+ public Iterator<Package> iterator() {
+ // The "proper contents" includes containment proxies until such time as they are resolved.
+ // So, filter them out
+ Iterator<EObject> properContents = EcoreUtil.getAllProperContents(Collections.singletonList(object), false);
+ return Iterators.filter(Iterators.filter(properContents, Package.class), EMFPredicates.notProxy());
+ }
+ };
+ }
+
+ public Map<Object, Object> getContextData() {
+ if (data == null) {
+ data = Maps.newHashMap();
+ }
+ return data;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/AbstractDecoratorModelRefactoringCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/AbstractDecoratorModelRefactoringCommand.java
new file mode 100644
index 00000000000..f30d33c225e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/AbstractDecoratorModelRefactoringCommand.java
@@ -0,0 +1,142 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.IRefactoringStep;
+
+import com.google.common.collect.Lists;
+
+/**
+ * Common implementation of the commands that refactor loaded and unloaded dependent decorator models for the changes
+ * in the URIs of the base elements of stereotype applications and adding/removing profile applications for
+ * stand-along usage of the user-model controlled units.
+ */
+abstract class AbstractDecoratorModelRefactoringCommand extends AbstractCommand {
+
+ private final List<IRefactoringStep> steps = Lists.newArrayListWithExpectedSize(2);
+
+ private final DirectionConstraint direction;
+
+ private final URI decoratorModelURI;
+
+ protected AbstractDecoratorModelRefactoringCommand(PackageRefactoringContext context, URI decoratorModelURI) {
+ this(context, decoratorModelURI, DirectionConstraint.ALL);
+ }
+
+ protected AbstractDecoratorModelRefactoringCommand(PackageRefactoringContext context, URI decoratorModelURI, DirectionConstraint direction) {
+ super(NLS.bind("Refactor profile application {0}", decoratorModelURI), getIFiles(decoratorModelURI));
+
+ this.direction = direction;
+ this.decoratorModelURI = decoratorModelURI;
+ }
+
+ public AbstractDecoratorModelRefactoringCommand addStep(IRefactoringStep step) {
+ steps.add(step);
+ return this;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ SubMonitor sub = SubMonitor.convert(monitor, steps.size());
+
+ if (!direction.canRefactor()) {
+ sub.done();
+ } else {
+ ResourceSet rset = getResourceSet();
+ try {
+ Resource resource = getResource(rset, decoratorModelURI);
+ if ((resource != null) && resource.isLoaded()) {
+ boolean changed = false;
+
+ // If the resource is not loaded, something didn't go right in the basic control step
+ for (ListIterator<IRefactoringStep> iter = steps.listIterator(); iter.hasNext();) {
+ changed = iter.next().refactor(resource, sub.newChild(1)) || changed;
+ }
+
+ resourceRefactored(resource, changed);
+ }
+ } finally {
+ disposeResourceSet(rset);
+ sub.done();
+ }
+ }
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ protected abstract ResourceSet getResourceSet();
+
+ protected abstract Resource getResource(ResourceSet resourceSet, URI decoratorModelURI);
+
+ protected abstract void resourceRefactored(Resource resource, boolean changed) throws ExecutionException;
+
+ protected abstract void disposeResourceSet(ResourceSet resourceSet);
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ SubMonitor sub = SubMonitor.convert(monitor, steps.size());
+
+ if (!direction.canUnrefactor()) {
+ sub.done();
+ } else {
+ ResourceSet rset = getResourceSet();
+ try {
+ Resource resource = getResource(rset, decoratorModelURI);
+ if ((resource != null) && resource.isLoaded()) {
+ boolean changed = false;
+
+ // If the resource is not loaded, something didn't go right in the basic control step
+ for (ListIterator<IRefactoringStep> iter = steps.listIterator(steps.size()); iter.hasPrevious();) {
+ changed = iter.previous().unrefactor(resource, sub.newChild(1)) || changed;
+ }
+
+ resourceRefactored(resource, changed);
+ }
+ } finally {
+ disposeResourceSet(rset);
+ sub.done();
+ }
+ }
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ return doExecuteWithResult(monitor, info);
+ }
+
+ private static List<IFile> getIFiles(URI decoratorModel) {
+ return Collections.singletonList(ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(decoratorModel.toPlatformString(true))));
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/ConfirmSaveCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/ConfirmSaveCommand.java
new file mode 100644
index 00000000000..60aab97daa2
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/ConfirmSaveCommand.java
@@ -0,0 +1,57 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * A command that prompts the user to confirm the need to save and fails with cancel status if the user elects not to proceed.
+ */
+public class ConfirmSaveCommand extends AbstractCommand {
+ private Shell parentShell;
+
+ public ConfirmSaveCommand(Shell parentShell) {
+ super("Confirm Model Save");
+
+ this.parentShell = parentShell;
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ if (MessageDialog.openQuestion(parentShell, "Save Model", "This operation requires refactoring of profile applications that are not loaded. The model must be saved in order to ensure consistency of stereotype applications.\n\nProceed?")) {
+ return CommandResult.newOKCommandResult();
+ } else {
+ return CommandResult.newCancelledCommandResult();
+ }
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // User already confirmed execution; that is sufficient
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // User already confirmed execution; that is sufficient
+ return CommandResult.newOKCommandResult();
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DecoratorModelRefactoringCommandFactory.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DecoratorModelRefactoringCommandFactory.java
new file mode 100644
index 00000000000..1c2bb29624c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DecoratorModelRefactoringCommandFactory.java
@@ -0,0 +1,235 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.AbstractDecoratorModelUpdater;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.CrossReferenceUpdater;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.LoadedDecoratorModelUpdaterDelegate;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.PostControlDecoratorModelUpdater;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.PostUncontrolDecoratorModelUpdater;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters.UnloadedDecoratorModelUpdaterDelegate;
+
+/**
+ * @author damus
+ *
+ */
+public class DecoratorModelRefactoringCommandFactory {
+ private DecoratorModelRefactoringCommandFactory() {
+ super();
+ }
+
+ public static ICommand createPreCommand(ControlModeRequest request) throws CoreException {
+ PackageRefactoringContext context = PackageRefactoringContext.getInstance(request);
+ if (context == null) {
+ return null;
+ }
+
+ boolean needsSave = false;
+ CompositeTransactionalCommand result = new CompositeTransactionalCommand(context.getEditingDomain(), "Refactor Profile Application Models");
+
+ // Gather up all the loaded decorator models and create a command for each
+ for (URI decoratorModel : context.getAffectedLoadedDecoratorModels()) {
+ ICommand refactoringCommand = request.isControlRequest() ?
+ createPreControlLoaded(context, decoratorModel) :
+ createPreUncontrolLoaded(context, decoratorModel);
+ if (refactoringCommand != null) {
+ result.add(refactoringCommand);
+ }
+ }
+
+ // Gather up all the unloaded decorator models and create a command for each
+ for (URI decoratorModel : context.getAffectedUnloadedDecoratorModels()) {
+ ICommand refactoringCommand = request.isControlRequest() ?
+ createPreControlUnloaded(context, decoratorModel) :
+ createPreUncontrolUnloaded(context, decoratorModel);
+ if (refactoringCommand != null) {
+ result.add(refactoringCommand);
+ needsSave = true;
+ }
+ }
+
+ if (result.isEmpty()) {
+ // Didn't need any command after all. Fine
+ result = null;
+ } else if (needsSave) {
+ // Must save the model to ensure that the refactoring of unloaded resources is consistent
+ result.add(new SaveModelCommand(context));
+ }
+
+ context.autoRelease();
+
+ return result;
+ }
+
+ private static RefactoringStepStore getStore(PackageRefactoringContext context, URI decoratorModel) {
+ RefactoringStepStore result = (RefactoringStepStore) context.getContextData().get(decoratorModel);
+ if (result == null) {
+ result = new RefactoringStepStore();
+ context.getContextData().put(decoratorModel, result);
+ }
+ return result;
+ }
+
+ static CrossReferenceUpdater getCrossReferenceUpdater(PackageRefactoringContext context, URI decoratorModel) {
+ RefactoringStepStore store = getStore(context, decoratorModel);
+ if (store.crossReferences == null) {
+ store.crossReferences = new CrossReferenceUpdater(context, decoratorModel);
+ }
+ return store.crossReferences;
+ }
+
+ static AbstractDecoratorModelUpdater getProfileApplicationsUpdater(PackageRefactoringContext context, URI decoratorModel) {
+ RefactoringStepStore store = getStore(context, decoratorModel);
+ return store.profileApplications;
+ }
+
+ static void setProfileApplicationsUpdater(PackageRefactoringContext context, URI decoratorModel, AbstractDecoratorModelUpdater updater) {
+ RefactoringStepStore store = getStore(context, decoratorModel);
+ store.profileApplications = updater;
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPreControlLoaded(PackageRefactoringContext context, URI decoratorModel) {
+ return null;
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPreControlUnloaded(PackageRefactoringContext context, URI decoratorModel) {
+ // We need to undo an control refactoring *after* doing the base refactoring, which means that
+ // we must be a pre-refactoring participant for that purpose
+ CrossReferenceUpdater crossReferenceUpdater = getCrossReferenceUpdater(context, decoratorModel);
+ AbstractDecoratorModelUpdater profileApplicationUpdater = getProfileApplicationsUpdater(context, decoratorModel);
+ if (profileApplicationUpdater == null) {
+ profileApplicationUpdater = new PostControlDecoratorModelUpdater(new UnloadedDecoratorModelUpdaterDelegate(context.getPackage()), context, decoratorModel);
+ setProfileApplicationsUpdater(context, decoratorModel, profileApplicationUpdater);
+ }
+ // Steps in reverse order relative to the execute/redo direction!
+ return new UnloadedDecoratorModelRefactoringCommand(context, decoratorModel, DirectionConstraint.UNREFACTOR_ONLY).addStep(profileApplicationUpdater).addStep(crossReferenceUpdater);
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPreUncontrolLoaded(PackageRefactoringContext context, URI decoratorModel) {
+ return null;
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPreUncontrolUnloaded(PackageRefactoringContext context, URI decoratorModel) {
+ // We need to undo an uncontrol refactoring *after* undoing the base refactoring, which means that
+ // we must actually be a pre-refactoring participant for that purpose
+ CrossReferenceUpdater crossReferenceUpdater = getCrossReferenceUpdater(context, decoratorModel);
+ AbstractDecoratorModelUpdater profileApplicationUpdater = getProfileApplicationsUpdater(context, decoratorModel);
+ if (profileApplicationUpdater == null) {
+ profileApplicationUpdater = new PostUncontrolDecoratorModelUpdater(new UnloadedDecoratorModelUpdaterDelegate(context.getPackage()), context, decoratorModel);
+ setProfileApplicationsUpdater(context, decoratorModel, profileApplicationUpdater);
+ }
+ // Steps in reverse order relative to the execute/redo direction!
+ return new UnloadedDecoratorModelRefactoringCommand(context, decoratorModel, DirectionConstraint.UNREFACTOR_ONLY).addStep(profileApplicationUpdater).addStep(crossReferenceUpdater);
+ }
+
+ public static ICommand createPostCommand(ControlModeRequest request) throws CoreException {
+ PackageRefactoringContext context = PackageRefactoringContext.getInstance(request);
+ if (context == null) {
+ return null;
+ }
+
+ boolean needsSave = false;
+ CompositeTransactionalCommand result = new CompositeTransactionalCommand(context.getEditingDomain(), "Refactor Profile Application Models");
+
+ // Gather up all the loaded decorator models and create a command for each
+ for (URI decoratorModel : context.getAffectedLoadedDecoratorModels()) {
+ ICommand refactoringCommand = request.isControlRequest() ?
+ createPostControlLoaded(context, decoratorModel) :
+ createPostUncontrolLoaded(context, decoratorModel);
+ if (refactoringCommand != null) {
+ result.add(refactoringCommand);
+ }
+ }
+
+ // Gather up all the unloaded decorator models and create a command for each
+ for (URI decoratorModel : context.getAffectedUnloadedDecoratorModels()) {
+ ICommand refactoringCommand = request.isControlRequest() ?
+ createPostControlUnloaded(context, decoratorModel) :
+ createPostUncontrolUnloaded(context, decoratorModel);
+ if (refactoringCommand != null) {
+ result.add(refactoringCommand);
+ needsSave = true;
+ }
+ }
+
+ if (result.isEmpty()) {
+ // Didn't need any command after all. Fine
+ result = null;
+ } else if (needsSave) {
+ // Must save the model to ensure that the refactoring of unloaded resources is consistent
+ result.add(new SaveModelCommand(context));
+ }
+
+ context.autoRelease();
+
+ return result;
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPostControlLoaded(PackageRefactoringContext context, URI decoratorModel) {
+ AbstractDecoratorModelUpdater profileApplicationUpdater = getProfileApplicationsUpdater(context, decoratorModel);
+ if (profileApplicationUpdater == null) {
+ profileApplicationUpdater = new PostControlDecoratorModelUpdater(new LoadedDecoratorModelUpdaterDelegate(context.getPackage()), context, decoratorModel);
+ setProfileApplicationsUpdater(context, decoratorModel, profileApplicationUpdater);
+ }
+ return new LoadedDecoratorModelRefactoringCommand(context, decoratorModel).addStep(profileApplicationUpdater);
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPostControlUnloaded(PackageRefactoringContext context, URI decoratorModel) {
+ // We need to execute/redo an control refactoring *after* doing the base refactoring, which means that
+ // we must be a post-refactoring participant for that purpose
+ CrossReferenceUpdater crossReferenceUpdater = getCrossReferenceUpdater(context, decoratorModel);
+ AbstractDecoratorModelUpdater profileApplicationUpdater = getProfileApplicationsUpdater(context, decoratorModel);
+ if (profileApplicationUpdater == null) {
+ profileApplicationUpdater = new PostControlDecoratorModelUpdater(new UnloadedDecoratorModelUpdaterDelegate(context.getPackage()), context, decoratorModel);
+ setProfileApplicationsUpdater(context, decoratorModel, profileApplicationUpdater);
+ }
+ return new UnloadedDecoratorModelRefactoringCommand(context, decoratorModel, DirectionConstraint.REFACTOR_ONLY).addStep(crossReferenceUpdater).addStep(profileApplicationUpdater);
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPostUncontrolLoaded(PackageRefactoringContext context, URI decoratorModel) {
+ AbstractDecoratorModelUpdater profileApplicationUpdater = getProfileApplicationsUpdater(context, decoratorModel);
+ if (profileApplicationUpdater == null) {
+ profileApplicationUpdater = new PostUncontrolDecoratorModelUpdater(new LoadedDecoratorModelUpdaterDelegate(context.getPackage()), context, decoratorModel);
+ setProfileApplicationsUpdater(context, decoratorModel, profileApplicationUpdater);
+ }
+ return new LoadedDecoratorModelRefactoringCommand(context, decoratorModel).addStep(profileApplicationUpdater);
+ }
+
+ static AbstractDecoratorModelRefactoringCommand createPostUncontrolUnloaded(PackageRefactoringContext context, URI decoratorModel) {
+ // We need to execute/redo an uncontrol refactoring *after* doing the base refactoring, which means that
+ // we must be a post-refactoring participant for that purpose
+ CrossReferenceUpdater crossReferenceUpdater = getCrossReferenceUpdater(context, decoratorModel);
+ AbstractDecoratorModelUpdater profileApplicationUpdater = getProfileApplicationsUpdater(context, decoratorModel);
+ if (profileApplicationUpdater == null) {
+ profileApplicationUpdater = new PostUncontrolDecoratorModelUpdater(new UnloadedDecoratorModelUpdaterDelegate(context.getPackage()), context, decoratorModel);
+ setProfileApplicationsUpdater(context, decoratorModel, profileApplicationUpdater);
+ }
+ return new UnloadedDecoratorModelRefactoringCommand(context, decoratorModel, DirectionConstraint.REFACTOR_ONLY).addStep(crossReferenceUpdater).addStep(profileApplicationUpdater);
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class RefactoringStepStore {
+ CrossReferenceUpdater crossReferences;
+ AbstractDecoratorModelUpdater profileApplications;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DirectionConstraint.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DirectionConstraint.java
new file mode 100644
index 00000000000..3591acd9f71
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/DirectionConstraint.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+/**
+ * An enumeration of constraints on the direction in which a command will run.
+ * This allows a pair of commands to run, on in the pre position and one in post,
+ * that share refactoring steps such that one runs the forward refactoring in the
+ * post position and the other the reverse refactoring in the pre position.
+ */
+public enum DirectionConstraint {
+ ALL, REFACTOR_ONLY, UNREFACTOR_ONLY;
+
+ public boolean canRefactor() {
+ return this != UNREFACTOR_ONLY;
+ }
+
+ public boolean canUnrefactor() {
+ return this != REFACTOR_ONLY;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/LoadedDecoratorModelRefactoringCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/LoadedDecoratorModelRefactoringCommand.java
new file mode 100644
index 00000000000..e10319a3144
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/LoadedDecoratorModelRefactoringCommand.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+
+/**
+ * Implementation of the commands that refactor <em>unloaded</em> dependent decorator models for the changes
+ * in the URIs of the base elements of stereotype applications.
+ */
+class LoadedDecoratorModelRefactoringCommand extends AbstractDecoratorModelRefactoringCommand {
+
+ private final TransactionalEditingDomain domain;
+
+ protected LoadedDecoratorModelRefactoringCommand(PackageRefactoringContext context, URI decoratorModelURI) {
+ super(context, decoratorModelURI);
+
+ this.domain = context.getEditingDomain();
+ }
+
+ @Override
+ protected ResourceSet getResourceSet() {
+ return domain.getResourceSet();
+ }
+
+ @Override
+ protected Resource getResource(ResourceSet resourceSet, URI decoratorModelURI) {
+ // The resource is expected to be loaded
+ return resourceSet.getResource(decoratorModelURI, false);
+ }
+
+ @Override
+ protected void disposeResourceSet(ResourceSet resourceSet) {
+ // The resource set is shared with the editor, so leave it alone
+ }
+
+ @Override
+ protected void resourceRefactored(Resource resource, boolean changed) {
+ // Don't save a loaded resource; the editor will do that if necessary
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/SaveModelCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/SaveModelCommand.java
new file mode 100644
index 00000000000..3d3b7c84486
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/SaveModelCommand.java
@@ -0,0 +1,147 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+
+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.core.runtime.NullProgressMonitor;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.gmf.runtime.common.core.command.AbstractCommand;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IEditorPart;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * A command that asynchronously saves the model editor after completion of the (un)control operation,
+ * if it completes normally.
+ */
+class SaveModelCommand extends AbstractCommand {
+ private final ModelSet modelSet;
+
+ private volatile boolean savePending;
+
+ SaveModelCommand(PackageRefactoringContext context) {
+ super("Save Model");
+
+ this.modelSet = (ModelSet) context.getEditingDomain().getResourceSet();
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ if (savePending) {
+ // We are being invoked to roll back the composite operation that failed in some later command,
+ // so cancel the pending async exec
+ savePending = false;
+ return CommandResult.newOKCommandResult();
+ }
+
+ // We now have a save operation pending (asynchronously)
+ savePending = true;
+
+ // Do this asynchronously because we need the current transaction to have finished first,
+ // otherwise the command-stack (and hence the editor) will be marked dirty when it commits.
+ // Moreover, because undo also needs to save and this is the last command in the composite,
+ // it will actually undo first, which would save then save first if synchronous
+ Activator.getDefault().getExecutorService().execute(new Runnable() {
+
+ @Override
+ public void run() {
+ if (!savePending) {
+ // The execute/undo/redo was rolled back, so don't go through with save.
+ return;
+ }
+ savePending = false;
+
+ try {
+ // Prefer to save the editor so that it doesn't spuriously prompt for reloading
+ // resources saved without its knowledge. Of course, there may not be an editor
+ IRunnableWithProgress save = new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ IEditorPart editor = findEditor(modelSet);
+ if (editor != null) {
+ save(editor);
+ } else {
+ modelSet.save(monitor);
+ }
+ } catch (IOException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ };
+
+ if (Display.getCurrent() != null) {
+ Activator.getActiveWorkbenchWindow().run(false, false, save);
+ } else {
+ save.run(new NullProgressMonitor());
+ }
+ } catch (InvocationTargetException e) {
+ IStatus status = new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Failed to save model. Refactorings may be applied inconsistently if the model is not saved.", e.getTargetException());
+ StatusManager.getManager().handle(status, StatusManager.LOG | StatusManager.SHOW);
+ } catch (InterruptedException e) {
+ IStatus status = new Status(IStatus.WARNING, Activator.PLUGIN_ID, "Model save was cancelled. Refactorings may be applied inconsistently if the model is not saved.", e);
+ StatusManager.getManager().handle(status, StatusManager.LOG | StatusManager.SHOW);
+ }
+ }
+ });
+
+ return CommandResult.newOKCommandResult();
+ }
+
+ @Override
+ protected CommandResult doUndoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // On Undo we also need to save changes to ensure consistency
+ return doExecuteWithResult(progressMonitor, info);
+ }
+
+ @Override
+ protected CommandResult doRedoWithResult(IProgressMonitor progressMonitor, IAdaptable info) throws ExecutionException {
+ // On Redo we also need to save changes to ensure consistency
+ return doExecuteWithResult(progressMonitor, info);
+ }
+
+ static IEditorPart findEditor(ModelSet modelSet) {
+ IEditorPart result = null;
+
+ try {
+ IMultiDiagramEditor editor = ServiceUtilsForResourceSet.getInstance().getService(IMultiDiagramEditor.class, modelSet);
+ if (editor instanceof IEditorPart) {
+ result = editor;
+ }
+ } catch (ServiceException e) {
+ // Obviously this isn't our editor if the service registry doesn't have an editor
+ }
+
+ return result;
+ }
+
+ static void save(IEditorPart editor) {
+ editor.getSite().getPage().saveEditor(editor, false);
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/UnloadedDecoratorModelRefactoringCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/UnloadedDecoratorModelRefactoringCommand.java
new file mode 100644
index 00000000000..fb86e3395e5
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/commands/UnloadedDecoratorModelRefactoringCommand.java
@@ -0,0 +1,67 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.commands;
+
+import java.io.IOException;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelResourceSet;
+import org.eclipse.papyrus.uml.decoratormodel.model.DecoratorModel;
+
+/**
+ * Implementation of the commands that refactor <em>unloaded</em> dependent decorator models for the changes
+ * in the URIs of the base elements of stereotype applications.
+ */
+class UnloadedDecoratorModelRefactoringCommand extends AbstractDecoratorModelRefactoringCommand {
+ protected UnloadedDecoratorModelRefactoringCommand(PackageRefactoringContext context, URI decoratorModelURI) {
+ super(context, decoratorModelURI);
+ }
+
+ protected UnloadedDecoratorModelRefactoringCommand(PackageRefactoringContext context, URI decoratorModelURI, DirectionConstraint direction) {
+ super(context, decoratorModelURI, direction);
+ }
+
+ @Override
+ protected ResourceSet getResourceSet() {
+ return new DecoratorModelResourceSet();
+ }
+
+ @Override
+ protected Resource getResource(ResourceSet resourceSet, URI decoratorModelURI) {
+ // Load the resource in our scratch resource set
+ return resourceSet.getResource(decoratorModelURI, true);
+ }
+
+ @Override
+ protected void disposeResourceSet(ResourceSet resourceSet) {
+ EMFHelper.unload(resourceSet);
+ }
+
+ @Override
+ protected void resourceRefactored(Resource resource, boolean changed) throws ExecutionException {
+ if (changed) {
+ try {
+ resource.save(new DecoratorModel().getSaveOptions());
+ } catch (IOException e) {
+ throw new ExecutionException("Failed to save refactoring changes", e);
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdater.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdater.java
new file mode 100644
index 00000000000..b2812529aae
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdater.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * Common implementation of profile application updaters for loaded and unloaded models.
+ */
+public abstract class AbstractDecoratorModelUpdater implements IRefactoringStep {
+ private final IDecoratorModelUpdaterDelegate delegate;
+
+ public AbstractDecoratorModelUpdater(IDecoratorModelUpdaterDelegate delegate) {
+ super();
+
+ this.delegate = delegate;
+ }
+
+ @Override
+ public abstract boolean refactor(Resource resource, IProgressMonitor monitor) throws ExecutionException;
+
+ @Override
+ public abstract boolean unrefactor(Resource resource, IProgressMonitor monitor) throws ExecutionException;
+
+ Package getDecoratorPackage(Resource resource) {
+ return delegate.getDecoratorPackage(resource);
+ }
+
+ Package createDecoratorPackage(Resource resource) {
+ return delegate.createDecoratorPackage(resource);
+ }
+
+ ProfileApplication getProfileApplication(Package package_, URI appliedProfileURI) {
+ return delegate.getProfileApplication(package_, appliedProfileURI);
+ }
+
+ boolean hasProfileApplication(Package package_, URI appliedProfileURI) {
+ return getProfileApplication(package_, appliedProfileURI) != null;
+ }
+
+ ProfileApplication addProfileApplication(Package package_, URI profileURI, URI appliedDefinitionURI) {
+ return delegate.addProfileApplication(package_, profileURI, appliedDefinitionURI);
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdaterDelegate.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdaterDelegate.java
new file mode 100644
index 00000000000..25bea67436e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/AbstractDecoratorModelUpdaterDelegate.java
@@ -0,0 +1,94 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * @author damus
+ *
+ */
+abstract class AbstractDecoratorModelUpdaterDelegate implements IDecoratorModelUpdaterDelegate {
+
+ private final Package package_;
+
+ public AbstractDecoratorModelUpdaterDelegate(Package package_) {
+ super();
+
+ this.package_ = package_;
+ }
+
+ protected final Package getControlledPackage() {
+ return package_;
+ }
+
+ @Override
+ public Package getDecoratorPackage(Resource resource) {
+ Package result = null;
+
+ URI packageURI = EcoreUtil.getURI(package_);
+ for (ApplyProfiles next : Iterables.filter(resource.getContents(), ApplyProfiles.class)) {
+ Dependency dep = next.getBase_Dependency();
+ if ((dep != null) && !dep.getClients().isEmpty()) {
+ if (EcoreUtil.getURI(dep.getClients().get(0)).equals(packageURI)) {
+ // that's the one
+ result = Iterables.getFirst(Iterables.filter(dep.getSuppliers(), Package.class), null);
+ if (result != null) {
+ break;
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Package createDecoratorPackage(Resource resource) {
+ Package result = null;
+
+ Package root = DecoratorModelUtils.getDecoratorModel(resource);
+ if (root != null) {
+ result = DecoratorModelUtils.getDecoratorPackage(root, package_, true);
+ }
+
+ return result;
+ }
+
+ @Override
+ public ProfileApplication getProfileApplication(Package package_, URI appliedProfileURI) {
+ ProfileApplication result = null;
+
+ for (ProfileApplication next : package_.getProfileApplications()) {
+ Profile profile = next.getAppliedProfile();
+ if ((profile != null) && EcoreUtil.getURI(profile).equals(appliedProfileURI)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/CrossReferenceUpdater.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/CrossReferenceUpdater.java
new file mode 100644
index 00000000000..4087889a665
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/CrossReferenceUpdater.java
@@ -0,0 +1,122 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import java.util.Iterator;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+
+import com.google.common.base.Predicate;
+import com.google.common.collect.Iterables;
+
+/**
+ * Implementation of the commands that refactor <em>unloaded</em> dependent decorator models for the changes
+ * in the URIs of the base elements of stereotype applications.
+ */
+public class CrossReferenceUpdater implements IRefactoringStep {
+
+ final TransactionalEditingDomain domain;
+ URI decoratorModelURI;
+ URI oldUserModelURI;
+ URI newUserModelURI;
+
+ public CrossReferenceUpdater(PackageRefactoringContext context, URI decoratorModelURI) {
+ super();
+
+ this.domain = context.getEditingDomain();
+ this.decoratorModelURI = decoratorModelURI;
+ this.oldUserModelURI = context.getOldUserModelURI();
+ this.newUserModelURI = context.getNewUserModelURI();
+ }
+
+ @Override
+ public boolean refactor(Resource resource, IProgressMonitor monitor) throws ExecutionException {
+ return refactor(resource, oldUserModelURI, newUserModelURI, monitor);
+ }
+
+ @Override
+ public boolean unrefactor(Resource resource, IProgressMonitor monitor) throws ExecutionException {
+ return refactor(resource, newUserModelURI, oldUserModelURI, monitor);
+ }
+
+ protected boolean refactor(Resource resource, URI oldURI, URI newURI, IProgressMonitor monitor) throws ExecutionException {
+ boolean result = false;
+ monitor.beginTask(NLS.bind("Updating cross-references in {0}", decoratorModelURI), IProgressMonitor.UNKNOWN);
+
+ // If the resource is not loaded, something didn't go right in the basic control step
+ Resource newUserModelResource = domain.getResourceSet().getResource(newURI, false);
+ if ((newUserModelResource != null) && newUserModelResource.isLoaded()) {
+ final Predicate<EReference> needsRefactoring = needsRefactoring();
+ for (Iterator<EObject> all = resource.getAllContents(); all.hasNext();) {
+ EObject next = all.next();
+ for (EReference ref : Iterables.filter(next.eClass().getEAllReferences(), needsRefactoring)) {
+ if (next.eIsSet(ref)) {
+ if (ref.isMany()) {
+ for (Object xref : (Iterable<?>) next.eGet(ref)) {
+ EObject eXRef = (EObject) xref;
+ if (eXRef.eIsProxy()) {
+ result = refactor(eXRef, oldURI, newURI, newUserModelResource) || result;
+ }
+ }
+ } else {
+ EObject eXRef = (EObject) next.eGet(ref);
+ if ((eXRef != null) && eXRef.eIsProxy()) {
+ result = refactor(eXRef, oldURI, newURI, newUserModelResource) || result;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ boolean refactor(EObject xref, URI oldURI, URI newURI, Resource newUserModelResource) {
+ boolean result = false;
+
+ InternalEObject proxy = (InternalEObject) xref;
+ URI proxyURI = proxy.eProxyURI();
+ if (proxyURI.trimFragment().equals(oldURI)) {
+ String fragment = proxyURI.fragment();
+ EObject target = newUserModelResource.getEObject(fragment);
+ if (target != null) {
+ // Proxy resolves to the new resource? Good. Rewrite it
+ proxy.eSetProxyURI(newURI.appendFragment(fragment));
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ static Predicate<EReference> needsRefactoring() {
+ return new Predicate<EReference>() {
+ @Override
+ public boolean apply(EReference input) {
+ return (input != null) && input.isChangeable() && !input.isDerived() && !input.isContainment() && !input.isContainer();
+ }
+ };
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IDecoratorModelUpdaterDelegate.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IDecoratorModelUpdaterDelegate.java
new file mode 100644
index 00000000000..ec51c7b2e61
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IDecoratorModelUpdaterDelegate.java
@@ -0,0 +1,35 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * @author damus
+ *
+ */
+public interface IDecoratorModelUpdaterDelegate {
+
+ Package getDecoratorPackage(Resource resource);
+
+ Package createDecoratorPackage(Resource resource);
+
+ ProfileApplication getProfileApplication(Package package_, URI appliedProfileURI);
+
+ ProfileApplication addProfileApplication(Package package_, URI profileURI, URI appliedDefinitionURI);
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IRefactoringStep.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IRefactoringStep.java
new file mode 100644
index 00000000000..7d9366005f7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/IRefactoringStep.java
@@ -0,0 +1,31 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.ecore.resource.Resource;
+
+
+
+/**
+ * Protocol of a step in a sequence of decorator-model resource refactoring steps.
+ */
+public interface IRefactoringStep {
+
+ boolean refactor(Resource resource, IProgressMonitor monitor) throws ExecutionException;
+
+ boolean unrefactor(Resource resource, IProgressMonitor monitor) throws ExecutionException;
+
+} \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/LoadedDecoratorModelUpdaterDelegate.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/LoadedDecoratorModelUpdaterDelegate.java
new file mode 100644
index 00000000000..c9e373d778e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/LoadedDecoratorModelUpdaterDelegate.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * @author damus
+ *
+ */
+public class LoadedDecoratorModelUpdaterDelegate extends AbstractDecoratorModelUpdaterDelegate {
+
+ public LoadedDecoratorModelUpdaterDelegate(Package package_) {
+ super(package_);
+ }
+
+ @Override
+ public ProfileApplication addProfileApplication(Package package_, URI profileURI, URI appliedDefinitionURI) {
+ ProfileApplication result = null;
+
+ // Get the corresponding loaded profile application of the controlled package
+ Profile profile = (Profile) EMFHelper.getResourceSet(getControlledPackage()).getEObject(profileURI, true);
+ ProfileApplication toCopy = getControlledPackage().getProfileApplication(profile, true);
+
+ if (toCopy != null) {
+ result = EcoreUtil.copy(toCopy);
+ package_.getProfileApplications().add(result);
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostControlDecoratorModelUpdater.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostControlDecoratorModelUpdater.java
new file mode 100644
index 00000000000..0f9ac0357f7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostControlDecoratorModelUpdater.java
@@ -0,0 +1,103 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.Sets;
+
+/**
+ * A post-control updater of the profile applications that are stored in a decorator model.
+ *
+ */
+public class PostControlDecoratorModelUpdater extends AbstractDecoratorModelUpdater {
+
+ // Mapping of profile URI to applied definition EPackage URI
+ private final Map<URI, URI> profilesToAdd;
+ private Set<URI> profilesAdded;
+
+ public PostControlDecoratorModelUpdater(IDecoratorModelUpdaterDelegate delegate, PackageRefactoringContext context, URI decoratorModelURI) {
+ super(delegate);
+
+ this.profilesToAdd = context.getAllExternalProfileApplicationsFor(decoratorModelURI);
+ }
+
+ @Override
+ public boolean refactor(Resource resource, IProgressMonitor monitor) throws ExecutionException {
+ boolean result = false;
+
+ monitor.beginTask(NLS.bind("Updating profile applications in {0}", resource.getURI().lastSegment()), IProgressMonitor.UNKNOWN);
+ if (!profilesToAdd.isEmpty()) {
+ Package evilTwin = getDecoratorPackage(resource);
+ if (evilTwin == null) {
+ evilTwin = createDecoratorPackage(resource);
+ result = true;
+ }
+
+ for (Map.Entry<URI, URI> next : profilesToAdd.entrySet()) {
+ URI profileURI = next.getKey();
+ if (!hasProfileApplication(evilTwin, profileURI)) {
+ addProfileApplication(evilTwin, profileURI, next.getValue());
+ result = true;
+
+ if (profilesAdded == null) {
+ profilesAdded = Sets.newHashSet();
+ }
+ profilesAdded.add(profileURI);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean unrefactor(Resource resource, IProgressMonitor monitor) throws ExecutionException {
+ boolean result = false;
+
+ monitor.beginTask(NLS.bind("Removing profile applications from {0}", resource.getURI().lastSegment()), IProgressMonitor.UNKNOWN);
+ if (profilesAdded != null) {
+ Package evilTwin = getDecoratorPackage(resource);
+ if (evilTwin != null) {
+ for (URI next : profilesAdded) {
+ ProfileApplication application = getProfileApplication(evilTwin, next);
+ if (application != null) {
+ application.destroy();
+ result = true;
+ }
+ }
+
+ if (evilTwin.getProfileApplications().isEmpty()) {
+ evilTwin.destroy();
+ result = true;
+ }
+ }
+
+ profilesAdded = null;
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostUncontrolDecoratorModelUpdater.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostUncontrolDecoratorModelUpdater.java
new file mode 100644
index 00000000000..4ab0a85b6ec
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/PostUncontrolDecoratorModelUpdater.java
@@ -0,0 +1,114 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import java.util.Map;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.PackageRefactoringContext;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.Maps;
+
+/**
+ * A post-uncontrol updater of the profile applications that are stored in a decorator model.
+ */
+public class PostUncontrolDecoratorModelUpdater extends AbstractDecoratorModelUpdater {
+
+ // Mapping of profile URI to applied definition EPackage URI
+ private final Map<URI, URI> profilesToRemove;
+ private Map<URI, URI> profilesRemoved;
+
+ public PostUncontrolDecoratorModelUpdater(IDecoratorModelUpdaterDelegate delegate, PackageRefactoringContext context, URI decoratorModelURI) {
+ super(delegate);
+
+ // Compute the profile applications that we no longer need because they are the same definition that is
+ // inherited from the parent package
+ ImmutableMap.Builder<URI, URI> extraneousProfiles = ImmutableMap.builder();
+ Map<URI, URI> inherited = context.getInheritedExternalProfileApplicationsFor(decoratorModelURI);
+ for (Map.Entry<URI, URI> all : context.getAllExternalProfileApplicationsFor(decoratorModelURI).entrySet()) {
+ if (all.getValue().equals(inherited.get(all.getKey()))) {
+ extraneousProfiles.put(all.getKey(), all.getValue());
+ }
+ }
+ this.profilesToRemove = extraneousProfiles.build();
+ }
+
+ @Override
+ public boolean refactor(Resource resource, IProgressMonitor monitor) throws ExecutionException {
+ boolean result = false;
+
+ monitor.beginTask(NLS.bind("Updating profile applications in {0}", resource.getURI().lastSegment()), IProgressMonitor.UNKNOWN);
+ if (!profilesToRemove.isEmpty()) {
+ Package evilTwin = getDecoratorPackage(resource);
+ if (evilTwin != null) {
+ for (Map.Entry<URI, URI> next : profilesToRemove.entrySet()) {
+ ProfileApplication application = getProfileApplication(evilTwin, next.getKey());
+ EPackage definition = (application == null) ? null : application.getAppliedDefinition();
+ if ((definition != null) && next.getValue().equals(EcoreUtil.getURI(definition))) {
+ application.destroy();
+ result = true;
+
+ if (profilesRemoved == null) {
+ profilesRemoved = Maps.newHashMap();
+ }
+ profilesRemoved.put(next.getKey(), next.getValue());
+ }
+ }
+
+ if (evilTwin.getProfileApplications().isEmpty()) {
+ // Remove it, too
+ evilTwin.destroy();
+ result = true;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean unrefactor(Resource resource, IProgressMonitor monitor) throws ExecutionException {
+ boolean result = false;
+
+ monitor.beginTask(NLS.bind("Restoring profile applications in {0}", resource.getURI().lastSegment()), IProgressMonitor.UNKNOWN);
+ if (profilesRemoved != null) {
+ Package evilTwin = getDecoratorPackage(resource);
+ if (evilTwin == null) {
+ evilTwin = createDecoratorPackage(resource);
+ result = true;
+ }
+
+ for (Map.Entry<URI, URI> next : profilesRemoved.entrySet()) {
+ if (!hasProfileApplication(evilTwin, next.getKey())) {
+ addProfileApplication(evilTwin, next.getKey(), next.getValue());
+ result = true;
+ }
+ }
+
+ profilesRemoved = null;
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/UnloadedDecoratorModelUpdaterDelegate.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/UnloadedDecoratorModelUpdaterDelegate.java
new file mode 100644
index 00000000000..9a69d2c7312
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode/src/org/eclipse/papyrus/uml/decoratormodel/internal/controlmode/updaters/UnloadedDecoratorModelUpdaterDelegate.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.updaters;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcoreFactory;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.util.UMLUtil;
+
+/**
+ * @author damus
+ *
+ */
+public class UnloadedDecoratorModelUpdaterDelegate extends AbstractDecoratorModelUpdaterDelegate {
+
+ public UnloadedDecoratorModelUpdaterDelegate(Package package_) {
+ super(package_);
+ }
+
+ @Override
+ public ProfileApplication addProfileApplication(Package package_, URI profileURI, URI appliedDefinitionURI) {
+ // Create a proxy for the profile
+ Profile profile = UMLFactory.eINSTANCE.createProfile();
+ ((InternalEObject) profile).eSetProxyURI(profileURI);
+ ProfileApplication result = package_.createProfileApplication();
+ result.setAppliedProfile(profile);
+
+ // and a proxy for the Ecore definition
+ EPackage definition = EcoreFactory.eINSTANCE.createEPackage();
+ ((InternalEObject) definition).eSetProxyURI(appliedDefinitionURI);
+ result.createEAnnotation(UMLUtil.UML2_UML_PACKAGE_2_0_NS_URI).getReferences().add(definition);
+
+ return result;
+ }
+
+}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.classpath b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.classpath
index 64c5e31b7a2..64c5e31b7a2 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.classpath
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.classpath
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.project b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.project
index bd86b07e265..ff3c7c0fd61 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.project
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.uml.profile.externalresource.properties</name>
+ <name>org.eclipse.papyrus.uml.decoratormodel.properties</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..c585cc455ae
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+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
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..c5182577e79
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/META-INF/MANIFEST.MF
@@ -0,0 +1,35 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %Bundle-Name
+Bundle-SymbolicName: org.eclipse.papyrus.uml.decoratormodel.properties;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-Activator: org.eclipse.papyrus.uml.decoratormodel.properties.Activator
+Bundle-Vendor: %Bundle-Vendor
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.views.properties;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="4.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.properties;bundle-version="1.1.0",
+ org.eclipse.core.databinding.observable;bundle-version="1.4.1",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.papyrus.views.properties.model;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
+ org.eclipse.emf.edit;bundle-version="2.10.0",
+ org.eclipse.emf.transaction;bundle-version="1.8.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.emf.databinding;bundle-version="1.3.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.decoratormodel;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.decoratormodel.ui;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.constraints;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.decoratormodel.internal.properties.constraints;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.properties,
+ org.eclipse.papyrus.uml.decoratormodel.properties.elements,
+ org.eclipse.papyrus.uml.decoratormodel.properties.widgets
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/OSGI-INF/l10n/bundle.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/OSGI-INF/l10n/bundle.properties
new file mode 100644
index 00000000000..645c6c42673
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/OSGI-INF/l10n/bundle.properties
@@ -0,0 +1,3 @@
+#Properties file for org.eclipse.papyrus.uml.decoratormodel.properties
+Bundle-Vendor = Eclipse Modeling Project
+Bundle-Name = Papyrus Decorator Model Property Sheets \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/about.html b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/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/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/build.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/build.properties
new file mode 100644
index 00000000000..b95c74127cb
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/build.properties
@@ -0,0 +1,11 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ resources/,\
+ OSGI-INF/,\
+ icons/,\
+ about.html,\
+ documentation.pdoc
+src.includes = about.html
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/documentation.pdoc b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/documentation.pdoc
new file mode 100644
index 00000000000..53d668be2bb
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/documentation.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="Property sheet customizations for management of separate profile applications.">
+ <referent firstName="Christian" lastName="Damus" eMail="give.a.damus@gmail.com" currentCompany="independent"/>
+</doc:Documentation>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/dup_resource.png b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/dup_resource.png
new file mode 100644
index 00000000000..41efe451edb
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/dup_resource.png
Binary files differ
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/externalize.gif b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/externalize.gif
new file mode 100644
index 00000000000..5a0837d1e47
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/externalize.gif
Binary files differ
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/internalize.gif b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/internalize.gif
new file mode 100644
index 00000000000..d38085ad9c2
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/internalize.gif
Binary files differ
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/unload_resource.png b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/unload_resource.png
new file mode 100644
index 00000000000..9f025e2a8b3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/ctool16/unload_resource.png
Binary files differ
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/dtool16/load_resource.png b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/dtool16/load_resource.png
new file mode 100644
index 00000000000..905ebeee0a7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/dtool16/load_resource.png
Binary files differ
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/etool16/load_resource.png b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/etool16/load_resource.png
new file mode 100644
index 00000000000..4fd6673d06d
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/icons/full/etool16/load_resource.png
Binary files differ
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/plugin.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/plugin.xml
index c95214422da..c95214422da 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/plugin.xml
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/plugin.xml
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/pom.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/pom.xml
new file mode 100644
index 00000000000..855d83f8bff
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel.properties</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResource.ctx b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResource.ctx
new file mode 100644
index 00000000000..bf1638b2dae
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResource.ctx
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="UMLStereotypeApplicationExternalResource">
+ <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#/"/>
+ <tabs label="Profile" id="profile" category="org.eclipse.papyrus" priority="50">
+ <sections name="SinglePackageProfile" sectionFile="ui/SinglePackageProfile.xwt">
+ <widget href="ui/SinglePackageProfile.xwt#/"/>
+ </sections>
+ </tabs>
+ <tabs label="Applications" id="applications" category="org.eclipse.papyrus" priority="50">
+ <afterTab href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#//@tabs.1"/>
+ <sections name="SinglePackageDecoratorModels" sectionFile="ui/SinglePackageDecoratorModels.xwt">
+ <widget href="ui/SinglePackageDecoratorModels.xwt#/"/>
+ </sections>
+ </tabs>
+ <views name="SinglePackageProfile" sections="//@tabs.0/@sections.0" automaticContext="true">
+ <constraints xsi:type="constraints:SimpleConstraint" name="isSinglePackage" overrideable="false">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/>
+ <properties xsi:type="constraints:ValueProperty" name="umlClassName" value="Package"/>
+ </constraints>
+ </views>
+ <views name="SinglePackageDecoratorModels" sections="//@tabs.1/@sections.0">
+ <constraints xsi:type="constraints:SimpleConstraint" name="hasExternalizedProfileApplications">
+ <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi#//@constraintTypes.0"/>
+ </constraints>
+ </views>
+ <dataContexts name="PackageAdditions" label="Package Additions">
+ <elements name="Package">
+ <properties name="profileApplication" label="Profile Applications" type="Reference" description="References the ProfileApplications that indicate which profiles have been applied to the Package."/>
+ <properties name="externalProfileApplication" label="External Profile Applications" type="Reference" description="The models in the workspace that apply profiles to the package, loaded and unloaded."/>
+ </elements>
+ <modelElementFactory href="UMLStereotypeApplicationExternalResourceEnvironment.xmi#//@modelElementFactories.0"/>
+ </dataContexts>
+</contexts:Context>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi
new file mode 100644
index 00000000000..21eee0ec154
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="ASCII"?>
+<environment:Environment
+ xmi:version="2.0"
+ xmlns:xmi="http://www.omg.org/XMI"
+ xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
+ <constraintTypes
+ label="Has Externalized Profile Applications"
+ constraintClass="org.eclipse.papyrus.uml.decoratormodel.internal.properties.constraints.HasExternalizedProfileApplicationsConstraint"/>
+ <modelElementFactories
+ name="Package Factory"
+ factoryClass="org.eclipse.papyrus.uml.decoratormodel.properties.elements.PackageModelElementFactory"/>
+ <propertyEditorTypes
+ label="External Resource Profile Application Editor"
+ widgetClass="ProfileApplicationPropertyEditor"
+ namespace="//@namespaces.0"
+ type="Reference"
+ multiplicity="-1"/>
+ <propertyEditorTypes
+ label="Decorator Model Editor"
+ widgetClass="DecoratorModelPropertyEditor"
+ namespace="//@namespaces.0"
+ type="Reference"
+ multiplicity="-1"/>
+ <namespaces
+ name="umlprofileexternalresource"
+ value="org.eclipse.papyrus.uml.decoratormodel.properties.widgets"/>
+</environment:Environment>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageDecoratorModels.xwt b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageDecoratorModels.xwt
new file mode 100644
index 00000000000..3f0cc7bfcf3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageDecoratorModels.xwt
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:umlprofileexternalresource="clr-namespace:org.eclipse.papyrus.uml.decoratormodel.properties.widgets"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <umlprofileexternalresource:DecoratorModelPropertyEditor
+ input="{Binding}" property="PackageAdditions:externalProfileApplication"></umlprofileexternalresource:DecoratorModelPropertyEditor>
+</Composite> \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageProfile.xwt b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageProfile.xwt
new file mode 100644
index 00000000000..eb262a0531b
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/resources/ui/SinglePackageProfile.xwt
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Composite xmlns="http://www.eclipse.org/xwt/presentation"
+ xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
+ xmlns:x="http://www.eclipse.org/xwt" xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
+ xmlns:umlprofileexternalresource="clr-namespace:org.eclipse.papyrus.uml.decoratormodel.properties.widgets"
+ xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets">
+ <Composite.layout>
+ <ppel:PropertiesLayout></ppel:PropertiesLayout>
+ </Composite.layout>
+ <umlprofileexternalresource:ProfileApplicationPropertyEditor
+ input="{Binding}" property="PackageAdditions:profileApplication"></umlprofileexternalresource:ProfileApplicationPropertyEditor>
+</Composite> \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/constraints/HasExternalizedProfileApplicationsConstraint.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/constraints/HasExternalizedProfileApplicationsConstraint.java
new file mode 100644
index 00000000000..3f2e801dc0e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/constraints/HasExternalizedProfileApplicationsConstraint.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.properties.constraints;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.constraints.constraints.AbstractConstraint;
+import org.eclipse.papyrus.infra.constraints.constraints.Constraint;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.properties.Activator;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.SetMultimap;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * A properties constraint matching packages that have loaded or unloaded decorator models.
+ */
+public class HasExternalizedProfileApplicationsConstraint extends AbstractConstraint {
+
+ /**
+ * Initializes me.
+ */
+ public HasExternalizedProfileApplicationsConstraint() {
+ super();
+ }
+
+ @Override
+ protected boolean match(Object selection) {
+ boolean result = false;
+
+ EObject object = EMFHelper.getEObject(selection);
+
+ if (object instanceof Package) {
+ Package package_ = (Package) object;
+
+ try {
+ result = !Iterables.isEmpty(DecoratorModelUtils.getDecoratorModelProfileApplications(package_));
+ if (!result) {
+ ListenableFuture<SetMultimap<URI, URI>> appliedProfiles = DecoratorModelIndex.getInstance().getAllAppliedProfilesAsync(EcoreUtil.getURI(package_));
+
+ // Optimistic enablement for responsiveness
+ result = !appliedProfiles.isDone() || !Futures.get(appliedProfiles, CoreException.class).isEmpty();
+ }
+ } catch (CoreException e) {
+ // Oh, well. I guess we won't show this property
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ protected boolean equivalent(Constraint constraint) {
+ if (this == constraint) {
+ return true;
+ }
+ return constraint instanceof HasExternalizedProfileApplicationsConstraint;
+ }
+
+ @Override
+ public String toString() {
+ return "HasExternalizedProfileApplicationsConstraint"; //$NON-NLS-1$
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/Messages.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/Messages.java
new file mode 100644
index 00000000000..e339c7a5c7e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/Messages.java
@@ -0,0 +1,43 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.properties.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author damus
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.decoratormodel.internal.properties.messages.messages"; //$NON-NLS-1$
+ public static String DecoratorModelPropertyEditor_0;
+ public static String DecoratorModelPropertyEditor_1;
+ public static String DecoratorModelPropertyEditor_2;
+ public static String DecoratorModelPropertyEditor_3;
+ public static String DecoratorModelPropertyEditor_4;
+ public static String DecoratorModelPropertyEditor_5;
+ public static String DecoratorModelPropertyEditor_6;
+ public static String DecoratorModelPropertyEditor_7;
+ public static String DecoratorModelPropertyEditor_8;
+ public static String ProfileApplicationPropertyEditor_0;
+ public static String ProfileApplicationPropertyEditor_1;
+ public static String ProfileApplicationPropertyEditor_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/messages.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/messages.properties
new file mode 100644
index 00000000000..14cafbe6fa0
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/internal/properties/messages/messages.properties
@@ -0,0 +1,12 @@
+DecoratorModelPropertyEditor_0=External Profile Applications:
+DecoratorModelPropertyEditor_1=State
+DecoratorModelPropertyEditor_2=Profile Application
+DecoratorModelPropertyEditor_3=Load the selected profile application(s)
+DecoratorModelPropertyEditor_4=Unload the selected profile application(s)
+DecoratorModelPropertyEditor_5=Duplicate the selected profile application
+DecoratorModelPropertyEditor_6=Failed to unload profile application(s).
+DecoratorModelPropertyEditor_7=Loaded
+DecoratorModelPropertyEditor_8=Unloaded
+ProfileApplicationPropertyEditor_0=Externalize profile application
+ProfileApplicationPropertyEditor_1=Internalize profile application
+ProfileApplicationPropertyEditor_2=({0})
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/Activator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/Activator.java
new file mode 100644
index 00000000000..87a3875b8f7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/Activator.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.properties;
+
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+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.decoratormodel.properties"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ @Override
+ 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;
+ }
+
+ /**
+ * Returns the image at the given path from this plugin
+ *
+ * @param path
+ * the path of the image to be displayed
+ * @return The Image at the given location, or null if it couldn't be found
+ */
+ public Image getImage(String path) {
+ return getImage(PLUGIN_ID, path);
+ }
+
+ /**
+ * Returns the image from the given image descriptor
+ *
+ * @param pluginId
+ * The plugin in which the image is located
+ * @param path
+ * The path to the image from the plugin
+ * @return
+ * The Image at the given location, or null if it couldn't be found
+ */
+ public Image getImage(String pluginId, String path) {
+ final ImageRegistry registry = getImageRegistry();
+ String key = pluginId + "/" + path; //$NON-NLS-1$
+ Image image = registry.get(key);
+ if (image == null) {
+ registry.put(key, AbstractUIPlugin.imageDescriptorFromPlugin(pluginId, path));
+ image = registry.get(key);
+ }
+ return image;
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ IWorkbenchWindow result = null;
+
+ IWorkbench bench = PlatformUI.getWorkbench();
+ if (bench != null) {
+ result = bench.getActiveWorkbenchWindow();
+ if (result == null) {
+ IWorkbenchWindow[] allWindows = bench.getWorkbenchWindows();
+ if (allWindows.length > 0) {
+ result = allWindows[0];
+ }
+ }
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/AppliedProfilesObservableList.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/AppliedProfilesObservableList.java
new file mode 100644
index 00000000000..8571d789f61
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/AppliedProfilesObservableList.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Sebastien Poissonnet (CEA LIST) sebastien.poissonnet@cea.fr
+ * Mickaël ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 435174
+ * Gabriel Pascual (ALL4TEC) - Bug 441511
+ * Christian W. Damus (CEA) - Bug 441227
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.properties.elements;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ResourceAdapter;
+import org.eclipse.papyrus.uml.tools.databinding.ProfileApplicationObservableList;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Observable list for applied profiles.
+ */
+public class AppliedProfilesObservableList extends ProfileApplicationObservableList {
+
+ private ResourceAdapter adapter;
+
+ public AppliedProfilesObservableList(Package source, EditingDomain domain) {
+ super(source, domain);
+
+ adapter = createResourceAdapter();
+ domain.getResourceSet().eAdapters().add(adapter);
+ }
+
+ @Override
+ public synchronized void dispose() {
+ if (adapter.getTarget() != null) {
+ adapter.getTarget().eAdapters().remove(adapter);
+ }
+
+ super.dispose();
+ }
+
+ protected final Package getPackage() {
+ return (Package) getObserved();
+ }
+
+ private ResourceAdapter createResourceAdapter() {
+ return new ResourceAdapter() {
+ @Override
+ protected void handleResourceLoaded(Resource resource) {
+ refreshCacheList();
+ }
+
+ @Override
+ protected void handleResourceUnloaded(Resource resource) {
+ refreshCacheList();
+ }
+ };
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/DecoratorModelsObservableList.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/DecoratorModelsObservableList.java
new file mode 100644
index 00000000000..1da88fbfe40
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/DecoratorModelsObservableList.java
@@ -0,0 +1,243 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.properties.elements;
+
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Set;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.atomic.AtomicBoolean;
+
+import org.eclipse.core.databinding.observable.IObserving;
+import org.eclipse.core.databinding.observable.Realm;
+import org.eclipse.core.databinding.observable.list.ObservableList;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.NotificationFilter;
+import org.eclipse.emf.transaction.ResourceSetListener;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ResourceAdapter;
+import org.eclipse.papyrus.infra.tools.util.UIUtil;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
+import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndexEvent;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.IDecoratorModelIndexListener;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * The list of a {@link Package}'s decorator models, both loaded and unloaded.
+ */
+public class DecoratorModelsObservableList extends ObservableList implements ICommitListener, IObserving {
+
+ private final AtomicBoolean pendingCalculation = new AtomicBoolean();
+
+ private Package package_;
+
+ private TransactionalEditingDomain domain;
+
+ private final List<Command> commands;
+
+ private final ExecutorService realmExecutor;
+
+ private final ResourceSetListener resourceSetListener;
+
+ private final IDecoratorModelIndexListener indexListener;
+
+ /**
+ * Initializes me in the default realm.
+ *
+ * @param package_
+ * the package for which we track the decorator models
+ * @param domain
+ * the editing domain context in which to execute commands
+ */
+ public DecoratorModelsObservableList(Package package_, TransactionalEditingDomain domain) {
+ this(Realm.getDefault(), package_, domain);
+ }
+
+ /**
+ * Initializes me.
+ *
+ * @param realm
+ * the observable realm that owns me
+ * @param package_
+ * the package for which we track the decorator models
+ * @param domain
+ * the editing domain context in which to execute commands
+ */
+ public DecoratorModelsObservableList(Realm realm, Package package_, TransactionalEditingDomain domain) {
+ super(realm, Lists.newArrayList(), Object.class);
+
+ this.package_ = package_;
+ this.domain = domain;
+
+ this.commands = Lists.newArrayListWithExpectedSize(1);
+
+ this.realmExecutor = UIUtil.createObservableExecutor(realm);
+
+ this.resourceSetListener = new ResourceAdapter.Transactional() {
+ private NotificationFilter packageFilter;
+
+ @Override
+ protected NotificationFilter createFilter() {
+ packageFilter = NotificationFilter.createFeatureFilter(UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION);
+ return super.createFilter().or(packageFilter);
+ }
+
+ @Override
+ public void notifyChanged(Notification msg) {
+ if (packageFilter.matches(msg)) {
+ // Some externalized profiles may no longer be available
+ calculate();
+ } else {
+ // Resource case
+ super.notifyChanged(msg);
+ }
+ }
+
+ @Override
+ protected void handleResourceLoaded(Resource resource) {
+ calculate();
+ }
+
+ @Override
+ protected void handleResourceUnloaded(Resource resource) {
+ calculate();
+ }
+ };
+ domain.addResourceSetListener(resourceSetListener);
+
+ this.indexListener = new IDecoratorModelIndexListener() {
+
+ public void indexChanged(DecoratorModelIndexEvent event) {
+ // Some unloaded decorator models may have changed
+ calculate();
+ }
+ };
+ DecoratorModelIndex.getInstance().addIndexListener(indexListener);
+
+ calculate();
+ }
+
+ public Package getObserved() {
+ return package_;
+ }
+
+ @Override
+ public synchronized void dispose() {
+ try {
+ DecoratorModelIndex.getInstance().removeIndexListener(indexListener);
+ if (domain != null) {
+ domain.removeResourceSetListener(resourceSetListener);
+ }
+ if (!realmExecutor.isShutdown()) {
+ realmExecutor.shutdownNow();
+ }
+ } finally {
+ super.dispose();
+ }
+ }
+
+ public void commit(AbstractEditor editor) {
+ if (!commands.isEmpty()) {
+ if (commands.size() == 1) {
+ domain.getCommandStack().execute(commands.get(0));
+ } else {
+ domain.getCommandStack().execute(new CompoundCommand(commands));
+ }
+ commands.clear();
+ }
+ }
+
+ void calculate() {
+ if (!pendingCalculation.compareAndSet(false, true) || isDisposed()) {
+ return;
+ }
+
+ // First, mark me stale
+ getRealm().exec(new Runnable() {
+
+ public void run() {
+ setStale(true);
+ }
+ });
+
+ // Then asynchronously compute my value
+ ListenableFuture<Set<URI>> decoratorModelURIs = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(package_);
+ Futures.addCallback(decoratorModelURIs, new FutureCallback<Set<URI>>() {
+ public void onSuccess(Set<URI> result) {
+ if (isDisposed() || (domain == null) || (domain.getResourceSet() == null)) {
+ return;
+ }
+
+ try {
+ // compute all the unloaded models
+ Set<Object> newValue = Sets.<Object> newHashSet(result);
+ for (Resource next : domain.getResourceSet().getResources()) {
+ if (next.isLoaded()) {
+ newValue.remove(next.getURI());
+ }
+ }
+
+ // now get the loaded ones
+ for (ProfileApplication next : DecoratorModelUtils.getDecoratorModelProfileApplications(package_)) {
+ newValue.add(next.eResource());
+ }
+
+ List<Object> newList = Lists.newArrayList(newValue);
+ // because the ordering of all these sets is random, we must sort so that the list doesn't
+ // change its ordering randomly each time
+ sort(newList);
+
+ setStale(false);
+ updateWrappedList(newList);
+ } finally {
+ pendingCalculation.set(false);
+ }
+ }
+
+ public void onFailure(Throwable t) {
+ // TODO Auto-generated method stub
+ }
+ }, realmExecutor);
+ }
+
+ void sort(List<?> list) {
+ Collections.sort(list, new Comparator<Object>() {
+ public int compare(Object o1, Object o2) {
+ URI uri1 = getURI(o1);
+ URI uri2 = getURI(o2);
+ return uri1.toString().compareTo(uri2.toString());
+ }
+
+ URI getURI(Object o) {
+ return (o instanceof Resource) ? ((Resource) o).getURI() : (URI) o;
+ }
+ });
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElement.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElement.java
new file mode 100644
index 00000000000..24840e11e5a
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElement.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.properties.elements;
+
+import org.eclipse.core.databinding.observable.IObservable;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * Properties model element for packages.
+ */
+public class PackageModelElement extends UMLModelElement {
+ static final String DECORATOR_MODEL_PROPERTY = "externalProfileApplication"; //$NON-NLS-1$
+
+ public PackageModelElement(Package source, TransactionalEditingDomain domain) {
+ super(source, domain);
+ }
+
+ protected final Package getPackage() {
+ return (Package) getSource();
+ }
+
+ @Override
+ public IObservable doGetObservable(String propertyPath) {
+ if (propertyPath.equals(UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION.getName())) {
+ return new AppliedProfilesObservableList(getPackage(), domain);
+ } else if (propertyPath.equals(DECORATOR_MODEL_PROPERTY)) {
+ return new DecoratorModelsObservableList(getPackage(), (TransactionalEditingDomain) domain);
+ }
+
+ return super.doGetObservable(propertyPath);
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElementFactory.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElementFactory.java
new file mode 100644
index 00000000000..08c7845d095
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/elements/PackageModelElementFactory.java
@@ -0,0 +1,48 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.properties.elements;
+
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElement;
+import org.eclipse.papyrus.uml.properties.modelelement.UMLModelElementFactory;
+import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
+import org.eclipse.papyrus.views.properties.contexts.DataContextElement;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Properties model element factory for profile applications.
+ */
+public class PackageModelElementFactory extends UMLModelElementFactory {
+
+ public PackageModelElementFactory() {
+ super();
+ }
+
+ @Override
+ protected UMLModelElement doCreateFromSource(Object source, DataContextElement context) {
+ Element umlSource = UMLUtil.resolveUMLElement(source);
+ if (umlSource instanceof Package) {
+ return createPackageElement((Package) umlSource, context);
+ }
+
+ return super.doCreateFromSource(source, context);
+ }
+
+ protected UMLModelElement createPackageElement(Package package_, DataContextElement context) {
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(package_);
+ return new PackageModelElement(package_, domain);
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/DecoratorModelPropertyEditor.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/DecoratorModelPropertyEditor.java
new file mode 100644
index 00000000000..6d1009ff872
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/DecoratorModelPropertyEditor.java
@@ -0,0 +1,340 @@
+/*****************************************************************************
+ * Copyright (c) 2011, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.properties.widgets;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.databinding.observable.ChangeEvent;
+import org.eclipse.core.databinding.observable.IChangeListener;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.CellLabelProvider;
+import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
+import org.eclipse.jface.viewers.DoubleClickEvent;
+import org.eclipse.jface.viewers.IDoubleClickListener;
+import org.eclipse.jface.viewers.ISelectionChangedListener;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.viewers.TableLayout;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.TableViewerColumn;
+import org.eclipse.jface.viewers.ViewerCell;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.widgets.editors.AbstractListEditor;
+import org.eclipse.papyrus.uml.decoratormodel.internal.properties.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.UnloadDecoratorModelHandler;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.DecoratorModelLabelProvider;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.DuplicateDecoratorModelWizard;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.LoadProfileApplicationsWizard;
+import org.eclipse.papyrus.uml.decoratormodel.properties.Activator;
+import org.eclipse.papyrus.views.properties.widgets.AbstractPropertyEditor;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+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.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+/**
+ * Property sheet editor for the "decorator models" property of a package.
+ */
+public class DecoratorModelPropertyEditor extends AbstractPropertyEditor {
+
+ public DecoratorModelPropertyEditor(Composite parent, int style) {
+ super(new DecoratorModelEditor(parent, style));
+ }
+
+ //
+ // Nested types
+ //
+
+ static class DecoratorModelEditor extends AbstractListEditor implements IChangeListener {
+
+ private TableViewer table;
+
+ private Button loadButton;
+
+ private Button unloadButton;
+
+ private Button duplicateButton;
+
+ private boolean preservingSelection;
+
+ protected DecoratorModelEditor(Composite parent, int style) {
+ super(parent, style, Messages.DecoratorModelPropertyEditor_0);
+ setLayout(new GridLayout(2, false));
+
+ createActionButtons(this);
+
+ table = new TableViewer(this, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL | SWT.FULL_SELECTION | SWT.MULTI);
+ GridData gd = new GridData(GridData.FILL_BOTH);
+ gd.minimumHeight = 140;
+ gd.horizontalSpan = 2;
+ table.getTable().setLayoutData(gd);
+ TableLayout tableLayout = new TableLayout(true);
+ table.getTable().setLayout(tableLayout);
+ table.getTable().setHeaderVisible(true);
+ table.getTable().setLinesVisible(true);
+ table.setContentProvider(ArrayContentProvider.getInstance());
+
+ TableViewerColumn stateColumn = new TableViewerColumn(table, SWT.NONE);
+ stateColumn.getColumn().setText(Messages.DecoratorModelPropertyEditor_1);
+ stateColumn.setLabelProvider(new StateCellLabelProvider());
+ tableLayout.addColumnData(new ColumnWeightData(25, 100, true));
+
+ TableViewerColumn resourceColumn = new TableViewerColumn(table, SWT.NONE);
+ resourceColumn.getColumn().setText(Messages.DecoratorModelPropertyEditor_2);
+ resourceColumn.setLabelProvider(new DelegatingStyledCellLabelProvider(new DecoratorModelLabelProvider()));
+ tableLayout.addColumnData(new ColumnWeightData(75, 350, true));
+
+ table.addSelectionChangedListener(new ISelectionChangedListener() {
+
+ public void selectionChanged(SelectionChangedEvent event) {
+ updateButtons();
+ }
+ });
+ table.addDoubleClickListener(new IDoubleClickListener() {
+
+ public void doubleClick(DoubleClickEvent event) {
+ if (loadButton.isEnabled()) {
+ loadDecoratorModels();
+ }
+ }
+ });
+
+ updateButtons();
+ }
+
+ protected void createActionButtons(Composite parent) {
+ Composite buttonsArea = new Composite(parent, SWT.NONE);
+ buttonsArea.setLayoutData(new GridData(SWT.END, SWT.DEFAULT, false, false));
+ buttonsArea.setLayout(new RowLayout());
+
+ loadButton = new Button(buttonsArea, SWT.PUSH);
+ loadButton.setImage(Activator.getDefault().getImage("/icons/full/dtool16/load_resource.png")); //$NON-NLS-1$
+ loadButton.setToolTipText(Messages.DecoratorModelPropertyEditor_3);
+
+ unloadButton = new Button(buttonsArea, SWT.PUSH);
+ unloadButton.setImage(Activator.getDefault().getImage("/icons/full/ctool16/unload_resource.png")); //$NON-NLS-1$
+ unloadButton.setToolTipText(Messages.DecoratorModelPropertyEditor_4);
+
+ duplicateButton = new Button(buttonsArea, SWT.PUSH);
+ duplicateButton.setImage(Activator.getDefault().getImage("/icons/full/ctool16/dup_resource.png")); //$NON-NLS-1$
+ duplicateButton.setToolTipText(Messages.DecoratorModelPropertyEditor_5);
+
+ SelectionListener action = new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ action((Button) e.widget);
+ }
+ };
+
+ loadButton.addSelectionListener(action);
+ unloadButton.addSelectionListener(action);
+ duplicateButton.addSelectionListener(action);
+ }
+
+ protected void action(Button button) {
+ if (button == loadButton) {
+ loadDecoratorModels();
+ } else if (button == unloadButton) {
+ unloadDecoratorModels();
+ } else if (button == duplicateButton) {
+ duplicateDecoratorModel();
+ }
+ updateButtons();
+ }
+
+ @Override
+ protected void doBinding() {
+ super.doBinding();
+
+ table.setInput(modelProperty);
+ modelProperty.addChangeListener(this);
+ }
+
+ public void handleChange(ChangeEvent event) {
+ if (!isDisposed()) {
+ preservingSelection(new Runnable() {
+
+ public void run() {
+ table.refresh();
+ }
+ });
+ }
+ }
+
+ protected Package getPackage() {
+ return (Package) getContextElement();
+ }
+
+ protected void loadDecoratorModels() {
+ Set<URI> resources = ImmutableSet.copyOf(Iterables.filter(((IStructuredSelection) table.getSelection()).toList(), URI.class));
+ if (!Iterables.isEmpty(resources)) {
+ final LoadProfileApplicationsWizard wizard = new LoadProfileApplicationsWizard(false, true);
+ wizard.init(getPackage(), resources);
+
+ preservingSelection(new Runnable() {
+
+ public void run() {
+ if (wizard.isComplete()) {
+ // Just do it
+ wizard.performFinish();
+ } else {
+ new WizardDialog(getShell(), wizard).open();
+ }
+ }
+ });
+ }
+ }
+
+ protected void unloadDecoratorModels() {
+ final Iterable<Resource> resources = Iterables.filter(((IStructuredSelection) table.getSelection()).toList(), Resource.class);
+ if (!Iterables.isEmpty(resources)) {
+ final ResourceSet rset = Iterables.getFirst(resources, null).getResourceSet();
+
+ preservingSelection(new Runnable() {
+
+ public void run() {
+ try {
+ UnloadDecoratorModelHandler.unloadResources(Activator.getActiveWorkbenchWindow(), rset, resources);
+ } catch (ExecutionException e) {
+ Throwable exc = (e.getCause() != null) ? e.getCause() : e;
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.DecoratorModelPropertyEditor_6, exc);
+ Activator.getDefault().getLog().log(status);
+ StatusManager.getManager().handle(status, StatusManager.SHOW);
+ }
+ }
+ });
+ }
+ }
+
+ protected void duplicateDecoratorModel() {
+ final Object selected = ((IStructuredSelection) table.getSelection()).getFirstElement();
+ if (selected != null) {
+ preservingSelection(new Runnable() {
+
+ public void run() {
+ DuplicateDecoratorModelWizard wizard = new DuplicateDecoratorModelWizard();
+ wizard.init(EMFHelper.getResourceSet(getPackage()), selected);
+ new WizardDialog(getShell(), wizard).open();
+ }
+ });
+ }
+ }
+
+ protected void updateButtons() {
+ List<?> selection = ((IStructuredSelection) table.getSelection()).toList();
+
+ boolean enableLoad = !selection.isEmpty();
+ boolean enableUnload = enableLoad;
+ boolean enableDup = selection.size() == 1;
+
+ if (enableLoad) {
+ for (Object next : selection) {
+ enableLoad = enableLoad && !(next instanceof Resource);
+ enableUnload = enableUnload && (next instanceof Resource);
+ }
+ }
+
+ loadButton.setImage(Activator.getDefault().getImage(enableLoad ? "/icons/full/etool16/load_resource.png" : "/icons/full/dtool16/load_resource.png")); //$NON-NLS-1$ //$NON-NLS-2$
+ loadButton.setEnabled(enableLoad);
+ unloadButton.setEnabled(enableUnload);
+ duplicateButton.setEnabled(enableDup);
+ }
+
+ void preservingSelection(Runnable runnable) {
+ final boolean wasPreservingSelection = preservingSelection;
+ List<Object> selection = null;
+ Set<URI> uris = null;
+
+ if (!preservingSelection) {
+ selection = Lists.newArrayList((Iterator<?>) ((IStructuredSelection) table.getSelection()).iterator());
+ uris = Sets.newHashSet();
+ for (Object next : selection) {
+ if (next instanceof Resource) {
+ next = ((Resource) next).getURI();
+ }
+ if (next instanceof URI) {
+ uris.add((URI) next);
+ }
+ }
+
+ preservingSelection = true;
+ }
+
+ try {
+ runnable.run();
+ } finally {
+ preservingSelection = wasPreservingSelection;
+
+ if (selection != null) {
+ selection.clear();
+ for (Object next : modelProperty) {
+ URI uri = (next instanceof Resource) ? ((Resource) next).getURI() : (next instanceof URI) ? (URI) next : null;
+ if (uris.contains(uri)) {
+ selection.add(next);
+ }
+ }
+ table.setSelection(new StructuredSelection(selection), true);
+ updateButtons();
+ }
+ }
+ }
+
+ @Override
+ public Object getEditableType() {
+ return List.class;
+ }
+
+ @Override
+ public void setReadOnly(boolean readOnly) {
+ // Pass
+ }
+
+ @Override
+ public boolean isReadOnly() {
+ return true;
+ }
+
+ }
+
+ static class StateCellLabelProvider extends CellLabelProvider {
+ @Override
+ public void update(ViewerCell cell) {
+ cell.setText((cell.getElement() instanceof Resource) ? Messages.DecoratorModelPropertyEditor_7 : Messages.DecoratorModelPropertyEditor_8);
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java
new file mode 100644
index 00000000000..af66845c7dd
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties/src/org/eclipse/papyrus/uml/decoratormodel/properties/widgets/ProfileApplicationPropertyEditor.java
@@ -0,0 +1,208 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.properties.widgets;
+
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.jface.window.SameShellProvider;
+import org.eclipse.jface.window.Window;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.properties.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.ExternalizeProfileApplicationsWizard;
+import org.eclipse.papyrus.uml.decoratormodel.properties.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.ui.providers.DeleteEmptyDecoratorModelsPolicy;
+import org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationEditor;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.base.Function;
+import com.google.common.base.Strings;
+import com.google.common.collect.Iterables;
+
+/**
+ * Specialized property editor for profile applications of a package that enables editing of the selected profile application.
+ */
+public class ProfileApplicationPropertyEditor extends org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationPropertyEditor {
+
+ /**
+ * Constructor.
+ *
+ * @param parent
+ * @param style
+ */
+ public ProfileApplicationPropertyEditor(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ @Override
+ protected ProfileApplicationEditor createProfileApplicationEditor(Composite parent, int style) {
+ return new ExternalizableProfileApplicationEditor(parent, style);
+ }
+
+ //
+ // Nested types
+ //
+
+ static class ExternalizableProfileApplicationEditor extends ProfileApplicationEditor {
+
+ private Button externalizeButton;
+
+ private Button internalizeButton;
+
+ ExternalizableProfileApplicationEditor(Composite parent, int style) {
+ super(parent, style);
+ }
+
+ @Override
+ protected void createListControls() {
+ super.createListControls();
+
+ externalizeButton = createButton(Activator.getDefault().getImage("/icons/full/ctool16/externalize.gif"), Messages.ProfileApplicationPropertyEditor_0); //$NON-NLS-1$
+ internalizeButton = createButton(Activator.getDefault().getImage("/icons/full/ctool16/internalize.gif"), Messages.ProfileApplicationPropertyEditor_1); //$NON-NLS-1$
+ }
+
+ @Override
+ protected ProfileColumnsLabelProvider createProfileColumnsLabelProvider(IBaseLabelProvider labelProvider) {
+ return new ExternalizableProfileColumnsLabelProvider(labelProvider);
+ }
+
+ @Override
+ protected void updateControls() {
+ super.updateControls();
+
+ final Package package_ = getInputPackage();
+ final Iterable<ProfileApplication> profileApplications = getSelectedProfileApplications();
+
+ boolean allInternalized = false;
+ for (ProfileApplication next : profileApplications) {
+ allInternalized = next.getApplyingPackage() == package_;
+ if (!allInternalized) {
+ break;
+ }
+ }
+ externalizeButton.setEnabled(allInternalized);
+
+ boolean allExternalized = false;
+ for (ProfileApplication next : profileApplications) {
+ allExternalized = next.getApplyingPackage() != package_;
+ if (!allExternalized) {
+ break;
+ }
+ }
+ internalizeButton.setEnabled(allExternalized);
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ super.widgetSelected(e);
+
+ if (e.widget == externalizeButton) {
+ externalizeProfileApplications();
+ } else if (e.widget == internalizeButton) {
+ internalizeProfileApplications();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ Iterable<ProfileApplication> getSelectedProfileApplications() {
+ final Package package_ = getInputPackage();
+ IStructuredSelection selection = (IStructuredSelection) treeViewer.getSelection();
+ return Iterables.transform(selection.toList(), new Function<Object, ProfileApplication>() {
+ public ProfileApplication apply(Object input) {
+ return package_.getProfileApplication((Profile) input, true);
+ }
+ });
+ }
+
+ Package getInputPackage() {
+ return (Package) getContextElement();
+ }
+
+ void externalizeProfileApplications() {
+ Package package_ = getInputPackage();
+
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(package_);
+ if (domain != null) {
+ ExternalizeProfileApplicationsWizard wizard = new ExternalizeProfileApplicationsWizard();
+ final Iterable<ProfileApplication> profileApplications = getSelectedProfileApplications();
+ wizard.init(package_, profileApplications);
+
+ WizardDialog dlg = new WizardDialog(getShell(), wizard);
+ if (dlg.open() == Window.OK) {
+ commit();
+ updateControls();
+ }
+ }
+ }
+
+ void internalizeProfileApplications() {
+ Package package_ = getInputPackage();
+
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(package_);
+ if (domain != null) {
+ final Iterable<ProfileApplication> profileApplications = getSelectedProfileApplications();
+ domain.getCommandStack().execute(DecoratorModelUtils.createReclaimProfileApplicationsCommand(profileApplications, new DeleteEmptyDecoratorModelsPolicy(new SameShellProvider(internalizeButton))));
+ commit();
+ updateControls();
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ protected class ExternalizableProfileColumnsLabelProvider extends ProfileColumnsLabelProvider {
+
+ public ExternalizableProfileColumnsLabelProvider(IBaseLabelProvider defaultLabelProvider) {
+ super(defaultLabelProvider);
+ }
+
+ @Override
+ public StyledString getStyledText(Object element) {
+ StyledString result = super.getStyledText(element);
+
+ ProfileApplication application = null;
+ if (element instanceof Profile) {
+ application = getInputPackage().getProfileApplication((Profile) element, true);
+ } else if (element instanceof ProfileApplication) {
+ application = (ProfileApplication) element;
+ }
+
+ if ((application != null) && (application.eResource() != getInputPackage().eResource())) {
+ Package rootPackage = (Package) EcoreUtil.getRootContainer(application);
+ String modelName = rootPackage.getName();
+ if (Strings.isNullOrEmpty(modelName)) {
+ modelName = rootPackage.eResource().getURI().trimFileExtension().lastSegment();
+ }
+ String qualifier = " " + NLS.bind(Messages.ProfileApplicationPropertyEditor_2, modelName); //$NON-NLS-1$
+
+ result.append(qualifier, StyledString.DECORATIONS_STYLER);
+ }
+
+ return result;
+ }
+ }
+ }
+
+}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.classpath b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.classpath
index ad32c83a788..ad32c83a788 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.classpath
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.classpath
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.project b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.project
index ac80b81cd93..10b0b694c9b 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.project
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.project
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>org.eclipse.papyrus.uml.profile.externalresource</name>
+ <name>org.eclipse.papyrus.uml.decoratormodel.ui</name>
<comment></comment>
<projects>
</projects>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..94d61f00da6
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..55c1d331102
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,42 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.decoratormodel.ui;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="4.1.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
+ org.eclipse.papyrus.uml.decoratormodel;bundle-version="1.1.0",
+ org.eclipse.emf.edit.ui;bundle-version="2.10.0",
+ org.eclipse.core.expressions;bundle-version="3.4.600",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.editor;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.10.100",
+ org.eclipse.ui.navigator;bundle-version="3.5.500",
+ org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="1.1.0";resolution:=optional,
+ org.eclipse.papyrus.infra.tools;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.onefile;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.profile;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.decoratormodel.internal.ui,
+ org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;x-friends:="org.eclipse.papyrus.uml.decoratormodel.properties",
+ org.eclipse.papyrus.uml.decoratormodel.internal.ui.expressions;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers;x-friends:="org.eclipse.papyrus.uml.decoratormodel.properties",
+ org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;x-friends:="org.eclipse.papyrus.uml.decoratormodel.properties",
+ org.eclipse.papyrus.uml.decoratormodel.ui.providers
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/about.html b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/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/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/build.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/build.properties
new file mode 100644
index 00000000000..169989da1b8
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/build.properties
@@ -0,0 +1,10 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ documentation.pdoc,\
+ plugin.xml,\
+ plugin.properties,\
+ icons/
+src.includes = about.html
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/documentation.pdoc b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/documentation.pdoc
new file mode 100644
index 00000000000..4887381972c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/documentation.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="User interface elements for management of separate profile applications.">
+ <referent firstName="Christian" lastName="Damus" eMail="give.a.damus@gmail.com" currentCompany="independent"/>
+</doc:Documentation>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/icons/full/ovr16/profileApps.png b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/icons/full/ovr16/profileApps.png
new file mode 100644
index 00000000000..1214d5d30b4
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/icons/full/ovr16/profileApps.png
Binary files differ
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.properties
new file mode 100644
index 00000000000..b82480134b3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.properties
@@ -0,0 +1,38 @@
+# Copyright (c) 2014 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+
+pluginName = Papyrus Decorator Models UI
+providerName = Eclipse Modeling Project
+
+externalize.label = Externalize Profile Applications...
+externalize.tooltip = Move profile applications into a separate model
+internalize.label = Internalize Profile Applications...
+internalize.tooltip = Reintegrate profile applications from a separate model into the main UML model
+unload.pkg.label = Unload Profile Applications
+unload.pkg.tooltip = Unload profile applications provided by the selected model
+load.label = Load Profile Applications...
+load.tooltip = Load external profile applications for the selected package
+unload.cmd.label = Unload Profile Applications...
+unload.cmd.tooltip = Unload profile applications for the selected package
+externalize.description = Move profile applications into separately loadable resources.
+externalize.name = Externalize Profile Applications
+internalize.description = Reintegrate externalized profile applications into the main UML model resource.
+internalize.name = Internalize Profile Applications
+unload.pkg.description = Unload profile applications provided by the selected resource.
+unload.pkg.name = Unload Profile Applications
+load.description = Load externalized profile applications for the selected package.
+load.name = Load Profile Applications
+unload.description = Unload profile applications for the selected package.
+unload.name = Unload Profile Applications
+cnf.filter.description = Filters out models that provide profile applications to Papyrus UML models.
+cnf.filter.name = Profile Applications
+profapps.decorator.label = Profile Applications
+profapps.decorator.description = Indicates workspace resources that are profile applications and packages in Model Explorer for which there are unloaded profile applications available that apply profiles to them.
+profapps.page.name = Profile Applications
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.xml
new file mode 100644
index 00000000000..ec1279518d5
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/plugin.xml
@@ -0,0 +1,273 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.ui.menus">
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.uml.modelrepair.refactor?after=additions">
+ <command
+ commandId="org.eclipse.papyrus.uml.decoratormodel.ui.ExternalizeProfiles"
+ label="%externalize.label"
+ style="push"
+ tooltip="%externalize.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.decoratormodel.ownsProfileApplications">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.uml.decoratormodel.ui.InternalizeProfiles"
+ label="%internalize.label"
+ style="push"
+ tooltip="%internalize.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.decoratormodel.hasExternalProfileApplications">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ <menuContribution
+ allPopups="false"
+ locationURI="popup:org.eclipse.papyrus.views.modelexplorer.modelexplorer.popup?after=tools">
+ <command
+ commandId="org.eclipse.papyrus.uml.decoratormodel.ui.UnloadProfileApplications"
+ label="%unload.pkg.label"
+ style="push"
+ tooltip="%unload.pkg.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.decoratormodel.isDecoratorModel">
+ </test>
+ </adapt>
+ </iterate>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.uml.decoratormodel.ui.LoadAvailableDecoratorModels"
+ label="%load.label"
+ style="push"
+ tooltip="%load.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.decoratormodel.hasUnloadedDecoratorModels"
+ args="recursive,optimistic">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ <command
+ commandId="org.eclipse.papyrus.uml.decoratormodel.ui.UnloadLoadedDecoratorModels"
+ label="%unload.cmd.label"
+ style="push"
+ tooltip="%unload.cmd.tooltip">
+ <visibleWhen
+ checkEnabled="false">
+ <and>
+ <count
+ value="1">
+ </count>
+ <iterate operator="and" ifEmpty="false">
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ <test
+ forcePluginActivation="true"
+ property="org.eclipse.papyrus.uml.decoratormodel.hasLoadedDecoratorModels"
+ args="recursive">
+ </test>
+ </adapt>
+ </iterate>
+ </and>
+ </visibleWhen>
+ </command>
+ </menuContribution>
+ </extension>
+ <extension
+ point="org.eclipse.ui.commands">
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.ExternalizeProfilesHandler"
+ description="%externalize.description"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.ExternalizeProfiles"
+ name="%externalize.name">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.InternalizeProfilesHandler"
+ description="%internalize.description"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.InternalizeProfiles"
+ name="%internalize.name">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.UnloadDecoratorModelHandler"
+ description="%unload.pkg.description"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.UnloadProfileApplications"
+ name="%unload.pkg.name">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.LoadAvailableDecoratorModelsHandler"
+ description="%load.description"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.LoadAvailableDecoratorModels"
+ name="%load.name">
+ </command>
+ <command
+ defaultHandler="org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.UnloadLoadedDecoratorModelsHandler"
+ description="%unload.description"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.UnloadLoadedDecoratorModels"
+ name="%unload.name">
+ </command>
+ </extension>
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.ui.expressions.PackagePropertyTester"
+ id="org.eclipse.papyrus.uml.decoratormodel.package"
+ namespace="org.eclipse.papyrus.uml.decoratormodel"
+ properties="ownsProfileApplications,hasExternalProfileApplications,isDecoratorModel,hasUnloadedDecoratorModels,hasLoadedDecoratorModels"
+ type="org.eclipse.uml2.uml.Package">
+ </propertyTester>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonFilter
+ activeByDefault="true"
+ description="%cnf.filter.description"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.DecoratorModelFilter"
+ name="%cnf.filter.name"
+ visibleInUI="true">
+ <filterExpression>
+ <adapt
+ type="org.eclipse.emf.ecore.EObject">
+ <instanceof
+ value="org.eclipse.uml2.uml.Package">
+ </instanceof>
+ <test
+ property="org.eclipse.papyrus.uml.decoratormodel.isDecoratorModel">
+ </test>
+ </adapt>
+ </filterExpression>
+ </commonFilter>
+ </extension>
+ <extension
+ point="org.eclipse.ui.navigator.viewer">
+ <viewerContentBinding
+ viewerId="org.eclipse.papyrus.views.modelexplorer.modelexplorer">
+ <includes>
+ <contentExtension
+ pattern="org.eclipse.papyrus.uml.decoratormodel.ui.*">
+ </contentExtension>
+ </includes>
+ </viewerContentBinding>
+ </extension>
+ <extension
+ point="org.eclipse.ui.startup">
+ <startup
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.ui.Startup"></startup>
+ </extension>
+ <extension
+ point="org.eclipse.ui.decorators">
+ <decorator
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.DecoratorModelLabelDecorator"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.DecoratorModel"
+ label="%profapps.decorator.label"
+ lightweight="true"
+ state="true">
+ <description>
+ %profapps.decorator.description
+ </description>
+ <enablement>
+ <or>
+ <objectClass
+ name="org.eclipse.emf.ecore.EObject">
+ </objectClass>
+ <objectClass
+ name="org.eclipse.papyrus.emf.facet.custom.metamodel.v0_2_0.internal.treeproxy.EObjectTreeElement">
+ </objectClass>
+ <objectClass
+ name="org.eclipse.core.resources.IFile">
+ </objectClass>
+ <objectClass
+ name="org.eclipse.papyrus.infra.onefile.model.IPapyrusFile">
+ </objectClass>
+ </or>
+ </enablement>
+ </decorator>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.model">
+ <modelSetSnippet
+ classname="org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.AvailableDecoratorModelsSnippet"
+ description="Interceptor of resource loads that optionally prompts to load available decorator models.">
+ </modelSetSnippet>
+ </extension>
+ <extension
+ point="org.eclipse.core.runtime.preferences">
+ <initializer
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.ProfileExternalizationUIPreferences">
+ </initializer>
+ </extension>
+ <extension
+ point="org.eclipse.ui.preferencePages">
+ <page
+ category="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory"
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.DecoratorModelPreferencePage"
+ id="org.eclipse.papyrus.uml.decoratormodel.ui.DecoratorModelPreferences"
+ name="%profapps.page.name">
+ </page>
+ </extension>
+</plugin>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/pom.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/pom.xml
new file mode 100644
index 00000000000..a2a1d6d5989
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel.ui</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Activator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Activator.java
new file mode 100644
index 00000000000..df197410272
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Activator.java
@@ -0,0 +1,111 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui;
+
+import java.util.concurrent.ExecutorService;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.papyrus.infra.tools.util.UIUtil;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.PlatformUI;
+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.decoratormodel.ui"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ private ExecutorService executorService;
+
+ /**
+ * Logging utility.
+ */
+ public static LogHelper log;
+
+ public Activator() {
+ super();
+ }
+
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+
+ executorService = UIUtil.createUIExecutor(Display.getDefault());
+
+ plugin = this;
+ log = new LogHelper(this);
+
+ // Kick the index
+ DecoratorModelIndex.getInstance();
+ }
+
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ executorService.shutdown();
+ executorService = null;
+
+ plugin = null;
+ log = null;
+
+ super.stop(context);
+ }
+
+ /**
+ * Obtains the static instance.
+ *
+ * @return the static instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+ public ImageDescriptor getIcon(String path) {
+ if (!path.startsWith("icons/")) { //$NON-NLS-1$
+ path = "icons/" + path; //$NON-NLS-1$
+ }
+ return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
+ }
+
+ public ExecutorService getExecutorService() {
+ return executorService;
+ }
+
+ public static IWorkbenchWindow getActiveWorkbenchWindow() {
+ IWorkbenchWindow result = null;
+
+ IWorkbench bench = PlatformUI.getWorkbench();
+ if (bench != null) {
+ result = bench.getActiveWorkbenchWindow();
+ if (result == null) {
+ IWorkbenchWindow[] allWindows = bench.getWorkbenchWindows();
+ if (allWindows.length > 0) {
+ result = allWindows[0];
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Startup.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Startup.java
new file mode 100644
index 00000000000..3e8826b68b0
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/Startup.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui;
+
+import org.eclipse.ui.IStartup;
+
+/**
+ * Early start-up hook for the externalized profile applications subsystem.
+ */
+public class Startup implements IStartup {
+
+ public Startup() {
+ super();
+ }
+
+ @Override
+ public void earlyStartup() {
+ // Kick the index
+ Activator.getDefault();
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/ExternalizeProfilesHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/ExternalizeProfilesHandler.java
new file mode 100644
index 00000000000..029aed14f48
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/ExternalizeProfilesHandler.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.ExternalizeProfileApplicationsWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Command handler for the "Externalize Profile Applications&hellip;" command.
+ */
+public class ExternalizeProfilesHandler extends AbstractHandler {
+
+ public ExternalizeProfilesHandler() {
+ super();
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbench bench = HandlerUtil.getActiveWorkbenchWindowChecked(event).getWorkbench();
+ ISelection selection = HandlerUtil.getActiveMenuSelectionChecked(event);
+
+ if (selection instanceof IStructuredSelection) {
+ ExternalizeProfileApplicationsWizard wizard = new ExternalizeProfileApplicationsWizard();
+ wizard.init(bench, (IStructuredSelection) selection);
+
+ WizardDialog dlg = new WizardDialog(bench.getActiveWorkbenchWindow().getShell(), wizard);
+ dlg.open();
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/InternalizeProfilesHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/InternalizeProfilesHandler.java
new file mode 100644
index 00000000000..2c2ab0175f1
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/InternalizeProfilesHandler.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.InternalizeProfileApplicationsWizard;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.handlers.HandlerUtil;
+
+/**
+ * Command handler for the "Internalize Profile Applications&hellip;" command.
+ */
+public class InternalizeProfilesHandler extends AbstractHandler {
+
+ public InternalizeProfilesHandler() {
+ super();
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbench bench = HandlerUtil.getActiveWorkbenchWindowChecked(event).getWorkbench();
+ ISelection selection = HandlerUtil.getActiveMenuSelectionChecked(event);
+
+ if (selection instanceof IStructuredSelection) {
+ InternalizeProfileApplicationsWizard wizard = new InternalizeProfileApplicationsWizard();
+ wizard.init(bench, (IStructuredSelection) selection);
+
+ WizardDialog dlg = new WizardDialog(bench.getActiveWorkbenchWindow().getShell(), wizard);
+ dlg.open();
+ }
+
+ return null;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/LoadAvailableDecoratorModelsHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/LoadAvailableDecoratorModelsHandler.java
new file mode 100644
index 00000000000..9a0ca979baf
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/LoadAvailableDecoratorModelsHandler.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;
+
+import java.util.Collections;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.LoadProfileApplicationsWizard;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.uml2.uml.Package;
+
+/**
+ * Command handler for the "Load Available Profile Applications&hellip;" command.
+ */
+public class LoadAvailableDecoratorModelsHandler extends AbstractHandler {
+
+ public LoadAvailableDecoratorModelsHandler() {
+ super();
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event).getWorkbench().getActiveWorkbenchWindow();
+ ISelection selection = HandlerUtil.getActiveMenuSelectionChecked(event);
+
+ if (selection instanceof IStructuredSelection) {
+ Package package_ = (Package) EMFHelper.getEObject(((IStructuredSelection) selection).getFirstElement());
+ promptToLoadAvailableProfileApplications(window.getShell(), package_, false);
+ }
+
+ return null;
+ }
+
+ public static void promptToLoadAvailableProfileApplications(Shell parentShell, Package package_, final boolean autoPrompt) {
+ LoadProfileApplicationsWizard wizard = new LoadProfileApplicationsWizard(autoPrompt);
+ wizard.init(package_, Collections.<URI> emptySet());
+
+ WizardDialog dlg = new WizardDialog(parentShell, wizard);
+ dlg.open();
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadDecoratorModelHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadDecoratorModelHandler.java
new file mode 100644
index 00000000000..a09cc0227c5
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadDecoratorModelHandler.java
@@ -0,0 +1,273 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Set;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.SubMonitor;
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.AbstractCommand.NonDirtying;
+import org.eclipse.emf.common.command.BasicCommandStack;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.AdapterFactoryEditingDomain;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.tools.utils.CustomUMLUtil;
+import org.eclipse.swt.widgets.Shell;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
+/**
+ * Command handler for the "Unload Profile Applications" command.
+ */
+public class UnloadDecoratorModelHandler extends AbstractHandler {
+
+ public UnloadDecoratorModelHandler() {
+ super();
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
+ ISelection selection = HandlerUtil.getActiveMenuSelectionChecked(event);
+
+ ResourceSet resourceSet = null;
+ final Set<Resource> toUnload = Sets.newHashSet();
+ if (selection instanceof IStructuredSelection) {
+ for (Object next : ((IStructuredSelection) selection).toList()) {
+ EObject eObject = EMFHelper.getEObject(next);
+ if (eObject instanceof Package) {
+ Resource resource = eObject.eResource();
+ toUnload.add(resource);
+ resourceSet = resource.getResourceSet();
+ }
+ }
+ }
+
+ if (resourceSet != null) {
+ unloadResources(window, resourceSet, toUnload);
+ }
+
+ return null;
+ }
+
+ public static void unloadResources(IWorkbenchWindow uiContext, ResourceSet resourceSet, final Iterable<? extends Resource> resources) throws ExecutionException {
+ // Check for resources that need to be saved
+ final SaveHandler save = getSaveHandler(resourceSet);
+ boolean needSave = save.isSaveNeeded(resources);
+ if (needSave) {
+ if (!confirmSave(uiContext.getShell())) {
+ // Bail if user refused to save
+ return;
+ }
+
+ try {
+ uiContext.run(true, false, new IRunnableWithProgress() {
+
+ @Override
+ public void run(IProgressMonitor monitor) throws InvocationTargetException {
+ try {
+ save.save(resources, monitor);
+ } catch (IOException e) {
+ throw new InvocationTargetException(e);
+ }
+ }
+ });
+ } catch (InterruptedException e) {
+ throw new ExecutionException(Messages.UnloadDecoratorModelHandler_0, e);
+ } catch (InvocationTargetException e) {
+ throw new ExecutionException(Messages.UnloadDecoratorModelHandler_1, e.getTargetException());
+ }
+ }
+
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(resourceSet);
+ if (domain != null) {
+ class UnloadCommand extends AbstractCommand implements NonDirtying {
+ UnloadCommand() {
+ super(Messages.UnloadDecoratorModelHandler_2);
+ }
+
+ @Override
+ protected boolean prepare() {
+ return true;
+ }
+
+ @Override
+ public void execute() {
+ for (Resource next : resources) {
+ // Destroy the contents of the resource to effect unapplication of stereotypes
+ CustomUMLUtil.destroyAll(next.getContents());
+
+ next.unload();
+ next.getResourceSet().getResources().remove(next);
+ next.eAdapters().clear();
+ }
+ }
+
+ /**
+ * Unloading resources breaks undo/redo of any previous commands that involved their
+ * contents.
+ *
+ * @return {@code false}, always
+ */
+ @Override
+ public boolean canUndo() {
+ return false;
+ }
+
+ @Override
+ public void redo() {
+ throw new IllegalStateException("command was not undone"); //$NON-NLS-1$
+ }
+ }
+
+ domain.getCommandStack().execute(new UnloadCommand());
+ }
+ }
+
+ static SaveHandler getSaveHandler(ResourceSet resourceSet) {
+ return (resourceSet instanceof ModelSet) ? new ModelSetSaveHandlerImpl((ModelSet) resourceSet) : new SaveHandlerImpl(resourceSet);
+ }
+
+ static boolean confirmSave(Shell parentShell) {
+ return MessageDialog.openConfirm(parentShell, Messages.UnloadDecoratorModelHandler_2, Messages.UnloadDecoratorModelHandler_3);
+ }
+
+ //
+ // Nested types
+ //
+
+ interface SaveHandler {
+ boolean isSaveNeeded(Iterable<? extends Resource> resources);
+
+ void save(Iterable<? extends Resource> resources, IProgressMonitor monitor) throws IOException;
+ }
+
+ static class SaveHandlerImpl implements SaveHandler {
+ private final ResourceSet resourceSet;
+
+ SaveHandlerImpl(ResourceSet resourceSet) {
+ this.resourceSet = resourceSet;
+ }
+
+ @Override
+ public boolean isSaveNeeded(Iterable<? extends Resource> resources) {
+ boolean result = false;
+ boolean trackingModification = true;
+
+ for (Resource next : resources) {
+ if (!next.isTrackingModification()) {
+ // Can't trust this method
+ result = false;
+ trackingModification = false;
+ break;
+ }
+
+ if (next.isModified()) {
+ result = true;
+ break;
+ }
+ }
+
+ if (!result && !trackingModification) {
+ // Check command stack, if any
+ EditingDomain domain = AdapterFactoryEditingDomain.getEditingDomainFor(resourceSet);
+ if ((domain != null) && (domain.getCommandStack() instanceof BasicCommandStack)) {
+ result = ((BasicCommandStack) domain.getCommandStack()).isSaveNeeded();
+ } else {
+ // Asssume that save will be needed
+ result = true;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void save(Iterable<? extends Resource> resources, IProgressMonitor monitor) throws IOException {
+ SubMonitor sub = SubMonitor.convert(monitor, Messages.UnloadDecoratorModelHandler_4, Iterables.size(resources));
+
+ for (Resource next : resources) {
+ next.save(null);
+ sub.worked(1);
+ }
+
+ sub.done();
+ }
+ }
+
+ static class ModelSetSaveHandlerImpl implements SaveHandler {
+ private final ModelSet modelSet;
+
+ ModelSetSaveHandlerImpl(ModelSet modelSet) {
+ this.modelSet = modelSet;
+ }
+
+ @Override
+ public boolean isSaveNeeded(Iterable<? extends Resource> resources) {
+ boolean result = false;
+
+ for (Resource next : resources) {
+ if (modelSet.shouldSave(next)) {
+ result = true;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public void save(Iterable<? extends Resource> resources, IProgressMonitor monitor) throws IOException {
+ // First, try to find the open editor
+ IMultiDiagramEditor editor = null;
+
+ try {
+ editor = ServiceUtilsForResourceSet.getInstance().getService(IMultiDiagramEditor.class, modelSet);
+ } catch (ServiceException e) {
+ // OK, there's no editor. That's fine
+ }
+
+ if (editor != null) {
+ editor.doSave(monitor);
+ } else {
+ // Just save the model set for consistency
+ modelSet.save(monitor);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadLoadedDecoratorModelsHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadLoadedDecoratorModelsHandler.java
new file mode 100644
index 00000000000..414907dd4f3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/commands/UnloadLoadedDecoratorModelsHandler.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.commands.AbstractHandler;
+import org.eclipse.core.commands.ExecutionEvent;
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.viewers.ISelection;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.WizardDialog;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.UnloadProfileApplicationsWizard;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.handlers.HandlerUtil;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.Sets;
+
+/**
+ * Command handler for the "Unload Decorator Models&hellip;" command.
+ */
+public class UnloadLoadedDecoratorModelsHandler extends AbstractHandler {
+
+ public UnloadLoadedDecoratorModelsHandler() {
+ super();
+ }
+
+ @Override
+ public Object execute(ExecutionEvent event) throws ExecutionException {
+ IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event).getWorkbench().getActiveWorkbenchWindow();
+ ISelection selection = HandlerUtil.getActiveMenuSelectionChecked(event);
+
+ if (selection instanceof IStructuredSelection) {
+ Package package_ = (Package) EMFHelper.getEObject(((IStructuredSelection) selection).getFirstElement());
+ Set<URI> loaded = Sets.newHashSet();
+
+ // Collect all loaded profile application resources for loaded sub-units
+ loaded.addAll(DecoratorModelUtils.getLoadedDecoratorModels(package_.eResource()));
+ for (Package subUnit : DecoratorModelUtils.getLoadedSubUnitPackages(package_)) {
+ loaded.addAll(DecoratorModelUtils.getLoadedDecoratorModels(subUnit.eResource()));
+ }
+
+ if (loaded.isEmpty()) {
+ MessageDialog.openWarning(window.getShell(), Messages.UnloadLoadedDecoratorModelsHandler_0, Messages.UnloadLoadedDecoratorModelsHandler_1);
+ } else {
+ UnloadProfileApplicationsWizard wizard = new UnloadProfileApplicationsWizard();
+ wizard.init(package_, Collections.<URI> emptySet());
+
+ WizardDialog dlg = new WizardDialog(window.getShell(), wizard);
+ dlg.open();
+ }
+ }
+
+ return null;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/expressions/PackagePropertyTester.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/expressions/PackagePropertyTester.java
new file mode 100644
index 00000000000..958c0bbe095
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/expressions/PackagePropertyTester.java
@@ -0,0 +1,134 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.expressions;
+
+import java.util.Set;
+import java.util.concurrent.Future;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.Futures;
+
+/**
+ * Tester for core-expressions properties contributed to the UML {@link Package} type.
+ */
+public class PackagePropertyTester extends PropertyTester {
+ public static final String PROPERTY_OWNS_PROFILE_APPLICATIONS = "ownsProfileApplications"; //$NON-NLS-1$
+
+ public static final String PROPERTY_HAS_EXTERNAL_PROFILE_APPLICATIONS = "hasExternalProfileApplications"; //$NON-NLS-1$
+
+ public static final String PROPERTY_IS_DECORATOR_MODEL = "isDecoratorModel"; //$NON-NLS-1$
+
+ public static final String PROPERTY_HAS_UNLOADED_DECORATOR_MODELS = "hasUnloadedDecoratorModels"; //$NON-NLS-1$
+
+ public static final String PROPERTY_HAS_LOADED_DECORATOR_MODELS = "hasLoadedDecoratorModels"; //$NON-NLS-1$
+
+ public PackagePropertyTester() {
+ super();
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ boolean result = false;
+
+ if (receiver instanceof IStructuredSelection) {
+ receiver = ((IStructuredSelection) receiver).getFirstElement();
+ } else if (receiver instanceof Iterable<?>) {
+ receiver = Iterables.getFirst((Iterable<?>) receiver, null);
+ }
+
+ receiver = EMFHelper.getEObject(receiver);
+ if (receiver instanceof Package) {
+ Package package_ = (Package) receiver;
+
+ if (PROPERTY_OWNS_PROFILE_APPLICATIONS.equals(property)) {
+ result = ownsProfileApplications(package_);
+ } else if (PROPERTY_HAS_EXTERNAL_PROFILE_APPLICATIONS.equals(property)) {
+ result = hasExternalProfileApplications(package_);
+ } else if (PROPERTY_IS_DECORATOR_MODEL.equals(property)) {
+ result = isDecoratorModel(package_);
+ } else if (PROPERTY_HAS_UNLOADED_DECORATOR_MODELS.equals(property)) {
+ result = hasUnloadedDecoratorModels(package_, args);
+ } else if (PROPERTY_HAS_LOADED_DECORATOR_MODELS.equals(property)) {
+ result = hasLoadedDecoratorModels(package_, args);
+ }
+
+ // These are all boolean properties
+ result = expectBoolean(expectedValue) == result;
+ }
+
+ return result;
+ }
+
+ private static boolean expectBoolean(Object expectedValue) {
+ return (expectedValue == null) || ((expectedValue instanceof Boolean) && ((Boolean) expectedValue).booleanValue());
+ }
+
+ static boolean ownsProfileApplications(Package receiver) {
+ return !receiver.getProfileApplications().isEmpty();
+ }
+
+ static boolean hasExternalProfileApplications(Package receiver) {
+ return !Iterables.isEmpty(DecoratorModelUtils.getDecoratorModelProfileApplications(receiver));
+ }
+
+ static boolean isDecoratorModel(Package receiver) {
+ return (receiver.getOwner() == null) && DecoratorModelUtils.hasExternalizationProfile(receiver);
+ }
+
+ static boolean hasUnloadedDecoratorModels(Package receiver, Object[] args) {
+ Set<?> options = Sets.newHashSet(args);
+ boolean recursive = options.contains("recursive"); //$NON-NLS-1$
+ boolean optimistic = options.contains("optimistic"); //$NON-NLS-1$
+
+ return hasUnloadedDecoratorModels(receiver, recursive, optimistic);
+ }
+
+ public static boolean hasUnloadedDecoratorModels(Package receiver, boolean recursive, boolean optimistic) {
+ Future<Boolean> result = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(receiver, true);
+
+ // Optimistic enablement in case the index is not yet ready. Allow for null result
+ return result.isDone() ? Boolean.TRUE.equals(Futures.getUnchecked(result)) : optimistic;
+ }
+
+ static boolean hasLoadedDecoratorModels(Package receiver, Object[] args) {
+ Set<?> options = Sets.newHashSet(args);
+ boolean recursive = options.contains("recursive"); //$NON-NLS-1$
+
+ return hasLoadedDecoratorModels(receiver, recursive);
+ }
+
+ private static boolean hasLoadedDecoratorModels(Package receiver, boolean recursive) {
+ Resource resource = receiver.eResource();
+ boolean result = !DecoratorModelUtils.getLoadedDecoratorModels(resource).isEmpty();
+
+ if (!result && recursive) {
+ for (Package next : DecoratorModelUtils.getLoadedSubUnitPackages(receiver)) {
+ result = hasLoadedDecoratorModels(next, recursive);
+ if (result) {
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/Messages.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/Messages.java
new file mode 100644
index 00000000000..21a33952bfc
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/Messages.java
@@ -0,0 +1,98 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author damus
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.messages"; //$NON-NLS-1$
+ public static String AbstractNewDecoratorModelPage_0;
+ public static String AbstractNewDecoratorModelPage_1;
+ public static String AbstractNewDecoratorModelPage_2;
+ public static String AbstractNewDecoratorModelPage_3;
+ public static String AbstractNewDecoratorModelPage_4;
+ public static String AbstractNewDecoratorModelPage_5;
+ public static String AbstractNewDecoratorModelPage_6;
+ public static String AbstractNewDecoratorModelPage_7;
+ public static String AbstractNewDecoratorModelPage_8;
+ public static String AbstractProfileApplicationSelectionPage_0;
+ public static String AbstractProfileApplicationSelectionPage_1;
+ public static String AbstractProfileApplicationSelectionPage_2;
+ public static String ConflictingDecoratorModelsPage_0;
+ public static String ConflictingDecoratorModelsPage_1;
+ public static String ConflictingDecoratorModelsPage_2;
+ public static String ConflictingDecoratorModelsPage_3;
+ public static String DecoratorModelPreferencePage_0;
+ public static String DecoratorModelPreferencePage_1;
+ public static String DecoratorModelPreferencePage_2;
+ public static String DecoratorModelPreferencePage_3;
+ public static String DecoratorModelPreferencePage_4;
+ public static String DecoratorModelSelectionPage_0;
+ public static String DecoratorModelSelectionPage_1;
+ public static String DecoratorModelSelectionPage_2;
+ public static String DecoratorModelSelectionPage_3;
+ public static String DecoratorModelSelectionPage_4;
+ public static String DecoratorModelSelectionPage_5;
+ public static String DeleteEmptyDecoratorModelsPolicy_0;
+ public static String DeleteEmptyDecoratorModelsPolicy_1;
+ public static String DeleteEmptyDecoratorModelsPolicy_2;
+ public static String DuplicateDecoratorModelPage_0;
+ public static String DuplicateDecoratorModelPage_1;
+ public static String DuplicateDecoratorModelPage_2;
+ public static String DuplicateDecoratorModelPage_3;
+ public static String DuplicateDecoratorModelPage_4;
+ public static String DuplicateDecoratorModelPage_5;
+ public static String DuplicateDecoratorModelPage_6;
+ public static String DuplicateDecoratorModelPage_7;
+ public static String DuplicateDecoratorModelWizard_0;
+ public static String DuplicateDecoratorModelWizard_1;
+ public static String DuplicateDecoratorModelWizard_2;
+ public static String ExternalizeProfileApplicationsPage_0;
+ public static String ExternalizeProfileApplicationsPage_1;
+ public static String ExternalizeProfileApplicationsPage_2;
+ public static String ExternalizeProfileApplicationsPage_3;
+ public static String ExternalizeProfileApplicationsPage_4;
+ public static String ExternalizeProfileApplicationsPage_5;
+ public static String ExternalizeProfileApplicationsWizard_0;
+ public static String InternalizeProfileApplicationsPage_0;
+ public static String InternalizeProfileApplicationsWizard_0;
+ public static String LoadDecoratorModelsPage_0;
+ public static String LoadProfileApplicationsWizard_0;
+ public static String LoadProfileApplicationsWizard_1;
+ public static String ProfileResourceLabelProvider_0;
+ public static String UnloadDecoratorModelHandler_0;
+ public static String UnloadDecoratorModelHandler_1;
+ public static String UnloadDecoratorModelHandler_2;
+ public static String UnloadDecoratorModelHandler_3;
+ public static String UnloadDecoratorModelHandler_4;
+ public static String UnloadLoadedDecoratorModelsHandler_0;
+ public static String UnloadLoadedDecoratorModelsHandler_1;
+ public static String UnloadProfileApplicationsWizard_0;
+ public static String UnloadProfileApplicationsWizard_1;
+ public static String UnloadProfileApplicationsWizard_2;
+ public static String WhenKind_0;
+ public static String WhenKind_1;
+ public static String WhenKind_2;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/messages.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/messages.properties
new file mode 100644
index 00000000000..e8819bd1fdd
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/messages/messages.properties
@@ -0,0 +1,67 @@
+AbstractNewDecoratorModelPage_0=If creating a new profile application, enter a name for it that indicates its viewpoint or purpose.
+AbstractNewDecoratorModelPage_1=Resource:
+AbstractNewDecoratorModelPage_2=Browse...
+AbstractNewDecoratorModelPage_3=Model name:
+AbstractNewDecoratorModelPage_4=profile application
+AbstractNewDecoratorModelPage_5=Not a valid resource path.
+AbstractNewDecoratorModelPage_6=No such project or folder: {0}
+AbstractNewDecoratorModelPage_7=Decorator model file extension must be "{0}"
+AbstractNewDecoratorModelPage_8=Selected resource is not a profile application.
+AbstractProfileApplicationSelectionPage_0=Profiles:
+AbstractProfileApplicationSelectionPage_1=Select &All
+AbstractProfileApplicationSelectionPage_2=&Deselect All
+ConflictingDecoratorModelsPage_0=Unload Profile Applications
+ConflictingDecoratorModelsPage_1=Unload profile applications that are no longer needed, for conflicts, or to switch perspectives.
+ConflictingDecoratorModelsPage_2=Select &Conflicts
+ConflictingDecoratorModelsPage_3=One or more profile applications must be unloaded because it applies the same profile as will be loaded.
+DecoratorModelPreferencePage_0=Profile Applications
+DecoratorModelPreferencePage_1=Options controlling how to handle externalized profile applications and the models that contain them.
+DecoratorModelPreferencePage_2=Automatically prompt to load available profile applications
+DecoratorModelPreferencePage_3=Prompt to confirm unloading conflicting profile applications
+DecoratorModelPreferencePage_4=Delete empty models when reintegrating profile applications from them
+DecoratorModelSelectionPage_0=Select Profile Applications
+DecoratorModelSelectionPage_1=Profile applications:
+DecoratorModelSelectionPage_2=Select &All
+DecoratorModelSelectionPage_3=&Deselect All
+DecoratorModelSelectionPage_4=Do not show this again
+DecoratorModelSelectionPage_5=There are no profile applications to choose from.
+DeleteEmptyDecoratorModelsPolicy_0=Delete Profile Applications
+DeleteEmptyDecoratorModelsPolicy_1=These resources no longer have any profile applications and therefore do not apply profiles any models. Delete them?
+DeleteEmptyDecoratorModelsPolicy_2=Remember my decision
+DuplicateDecoratorModelPage_0=Duplicate Profile Application
+DuplicateDecoratorModelPage_1=Enter a resource path and name for the new profile application.
+DuplicateDecoratorModelPage_2=Duplicate Profile Application
+DuplicateDecoratorModelPage_3=Select a container and file name for the new profile application.
+DuplicateDecoratorModelPage_4=File "{0}" already exists. Please choose another.
+DuplicateDecoratorModelPage_5={0} copy
+DuplicateDecoratorModelPage_6={0}Copy{1}
+DuplicateDecoratorModelPage_7=Profile application copy
+DuplicateDecoratorModelWizard_0=Duplicate Profile Application
+DuplicateDecoratorModelWizard_1=Duplicating profile application ...
+DuplicateDecoratorModelWizard_2=Failed to save profile application copy
+ExternalizeProfileApplicationsPage_0=Choose Profile Applications to Externalize
+ExternalizeProfileApplicationsPage_1=If creating a new profile application resource, enter a name for it that indicates its viewpoint or purpose.
+ExternalizeProfileApplicationsPage_2=Select Profile Application
+ExternalizeProfileApplicationsPage_3=Select an existing profile application resource or create a new one to contain the profile application(s).
+ExternalizeProfileApplicationsPage_4=Selected resource is not a profile application.
+ExternalizeProfileApplicationsPage_5=Selected resource already applies profile "{0}" to package "{1}".
+ExternalizeProfileApplicationsWizard_0=Externalize Profile Applications
+InternalizeProfileApplicationsPage_0=Choose Profile Applications to Internalize
+InternalizeProfileApplicationsWizard_0=Internalize Profile Applications
+LoadDecoratorModelsPage_0=Profile applications "{0}" and "{1}" apply the same profile to the same package.
+LoadProfileApplicationsWizard_0=Load Profile Applications
+LoadProfileApplicationsWizard_1=Select profile applications to load.
+ProfileResourceLabelProvider_0=<unknown profile>
+UnloadDecoratorModelHandler_0=Profile application resource save cancelled.
+UnloadDecoratorModelHandler_1=Failed to save profile application resource.
+UnloadDecoratorModelHandler_2=Unload Profile Applications
+UnloadDecoratorModelHandler_3=At least one profile application has changes that must be saved before it can be unloaded. OK to save?
+UnloadDecoratorModelHandler_4=Saving model...
+UnloadLoadedDecoratorModelsHandler_0=Unload Profile Applications
+UnloadLoadedDecoratorModelsHandler_1=No externalized profile applications are loaded for the selected package.
+UnloadProfileApplicationsWizard_0=Unload Profile Applications
+UnloadProfileApplicationsWizard_1=Select externalized profile applications to unload.
+UnloadProfileApplicationsWizard_2=Failed to unload profile applications.
+WhenKind_0=Always
+WhenKind_1=Never
+WhenKind_2=Prompt
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/DecoratorModelPreferencePage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/DecoratorModelPreferencePage.java
new file mode 100644
index 00000000000..63b302a4f90
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/DecoratorModelPreferencePage.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences;
+
+import org.eclipse.jface.preference.BooleanFieldEditor;
+import org.eclipse.jface.preference.FieldEditorPreferencePage;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchPreferencePage;
+
+/**
+ * Preference page UI for decorator model behaviour of the tooling.
+ */
+public class DecoratorModelPreferencePage extends FieldEditorPreferencePage implements IWorkbenchPreferencePage {
+
+ public DecoratorModelPreferencePage() {
+ super(Messages.DecoratorModelPreferencePage_0, GRID);
+
+ setPreferenceStore(Activator.getDefault().getPreferenceStore());
+ setDescription(Messages.DecoratorModelPreferencePage_1);
+ }
+
+ @Override
+ public void init(IWorkbench workbench) {
+ // Pass
+ }
+
+ @Override
+ protected void createFieldEditors() {
+ addField(new BooleanFieldEditor(ProfileExternalizationUIPreferences.AUTO_PROMPT_TO_LOAD_PROFILE_APPLICATIONS, Messages.DecoratorModelPreferencePage_2, getFieldEditorParent()));
+ addField(new BooleanFieldEditor(ProfileExternalizationUIPreferences.PROMPT_TO_UNLOAD_CONFLICTING_DECORATOR_MODELS, Messages.DecoratorModelPreferencePage_3, getFieldEditorParent()));
+ addField(WhenKind.createFieldEditor(ProfileExternalizationUIPreferences.DELETE_EMPTY_DECORATOR_MODELS, Messages.DecoratorModelPreferencePage_4, getFieldEditorParent()));
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/ProfileExternalizationUIPreferences.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/ProfileExternalizationUIPreferences.java
new file mode 100644
index 00000000000..a4c341857f1
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/ProfileExternalizationUIPreferences.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences;
+
+import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
+import org.eclipse.jface.preference.IPreferenceStore;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+
+/**
+ * Preferences for the behaviour of the profile externalization tooling UI.
+ */
+public class ProfileExternalizationUIPreferences extends AbstractPreferenceInitializer {
+ static final String AUTO_PROMPT_TO_LOAD_PROFILE_APPLICATIONS = "autoPromptToLoadProfileApplications"; //$NON-NLS-1$
+
+ static final String PROMPT_TO_UNLOAD_CONFLICTING_DECORATOR_MODELS = "promptToUnloadConflicts"; //$NON-NLS-1$
+
+ static final String DELETE_EMPTY_DECORATOR_MODELS = "deleteEmptyDecoratorModels"; //$NON-NLS-1$
+
+
+ public ProfileExternalizationUIPreferences() {
+ super();
+ }
+
+ static IPreferenceStore getStore() {
+ return Activator.getDefault().getPreferenceStore();
+ }
+
+ public static void setAutoPromptToLoadProfileApplications(boolean autoPrompt) {
+ getStore().setValue(AUTO_PROMPT_TO_LOAD_PROFILE_APPLICATIONS, autoPrompt);
+ }
+
+ public static boolean getAutoPromptToLoadProfileApplications() {
+ return getStore().getBoolean(AUTO_PROMPT_TO_LOAD_PROFILE_APPLICATIONS);
+ }
+
+ public static void setPromptToUnloadConflicts(boolean prompt) {
+ getStore().setValue(PROMPT_TO_UNLOAD_CONFLICTING_DECORATOR_MODELS, prompt);
+ }
+
+ public static boolean getPromptToUnloadConflicts() {
+ return getStore().getBoolean(PROMPT_TO_UNLOAD_CONFLICTING_DECORATOR_MODELS);
+ }
+
+ public static void setDeleteEmptyDecoratorModels(WhenKind when) {
+ getStore().setValue(DELETE_EMPTY_DECORATOR_MODELS, when.name());
+ }
+
+ public static WhenKind getDeleteEmptyDecoratorModels() {
+ return WhenKind.valueOf(getStore().getString(DELETE_EMPTY_DECORATOR_MODELS));
+ }
+
+ @Override
+ public void initializeDefaultPreferences() {
+ getStore().setDefault(AUTO_PROMPT_TO_LOAD_PROFILE_APPLICATIONS, true);
+ getStore().setDefault(PROMPT_TO_UNLOAD_CONFLICTING_DECORATOR_MODELS, true);
+ getStore().setDefault(DELETE_EMPTY_DECORATOR_MODELS, WhenKind.PROMPT.name());
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/WhenKind.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/WhenKind.java
new file mode 100644
index 00000000000..eedf7103cc8
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/preferences/WhenKind.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences;
+
+import org.eclipse.jface.preference.FieldEditor;
+import org.eclipse.jface.preference.RadioGroupFieldEditor;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.swt.widgets.Composite;
+
+/**
+ * An enumeration of possible settings of "when" type preferences.
+ */
+public enum WhenKind {
+ PROMPT, NEVER, ALWAYS;
+
+ public static FieldEditor createFieldEditor(String preferenceName, String labelText, Composite parent) {
+ return new RadioGroupFieldEditor(preferenceName, labelText, 3, //
+ new String[][] { { Messages.WhenKind_0, ALWAYS.name() }, { Messages.WhenKind_1, NEVER.name() }, { Messages.WhenKind_2, PROMPT.name() } }, //
+ parent);
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/AvailableDecoratorModelsSnippet.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/AvailableDecoratorModelsSnippet.java
new file mode 100644
index 00000000000..29d15e012aa
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/AvailableDecoratorModelsSnippet.java
@@ -0,0 +1,169 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers;
+
+import java.util.concurrent.Executor;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.IModelSetSnippet;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ResourceAdapter;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
+import org.eclipse.papyrus.infra.tools.util.UIUtil;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.LoadAvailableDecoratorModelsHandler;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.ProfileExternalizationUIPreferences;
+import org.eclipse.papyrus.uml.profile.service.ReapplyProfilesService;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+
+/**
+ * A {@link ModelSet} snippet that intercepts loading of resources to optionally prompt the user to load available profile applications.
+ */
+public class AvailableDecoratorModelsSnippet extends ResourceAdapter implements IModelSetSnippet {
+ private static final String EDITOR_SERVICE_ID = IMultiDiagramEditor.class.getName();
+
+ private Executor profileRefreshExecutor;
+
+ private ModelSet modelSet;
+
+ public AvailableDecoratorModelsSnippet() {
+ super();
+ }
+
+ @Override
+ public void start(ModelSet modelsManager) {
+ this.modelSet = modelsManager;
+ addAdapter(modelsManager);
+ profileRefreshExecutor = UIUtil.createAsyncOnceExecutor();
+ }
+
+ @Override
+ public void dispose(ModelSet modelsManager) {
+ if (modelsManager == modelSet) {
+ profileRefreshExecutor = null;
+ removeAdapter(modelsManager);
+ modelSet = null;
+ }
+ }
+
+ @Override
+ protected void handleResourceLoaded(Resource resource) {
+ final Package package_ = (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE);
+ if (package_ != null) {
+ // Check whether to prompt for loading available decorator models
+ if (isPromptEnabled()) {
+ // Only prompt for resources in this user model
+ Resource root = EcoreUtil.getRootContainer(package_).eResource();
+ if (modelSet.getURIWithoutExtension().equals(root.getURI().trimFileExtension())) {
+ // Schedule a call-back on the UI thread to prompt if there are unloaded profile applications available
+ Futures.addCallback(DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(package_, false), //
+ promptToLoadDecoratorModels(package_), Activator.getDefault().getExecutorService());
+ }
+ }
+
+ // Maybe a decorator model was loaded? Check for profile migration. Note that we don't
+ // need to invoke profile refresh when loading/discovering resources on first opening
+ // the editor because the editor already does that
+ if (DecoratorModelUtils.isDecoratorModel(resource) && (profileRefreshExecutor != null)) {
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ final Package rootPackage = (uml == null) ? null : (Package) EcoreUtil.getObjectByType(uml.getResource().getContents(), UMLPackage.Literals.PACKAGE);
+ if (rootPackage != null) {
+ profileRefreshExecutor.execute(new Runnable() {
+
+ @Override
+ public void run() {
+ // Check that the editor wasn't closed in the mean-time
+ if (modelSet != null) {
+ refreshProfiles(rootPackage);
+ }
+ }
+ });
+ }
+ }
+ }
+ }
+
+ boolean isPromptEnabled() {
+ boolean result = false;
+
+ if (ProfileExternalizationUIPreferences.getAutoPromptToLoadProfileApplications()) {
+ // Even so, only prompt if opening in an editor
+ try {
+ ServicesRegistry services = ServiceUtilsForResourceSet.getInstance().getServiceRegistry(modelSet);
+ result = (services != null) && services.isStarted(EDITOR_SERVICE_ID);
+
+ if (result) {
+ // And then only if the editor is not open on a decorator model!
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ Resource mainResource = (uml == null) ? null : uml.getResource();
+ result = (mainResource == null) || !DecoratorModelUtils.isDecoratorModel(mainResource);
+ }
+ } catch (ServiceException e) {
+ // That's fine. If there's no editor, then it can't be opening
+ }
+ }
+
+ return result;
+ }
+
+ static boolean isLoadedAndAttached(EObject object) {
+ return !object.eIsProxy() && (object.eResource() != null);
+ }
+
+ private FutureCallback<Boolean> promptToLoadDecoratorModels(final Package package_) {
+ return new FutureCallback<Boolean>() {
+ @Override
+ public void onSuccess(Boolean result) {
+ if (result && isLoadedAndAttached(package_)) {
+ // Still loaded and attached
+ IWorkbenchWindow window = Activator.getActiveWorkbenchWindow();
+ if (window != null) {
+ LoadAvailableDecoratorModelsHandler.promptToLoadAvailableProfileApplications(window.getShell(), package_, true);
+ }
+ }
+ }
+
+ @Override
+ public void onFailure(Throwable t) {
+ // Don't prompt anything
+ }
+ };
+ }
+
+ protected void refreshProfiles(Package rootPackage) {
+ ReapplyProfilesService reapplyProfiles;
+ try {
+ reapplyProfiles = ServiceUtilsForEObject.getInstance().getService(ReapplyProfilesService.class, rootPackage);
+ } catch (ServiceException ex) {
+ return;
+ }
+
+ reapplyProfiles.checkProfiles();
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java
new file mode 100644
index 00000000000..3b1c91c837f
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelDecorator.java
@@ -0,0 +1,192 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.BaseLabelProvider;
+import org.eclipse.jface.viewers.IDecoration;
+import org.eclipse.jface.viewers.ILightweightLabelDecorator;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.infra.onefile.model.IPapyrusFile;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.ui.ide.IDE;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * Label decorator for packages to indicate availability of externalized profile applications, decorator models loaded for a package, etc.
+ */
+public class DecoratorModelLabelDecorator extends BaseLabelProvider implements ILightweightLabelDecorator {
+
+ public DecoratorModelLabelDecorator() {
+ super();
+ }
+
+ @Override
+ public void decorate(Object element, IDecoration decoration) {
+ EObject eObject = EMFHelper.getEObject(element);
+
+ if ((eObject instanceof Package) && (eObject.eResource() != null)) {
+ decoratePackage((Package) eObject, decoration);
+ } else if (element instanceof IFile) {
+ decorateFile((IFile) element, decoration);
+ } else if (element instanceof IPapyrusFile) {
+ decorateFile((IPapyrusFile) element, decoration);
+ }
+ }
+
+ private void decorateFile(IFile file, IDecoration decoration) {
+ IContentType type = IDE.getContentType(file);
+ if ((type != null) && type.isKindOf(DecoratorModelUtils.DECORATOR_MODEL_CONTENT_TYPE)) {
+ addOverlay(decoration);
+ }
+ }
+
+ private void decorateFile(IPapyrusFile file, IDecoration decoration) {
+ for (IResource resource : file.getAssociatedResources()) {
+ if (resource.getType() == IResource.FILE) {
+ IContentType type = IDE.getContentType((IFile) resource);
+ if ((type != null) && type.isKindOf(DecoratorModelUtils.DECORATOR_MODEL_CONTENT_TYPE)) {
+ addOverlay(decoration);
+ break;
+ }
+ }
+ }
+ }
+
+ private void addOverlay(IDecoration decoration) {
+ decoration.addOverlay(Activator.getDefault().getIcon("full/ovr16/profileApps.png"), IDecoration.TOP_RIGHT); //$NON-NLS-1$
+ }
+
+ private void decoratePackage(Package package_, IDecoration decoration) {
+ // Root packages only, because the presentation of decorator models to display is recursive over controlled units.
+ // Also exclude any packages that are decorated by the main model if the main model is a decorator model
+ if ((package_.eContainer() == null) && !isUserOpenedDecoratorModel(package_)) {
+ if (!decoratePackageIcon(package_, decoration)) {
+ // Short-circuit the rest of the decoration of this package because we'll be revisiting it
+ return;
+ }
+ }
+
+ decoratePackageText(package_, decoration);
+ }
+
+ /**
+ * Is the given package the root of a model that is decorated by a decorator model opened as the main UML model of the model-set?
+ */
+ private static boolean isUserOpenedDecoratorModel(Package package_) {
+ boolean result = false;
+
+ ResourceSet rset = EMFHelper.getResourceSet(package_);
+ if (rset instanceof ModelSet) {
+ UmlModel uml = (UmlModel) ((ModelSet) rset).getModel(UmlModel.MODEL_ID);
+ if (uml != null) {
+ Resource main = uml.getResource();
+ if (DecoratorModelUtils.isDecoratorModel(main)) {
+ if (DecoratorModelUtils.isDecoratorModelFor(main, package_.eResource())) {
+ result = true;
+ } else {
+ for (Package next : DecoratorModelUtils.getLoadedSubUnitPackages(package_)) {
+ if (DecoratorModelUtils.isDecoratorModelFor(main, next.eResource())) {
+ result = true;
+ break;
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private boolean decoratePackageIcon(Package package_, IDecoration decoration) {
+ boolean result = false;
+
+ ListenableFuture<Boolean> hasUnloadedDecoratorModels = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(package_, true);
+ if (hasUnloadedDecoratorModels.isDone()) {
+ result = true;
+ if (Futures.getUnchecked(hasUnloadedDecoratorModels)) {
+ addOverlay(decoration);
+ }
+ result = true;
+ } else {
+ hasUnloadedDecoratorModels.addListener(postUpdate(package_), Activator.getDefault().getExecutorService());
+ }
+
+ return result;
+ }
+
+ private void decoratePackageText(Package package_, IDecoration decoration) {
+ // Decorate packages with a suffix listing the loaded profile application model names
+ Set<Package> profileApplicationModels = null;
+ for (ProfileApplication profileApplication : DecoratorModelUtils.getDecoratorModelProfileApplications(package_)) {
+ if (profileApplicationModels == null) {
+ profileApplicationModels = Sets.newLinkedHashSet();
+ }
+ profileApplicationModels.add((Package) EcoreUtil.getRootContainer(profileApplication));
+ }
+ if (profileApplicationModels != null) {
+ StringBuilder suffix = new StringBuilder();
+
+ for (Package next : profileApplicationModels) {
+ if (suffix.length() == 0) {
+ suffix.append(" ("); //$NON-NLS-1$
+ } else {
+ suffix.append(", "); //$NON-NLS-1$
+ }
+
+ String modelName = next.getName();
+ if (modelName == null) {
+ modelName = next.eResource().getURI().trimFileExtension().lastSegment();
+ }
+ suffix.append(modelName);
+ }
+
+ if (suffix.length() > 0) {
+ suffix.append(")"); //$NON-NLS-1$
+ }
+
+ if (suffix.length() > 0) {
+ decoration.addSuffix(suffix.toString());
+ }
+ }
+ }
+
+ private Runnable postUpdate(final Object element) {
+ return new Runnable() {
+
+ @Override
+ public void run() {
+ fireLabelProviderChanged(new LabelProviderChangedEvent(DecoratorModelLabelDecorator.this, element));
+ }
+ };
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java
new file mode 100644
index 00000000000..3944aefdee3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/DecoratorModelLabelProvider.java
@@ -0,0 +1,185 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers;
+
+import java.util.Collections;
+import java.util.Map;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.LabelProviderChangedEvent;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.papyrus.infra.widgets.providers.DelegatingStyledLabelProvider;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndexEvent;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.IDecoratorModelIndexListener;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * A label provider for presentation of decorator model {@link IFile}s or {@link Resource}s in the UI.
+ */
+public class DecoratorModelLabelProvider extends DelegatingStyledLabelProvider implements IDecoratorModelIndexListener {
+ private final ResourceSet resourceSet;
+
+ private volatile Map<URI, String> modelNames;
+
+ public DecoratorModelLabelProvider(ResourceSet resourceSet) {
+ super(new WorkbenchLabelProvider());
+
+ this.resourceSet = resourceSet;
+ DecoratorModelIndex.getInstance().addIndexListener(this);
+ }
+
+ public DecoratorModelLabelProvider() {
+ this(null);
+ }
+
+ @Override
+ public void dispose() {
+ DecoratorModelIndex.getInstance().removeIndexListener(this);
+
+ super.dispose();
+ }
+
+ @Override
+ protected Image customGetImage(Object element) {
+ Image result = null;
+
+ if (element instanceof Resource) {
+ element = ((Resource) element).getURI();
+ }
+ if (element instanceof URI) {
+ URI uri = (URI) element;
+ if (uri.isPlatformResource()) {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)));
+ result = delegatedGetImage(file);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public StyledString customGetStyledText(Object element) {
+ return (element instanceof IFile) ? getStyledText((IFile) element) //
+ : (element instanceof Resource) ? getStyledText((Resource) element) //
+ : (element instanceof URI) ? getStyledText((URI) element) //
+ : null;
+ }
+
+ protected StyledString getStyledText(Resource resource) {
+ Package model = resource.isLoaded() ? (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE) : null;
+
+ String modelName;
+
+ if (model == null) {
+ modelName = getModelNames().get(resource.getURI());
+ } else {
+ modelName = model.getName();
+ }
+
+ return getStyledText(modelName, resource.getURI());
+ }
+
+ protected StyledString getStyledText(String modelName, URI uri) {
+ StyledString result = new StyledString();
+ result.append(modelName);
+
+ String qualifier = uri.isPlatformResource() ? uri.toPlatformString(true) : uri.toString();
+ result.append(" - " + qualifier, StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+
+ return result;
+ }
+
+ protected StyledString getStyledText(IFile file) {
+ URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+
+ return getStyledText(uri);
+ }
+
+ protected StyledString getStyledText(URI uri) {
+ StyledString result;
+
+ // Get the actual current loaded model name if loaded, otherwise from the index
+ Resource resource = (resourceSet != null) ? resourceSet.getResource(uri, false) : null;
+ if (resource != null) {
+ result = getStyledText(resource);
+ } else {
+ String modelName = getModelNames().get(uri);
+ if (modelName == null) {
+ modelName = uri.trimFileExtension().lastSegment();
+ }
+ result = getStyledText(modelName, uri);
+ }
+
+ return result;
+ }
+
+ protected synchronized final Map<URI, String> getModelNames() {
+ if (modelNames == null) {
+ final ListenableFuture<Map<URI, String>> futureModelNames = DecoratorModelIndex.getInstance().getDecoratorModelNamesAsync();
+
+ if (futureModelNames.isDone()) {
+ // Get it now
+ modelNames = Futures.getUnchecked(futureModelNames);
+ } else {
+ futureModelNames.addListener(new Runnable() {
+
+ @Override
+ public void run() {
+ synchronized (DecoratorModelLabelProvider.this) {
+ modelNames = Futures.getUnchecked(futureModelNames);
+ if (modelNames == null) {
+ // Oh, well
+ modelNames = Collections.emptyMap();
+ } else {
+ // Update the labels now
+ updateLabels();
+ }
+ }
+ }
+ }, Activator.getDefault().getExecutorService());
+ }
+
+ if (modelNames == null) {
+ // Placeholder until the future result is ready
+ modelNames = Collections.emptyMap();
+ }
+ }
+
+ return modelNames;
+ }
+
+ @Override
+ public void indexChanged(DecoratorModelIndexEvent event) {
+ modelNames = null;
+ updateLabels();
+ }
+
+ protected void updateLabels() {
+ fireLabelProviderChanged(new LabelProviderChangedEvent(this));
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/EncapsulatedAdapterFactoryLabelProvider.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/EncapsulatedAdapterFactoryLabelProvider.java
new file mode 100644
index 00000000000..5ba483efae2
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/EncapsulatedAdapterFactoryLabelProvider.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers;
+
+import org.eclipse.emf.edit.provider.ComposedAdapterFactory;
+import org.eclipse.emf.edit.ui.provider.AdapterFactoryLabelProvider;
+import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * @author damus
+ *
+ */
+public class EncapsulatedAdapterFactoryLabelProvider extends AdapterFactoryLabelProvider {
+ public EncapsulatedAdapterFactoryLabelProvider() {
+ super(new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE));
+ }
+
+ @Override
+ public void dispose() {
+ try {
+ super.dispose();
+ } finally {
+ ((ComposedAdapterFactory) getAdapterFactory()).dispose();
+ }
+ }
+
+ @Override
+ public String getText(Object element) {
+ return super.getText(unwrap(element));
+ }
+
+ @Override
+ public Image getImage(Object element) {
+ return super.getImage(unwrap(element));
+ }
+
+ Object unwrap(Object element) {
+ return element;
+ }
+
+ public static ILabelProvider appliedProfiles() {
+ return new EncapsulatedAdapterFactoryLabelProvider() {
+ @Override
+ Object unwrap(Object element) {
+ if (element instanceof ProfileApplication) {
+ element = ((ProfileApplication) element).getAppliedProfile();
+ }
+ return element;
+ }
+ };
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java
new file mode 100644
index 00000000000..7edcfcd371c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/providers/ProfileResourceLabelProvider.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.StyledString;
+import org.eclipse.papyrus.infra.widgets.providers.DelegatingStyledLabelProvider;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.extensionpoints.Registry;
+import org.eclipse.papyrus.uml.extensionpoints.profile.IRegisteredProfile;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.model.WorkbenchLabelProvider;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A label provider for presentation of decorator model {@link IFile}s or {@link Resource}s in the UI.
+ */
+public class ProfileResourceLabelProvider extends DelegatingStyledLabelProvider {
+ private final ResourceSet resourceSet;
+
+ public ProfileResourceLabelProvider(ResourceSet resourceSet) {
+ super(new WorkbenchLabelProvider());
+
+ this.resourceSet = resourceSet;
+ }
+
+ @Override
+ protected Image customGetImage(Object element) {
+ Image result = null;
+
+ if (element instanceof Resource) {
+ element = ((Resource) element).getURI();
+ }
+ if (element instanceof URI) {
+ URI uri = (URI) element;
+ IRegisteredProfile registered = getRegisteredProfile(uri);
+ if (registered != null) {
+ result = registered.getImage();
+ } else if (uri.isPlatformResource()) {
+ IResource file = !uri.isPlatformResource() ? null : ResourcesPlugin.getWorkspace().getRoot().findMember(uri.toPlatformString(true));
+ result = delegatedGetImage(file);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public StyledString customGetStyledText(Object element) {
+ return (element instanceof IFile) ? getStyledText((IFile) element) //
+ : (element instanceof Resource) ? getStyledText((Resource) element) //
+ : (element instanceof URI) ? getStyledText((URI) element) //
+ : null;
+ }
+
+ protected StyledString getStyledText(Resource resource) {
+ StyledString result;
+
+ URI uri = resource.getURI();
+ Package model = resource.isLoaded() ? (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE) : null;
+ if (model == null) {
+ result = getStyledText(uri);
+ } else if (uri.isPlatformResource()) {
+ result = new StyledString();
+ result.append(model.getName());
+
+ String qualifier = uri.isPlatformResource() ? uri.toPlatformString(true) : uri.toString();
+ result.append(" - " + qualifier, StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+ } else {
+ result = getStyledText(model.getName(), resource.getURI());
+ }
+
+ return result;
+ }
+
+ protected StyledString getStyledText(String modelName, URI uri) {
+ StyledString result = new StyledString();
+ result.append(modelName);
+
+ String qualifier = uri.isPlatformResource() ? uri.toPlatformString(true) : uri.toString();
+ result.append(" - " + qualifier, StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+
+ return result;
+ }
+
+ protected StyledString getStyledText(IFile file) {
+ StyledString result = new StyledString();
+
+ IPath path = file.getFullPath().removeFileExtension();
+ result.append(path.lastSegment());
+ result.append(" - " + path.removeLastSegments(1).toString(), StyledString.QUALIFIER_STYLER); //$NON-NLS-1$
+
+ return result;
+ }
+
+ protected IRegisteredProfile getRegisteredProfile(URI uri) {
+ IRegisteredProfile result = null;
+ for (IRegisteredProfile next : Registry.getRegisteredProfiles()) {
+ if (uri.equals(next.getUri())) {
+ result = next;
+ break;
+ }
+ }
+ return result;
+ }
+
+ protected StyledString getStyledText(URI uri) {
+ StyledString result;
+
+ IRegisteredProfile registered = getRegisteredProfile(uri);
+
+ if (registered != null) {
+ result = getStyledText(registered.getName(), uri);
+ } else {
+ Resource resource = (resourceSet == null) ? null : resourceSet.getResource(uri, false);
+ if ((resource != null) && resource.isLoaded()) {
+ result = getStyledText(resource);
+ } else {
+ IResource file = !uri.isPlatformResource() ? null : ResourcesPlugin.getWorkspace().getRoot().findMember(uri.toPlatformString(true));
+ if (file instanceof IFile) {
+ result = getStyledText((IFile) file);
+ } else {
+ result = getStyledText(Messages.ProfileResourceLabelProvider_0, uri);
+ }
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractManageProfileApplicationsWizard.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractManageProfileApplicationsWizard.java
new file mode 100644
index 00000000000..0227974cc86
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractManageProfileApplicationsWizard.java
@@ -0,0 +1,168 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.IWizardPage;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Sets;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * @author damus
+ *
+ */
+abstract class AbstractManageProfileApplicationsWizard extends Wizard implements IWorkbenchWizard {
+
+ private final boolean autoPrompt;
+
+ private Package package_;
+
+ private Set<URI> availableResources;
+
+ private IFile[] selectedResources;
+
+ private DecoratorModelSelectionPage mainPage;
+
+ public AbstractManageProfileApplicationsWizard(boolean autoPrompt) {
+ super();
+
+ this.autoPrompt = autoPrompt;
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ EObject eObject = EMFHelper.getEObject(selection.getFirstElement());
+ if (eObject instanceof Package) {
+ init((Package) eObject, Collections.<URI> emptyList());
+ }
+ }
+
+ public void init(Package package_, Iterable<URI> initialSelections) {
+ this.package_ = package_;
+ this.availableResources = getAvailableProfileApplicationResources(package_);
+
+ EventBus bus = new EventBus("wizard"); //$NON-NLS-1$
+ bus.register(this);
+ createPages(package_, bus);
+ initPages(package_, ImmutableList.copyOf(initialSelections));
+ }
+
+ protected void createPages(Package package_, EventBus bus) {
+ mainPage = createSelectionPage(bus);
+ mainPage.setIsAutomaticPrompt(isAutoPrompt());
+ configureSelectionPage(mainPage);
+ }
+
+ protected void initPages(Package package_, Iterable<URI> initialSelections) {
+ mainPage.setInput(package_, availableResources);
+ mainPage.select(initialSelections);
+ }
+
+ @Override
+ public void addPages() {
+ addPage(mainPage);
+ }
+
+ @Override
+ public IWizardPage getStartingPage() {
+ IWizardPage result = super.getStartingPage();
+
+ if ((mainPage != null) && mainPage.canFlipToNextPage()) {
+ result = mainPage.getNextPage();
+ }
+
+ return result;
+ }
+
+ protected DecoratorModelSelectionPage createSelectionPage(EventBus bus) {
+ return new DecoratorModelSelectionPage(bus);
+ }
+
+ protected void configureSelectionPage(DecoratorModelSelectionPage page) {
+ // Pass
+ }
+
+ protected boolean isAutoPrompt() {
+ return autoPrompt;
+ }
+
+ abstract Set<URI> getAvailableProfileApplicationResources(Package package_);
+
+ protected IDialogSettings getSection(String sectionName, boolean createIfNecessary) {
+ IDialogSettings settings = Activator.getDefault().getDialogSettings().getSection(getClass().getSimpleName());
+ if ((settings == null) && createIfNecessary) {
+ settings = Activator.getDefault().getDialogSettings().addNewSection(getClass().getSimpleName());
+ }
+
+ IDialogSettings result = (settings == null) ? null : settings.getSection(sectionName);
+ if ((result == null) && createIfNecessary) {
+ result = settings.addNewSection(sectionName);
+ }
+
+ return result;
+ }
+
+ protected IDialogSettings getSection(IDialogSettings settings, String sectionName, boolean createIfNecessary) {
+ IDialogSettings result = settings.getSection(sectionName);
+ if ((result == null) && createIfNecessary) {
+ result = settings.addNewSection(sectionName);
+ }
+
+ return result;
+ }
+
+ @Subscribe
+ public void resourcesSelected(IFile[] resources) {
+ this.selectedResources = resources;
+ }
+
+ public boolean isComplete() {
+ return (mainPage != null) && mainPage.isPageComplete();
+ }
+
+ protected final Package getPackage() {
+ return package_;
+ }
+
+ @Override
+ public boolean performFinish() {
+ final ResourceSet resourceSet = getPackage().eResource().getResourceSet();
+
+ final Set<URI> resourceURIs = Sets.newHashSet();
+ for (IFile next : selectedResources) {
+ resourceURIs.add(URI.createPlatformResourceURI(next.getFullPath().toString(), true));
+ }
+
+ return performFinish(resourceSet, resourceURIs);
+ }
+
+ protected abstract boolean performFinish(ResourceSet resourceSet, Set<URI> resourceURIs);
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractNewDecoratorModelPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractNewDecoratorModelPage.java
new file mode 100644
index 00000000000..80da8761be7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractNewDecoratorModelPage.java
@@ -0,0 +1,205 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import org.eclipse.core.resources.IContainer;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.ui.dialogs.WorkspaceResourceDialog;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.ModifyEvent;
+import org.eclipse.swt.events.ModifyListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Text;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+/**
+ * @author damus
+ *
+ */
+public abstract class AbstractNewDecoratorModelPage<I, P> extends AbstractProfileApplicationSelectionPage<I, P> {
+ private static final String FILE_EXTENSION_SETTING = "fileExtension"; //$NON-NLS-1$
+
+ private Text resourceText;
+
+ private Text modelNameText;
+
+ private String modelName;
+
+ public AbstractNewDecoratorModelPage(String name, String title, ImageDescriptor icon, Class<P> elementType) {
+ super(name, title, icon, elementType);
+
+ setMessage(Messages.AbstractNewDecoratorModelPage_0);
+ }
+
+ @Override
+ protected int getLayoutColumnCount() {
+ return 3;
+ }
+
+ @Override
+ protected void createAdditionalContents(Composite mainArea) {
+ lead(label(mainArea, Messages.AbstractNewDecoratorModelPage_1), 15);
+ resourceText = new Text(mainArea, SWT.SINGLE | SWT.BORDER);
+ lead(fill(resourceText, true, false), 15);
+ resourceText.setText(defaultResource(getInput()));
+ resourceText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ validatePage();
+ }
+ });
+
+ Button browse = lead(button(mainArea, Messages.AbstractNewDecoratorModelPage_2), 15);
+ browse.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ browseResource();
+ }
+ });
+
+ label(mainArea, Messages.AbstractNewDecoratorModelPage_3);
+ modelNameText = new Text(mainArea, SWT.SINGLE | SWT.BORDER);
+ span(fill(modelNameText, true, false), 2);
+ modelName = defaultModelName(getInput());
+ modelNameText.addModifyListener(new ModifyListener() {
+
+ @Override
+ public void modifyText(ModifyEvent e) {
+ // Don't capture changes while disabled so that we can restore the user's text
+ if (modelNameText.isEnabled()) {
+ modelName = modelNameText.getText();
+ validatePage();
+ }
+ }
+ });
+ }
+
+ public URI getResourceURI() {
+ String resourcePath = resourceText.getText().trim();
+ return (resourcePath.length() > 0) ? URI.createPlatformResourceURI(resourcePath, true) : null;
+ }
+
+ protected String defaultModelName(I input) {
+ return Messages.AbstractNewDecoratorModelPage_4;
+ }
+
+ public String getModelName() {
+ return modelNameText.getText();
+ }
+
+ protected abstract void browseResource();
+
+ protected void browseResource(String title, String message) {
+ IFile file = WorkspaceResourceDialog.openNewFile(getShell(), title, message, new Path(resourceText.getText().trim()), null);
+ if (file != null) {
+ resourceText.setText(file.getFullPath().toString());
+ }
+ }
+
+ @Override
+ protected void validatePage() {
+ setErrorMessage(null);
+
+ URI resourceURI = getResourceURI();
+ if (resourceURI == null) {
+ setPageComplete(false);
+ } else if (!resourceURI.isPlatformResource()) {
+ setErrorMessage(Messages.AbstractNewDecoratorModelPage_5);
+ setPageComplete(false);
+ } else {
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(resourceURI.toPlatformString(true)));
+ IContainer container = file.getParent();
+
+ if (!container.exists()) {
+ setErrorMessage(NLS.bind(Messages.AbstractNewDecoratorModelPage_6, container.getFullPath().toString()));
+ setPageComplete(false);
+ } else if (!UmlModel.UML_FILE_EXTENSION.equals(resourceURI.fileExtension())) {
+ setErrorMessage(NLS.bind(Messages.AbstractNewDecoratorModelPage_7, UmlModel.UML_FILE_EXTENSION));
+ setPageComplete(false);
+ } else {
+ if (file.exists()) {
+ modelNameText.setEnabled(false);
+
+ String message = validateExistingFile(file);
+ if (message != null) {
+ setErrorMessage(message);
+ setPageComplete(false);
+ } else if (!DecoratorModelUtils.isDecoratorModel(getResourceURI())) {
+ setErrorMessage(Messages.AbstractNewDecoratorModelPage_8);
+ setPageComplete(false);
+ } else {
+ try {
+ modelNameText.setText(DecoratorModelIndex.getInstance().getDecoratorModelName(getResourceURI()));
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ StatusManager.getManager().handle(e.getStatus(), StatusManager.SHOW);
+ }
+ super.validatePage();
+ }
+ } else {
+ // Restore the user's input
+ if (!modelNameText.getText().equals(modelName)) {
+ modelNameText.setText(modelName);
+ }
+ modelNameText.setEnabled(true);
+ super.validatePage();
+ }
+ }
+ }
+ }
+
+ protected String validateExistingFile(IFile file) {
+ return null;
+ }
+
+ protected String getFileExtension() {
+ String result = getDialogSettings().get(FILE_EXTENSION_SETTING);
+ if (result == null) {
+ result = "profileapp.uml"; //$NON-NLS-1$
+ }
+ return result;
+ }
+
+ void saveSettings() {
+ URI uri = getResourceURI();
+ if (uri != null) {
+ String fileExtension = uri.fileExtension();
+ uri = uri.trimFileExtension();
+
+ while (uri.fileExtension() != null) {
+ fileExtension = String.format("%s.%s", uri.fileExtension(), fileExtension); //$NON-NLS-1$
+ uri = uri.trimFileExtension();
+ }
+
+ getDialogSettings().put(FILE_EXTENSION_SETTING, fileExtension);
+ }
+ }
+
+ protected abstract String defaultResource(I input);
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationSelectionPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationSelectionPage.java
new file mode 100644
index 00000000000..95ca65ec091
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationSelectionPage.java
@@ -0,0 +1,227 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.List;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Label;
+import org.eclipse.swt.widgets.Table;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+
+/**
+ * @author damus
+ *
+ */
+abstract class AbstractProfileApplicationSelectionPage<I, P> extends WizardPage {
+
+ private final Class<P> elementType;
+
+ private CheckboxTableViewer profilesTable;
+
+ private I input;
+
+ private List<P> initialSelections;
+
+ public AbstractProfileApplicationSelectionPage(String name, String title, ImageDescriptor icon, Class<P> elementType) {
+ super(name, title, icon);
+
+ this.elementType = elementType;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ Composite main = new Composite(parent, SWT.NONE);
+
+ final int layoutCols = getLayoutColumnCount();
+ main.setLayout(new GridLayout(layoutCols, false));
+
+ span(label(main, Messages.AbstractProfileApplicationSelectionPage_0), layoutCols);
+
+ profilesTable = new CheckboxTableViewer(new Table(main, SWT.CHECK | SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER));
+ span(fill(profilesTable.getTable(), true, true), layoutCols);
+ profilesTable.setContentProvider(createProfilesContentProvider());
+ profilesTable.setLabelProvider(createProfilesLabelProvider());
+ profilesTable.setComparator(new ViewerComparator());
+ profilesTable.setInput(getInput());
+ checkInitialSelections(profilesTable, initialSelections);
+
+ profilesTable.addCheckStateListener(new ICheckStateListener() {
+
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ validatePage();
+ }
+ });
+
+ createSelectionButtons(main);
+
+ createAdditionalContents(main);
+
+ setControl(main);
+
+ validatePage();
+ }
+
+ protected void checkInitialSelections(CheckboxTableViewer table, Collection<P> initialSelections) {
+ if (initialSelections != null) {
+ table.setCheckedElements(initialSelections.toArray());
+ }
+ }
+
+ protected int getLayoutColumnCount() {
+ return 2;
+ }
+
+ protected void createAdditionalContents(Composite mainArea) {
+ // Pass
+ }
+
+ public void setInput(I input) {
+ this.input = input;
+
+ if (profilesTable != null) {
+ profilesTable.setInput(input);
+ }
+ }
+
+ public I getInput() {
+ return input;
+ }
+
+ public void select(Iterable<P> profileApplications) {
+ this.initialSelections = ImmutableList.copyOf(profileApplications);
+
+ if (profilesTable != null) {
+ profilesTable.setCheckedElements(this.initialSelections.toArray());
+ }
+ }
+
+ public List<P> getSelectedProfileApplications() {
+ Object[] raw = profilesTable.getCheckedElements();
+ return ImmutableList.copyOf(Iterables.filter(Arrays.asList(raw), elementType));
+ }
+
+ private void createSelectionButtons(Composite parent) {
+ Composite buttons = new Composite(parent, SWT.NONE);
+ span(buttons, getLayoutColumnCount());
+
+ RowLayout layout = new RowLayout();
+ layout.marginLeft = 0;
+ layout.marginTop = 0;
+ layout.marginRight = 0;
+ layout.marginBottom = 0;
+ buttons.setLayout(layout);
+
+ class ButtonHandler extends SelectionAdapter {
+ final boolean select;
+
+ ButtonHandler(boolean select) {
+ this.select = select;
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ profilesTable.setAllChecked(select);
+ validatePage();
+ }
+ }
+
+ button(buttons, Messages.AbstractProfileApplicationSelectionPage_1).addSelectionListener(new ButtonHandler(true));
+ button(buttons, Messages.AbstractProfileApplicationSelectionPage_2).addSelectionListener(new ButtonHandler(false));
+ }
+
+ protected abstract IStructuredContentProvider createProfilesContentProvider();
+
+ protected abstract IBaseLabelProvider createProfilesLabelProvider();
+
+ protected void validatePage() {
+ if (profilesTable.getCheckedElements().length == 0) {
+ setPageComplete(false);
+ } else {
+ setPageComplete(true);
+ }
+ }
+
+ static GridData gd(Control c) {
+ GridData result = (GridData) c.getLayoutData();
+ if (result == null) {
+ result = new GridData();
+ c.setLayoutData(result);
+ }
+ return result;
+ }
+
+ static Label label(Composite parent, String text) {
+ Label result = new Label(parent, SWT.NONE);
+ result.setText(text);
+ return result;
+ }
+
+ static Button button(Composite parent, String text) {
+ Button result = new Button(parent, SWT.PUSH);
+ result.setText(text);
+ return result;
+ }
+
+ static <C extends Control> C span(C c, int horizontal) {
+ gd(c).horizontalSpan = horizontal;
+ return c;
+ }
+
+ static <C extends Control> C lead(C c, int dlus) {
+ gd(c).verticalIndent = dlus;
+ return c;
+ }
+
+ static <C extends Control> C fill(C c, boolean horizontal, boolean vertical) {
+ GridData gd = gd(c);
+ if (horizontal) {
+ gd.horizontalAlignment = SWT.FILL;
+ gd.grabExcessHorizontalSpace = true;
+ }
+ if (vertical) {
+ gd.verticalAlignment = SWT.FILL;
+ gd.grabExcessVerticalSpace = true;
+ }
+ return c;
+ }
+
+ static <C extends Control> C align(C c, int align) {
+ GridData gd = gd(c);
+ gd.horizontalAlignment = align;
+ return c;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationsPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationsPage.java
new file mode 100644
index 00000000000..2fa2d29b40e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/AbstractProfileApplicationsPage.java
@@ -0,0 +1,36 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.EncapsulatedAdapterFactoryLabelProvider;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * @author damus
+ *
+ */
+abstract class AbstractProfileApplicationsPage extends AbstractProfileApplicationSelectionPage<Package, ProfileApplication> {
+
+ public AbstractProfileApplicationsPage(String name, String title, ImageDescriptor icon) {
+ super(name, title, icon, ProfileApplication.class);
+ }
+
+ @Override
+ protected IBaseLabelProvider createProfilesLabelProvider() {
+ return EncapsulatedAdapterFactoryLabelProvider.appliedProfiles();
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ConflictingDecoratorModelsPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ConflictingDecoratorModelsPage.java
new file mode 100644
index 00000000000..0d6ea55c379
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ConflictingDecoratorModelsPage.java
@@ -0,0 +1,216 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.AbstractProfileApplicationsPage.button;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.ProfileExternalizationUIPreferences;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.SetMultimap;
+import com.google.common.collect.Sets;
+import com.google.common.eventbus.EventBus;
+import com.google.common.eventbus.Subscribe;
+
+/**
+ * @author damus
+ *
+ */
+public class ConflictingDecoratorModelsPage extends DecoratorModelSelectionPage {
+ private IFile[] resourcesSelectedForLoad;
+ private IFile[] conflicts;
+ private Button selectConflicts;
+
+ /*
+ * Map of (package -> profile -> application resource).
+ */
+ private Map<URI, Map<URI, URI>> loadedExternalApplications;
+
+ public ConflictingDecoratorModelsPage(EventBus bus) {
+ this(bus, null);
+ }
+
+ public ConflictingDecoratorModelsPage(EventBus bus, ImageDescriptor titleImage) {
+ super("unload", Messages.ConflictingDecoratorModelsPage_0, bus, titleImage); //$NON-NLS-1$
+
+ bus.register(this);
+
+ setMessage(Messages.ConflictingDecoratorModelsPage_1);
+ }
+
+ @Override
+ public void setInput(Package package_, Set<URI> input) {
+ super.setInput(package_, input);
+
+ // Compute the external profile applications already loaded
+ loadedExternalApplications = Maps.newHashMap();
+ ResourceSet rset = EMFHelper.getResourceSet(package_);
+ for (URI next : input) {
+ Resource resource = rset.getResource(next, true);
+ for (Map.Entry<Package, Profile> external : DecoratorModelUtils.getDecoratorProfileApplications(resource).entrySet()) {
+ URI packageURI = EcoreUtil.getURI(external.getKey());
+ Map<URI, URI> profiles = loadedExternalApplications.get(packageURI);
+ if (profiles == null) {
+ profiles = Maps.newHashMap();
+ loadedExternalApplications.put(packageURI, profiles);
+ }
+
+ profiles.put(EcoreUtil.getURI(external.getValue()), next);
+ }
+ }
+
+ conflicts = computeConflicts(resourcesSelectedForLoad);
+
+ validatePage();
+ }
+
+ @Override
+ protected void createSpecialSelectionButtons(Composite parent) {
+ selectConflicts = button(parent, Messages.ConflictingDecoratorModelsPage_2);
+ selectConflicts.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ for (IFile next : conflicts) {
+ table.setChecked(next, true);
+ }
+ validatePage();
+ }
+ });
+
+ if (conflicts != null) {
+ selectConflicts.setEnabled(conflicts.length > 0);
+ }
+ }
+
+ @Override
+ protected void storeDontShowThisPreference(boolean dontShowThisAgain) {
+ ProfileExternalizationUIPreferences.setPromptToUnloadConflicts(!dontShowThisAgain);
+ }
+
+ public Set<URI> getResourcesToUnload() {
+ return filesToURIs(getCheckedFiles());
+ }
+
+ @Subscribe
+ public void resourcesSelectedForLoad(IFile[] resources) {
+ this.resourcesSelectedForLoad = resources;
+ this.conflicts = computeConflicts(resources);
+
+ validatePage();
+ }
+
+ static Set<URI> filesToURIs(IFile[] files) {
+ Set<URI> result = Sets.newHashSet();
+ for (IFile next : files) {
+ result.add(URI.createPlatformResourceURI(next.getFullPath().toString(), true));
+ }
+ return result;
+ }
+
+ protected IFile[] computeConflicts(IFile[] resources) {
+ if ((loadedExternalApplications == null) || (resources == null)) {
+ return new IFile[0];
+ }
+
+ Set<URI> result = Sets.newHashSet();
+ Set<URI> uris = filesToURIs(resources);
+
+ // The input resources are loaded. Which of these apply the same profiles
+ // to the same packages as any of ones to be loaded?
+ for (URI next : uris) {
+ try {
+ SetMultimap<URI, URI> profileApplications = DecoratorModelIndex.getInstance().getAppliedProfilesByPackage(next);
+ for (URI packageURI : profileApplications.keySet()) {
+ Map<URI, URI> existingAppliedProfiles = loadedExternalApplications.get(packageURI);
+ if (existingAppliedProfiles != null) {
+ Set<URI> newProfiles = profileApplications.get(packageURI);
+ for (Map.Entry<URI, URI> profileToResource : existingAppliedProfiles.entrySet()) {
+ if (newProfiles.contains(profileToResource.getKey())) {
+ // This is a conflict
+ result.add(profileToResource.getValue());
+ }
+ }
+ }
+ }
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ StatusManager.getManager().handle(e.getStatus(), StatusManager.SHOW);
+ }
+ }
+
+ // Before we have created the UI, automatically select any conflicts if we are showing
+ // this page as an automatic prompt to unload conflicts
+ if (!result.isEmpty() && showDontShowThis() && !ProfileExternalizationUIPreferences.getPromptToUnloadConflicts() && (table == null)) {
+ select(result);
+ }
+
+ IFile[] conflicts = urisToFilesArray(result);
+ if (selectConflicts != null) {
+ selectConflicts.setEnabled(conflicts.length > 0);
+ }
+
+ return conflicts;
+ }
+
+ boolean anyConflictNotSelected() {
+ boolean result = false;
+
+ Set<IFile> checked = Sets.newHashSet(getCheckedFiles());
+ if (conflicts != null) {
+ for (IFile next : conflicts) {
+ if (!checked.contains(next)) {
+ result = true;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ void validatePage() {
+ setErrorMessage(null);
+
+ if (anyConflictNotSelected()) {
+ setErrorMessage(Messages.ConflictingDecoratorModelsPage_3);
+ setPageComplete(false);
+ } else {
+ setPageComplete(true);
+ }
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DecoratorModelSelectionPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DecoratorModelSelectionPage.java
new file mode 100644
index 00000000000..f2383fbf03c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DecoratorModelSelectionPage.java
@@ -0,0 +1,319 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.AbstractProfileApplicationsPage.align;
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.AbstractProfileApplicationsPage.button;
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.AbstractProfileApplicationsPage.fill;
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards.AbstractProfileApplicationsPage.label;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.viewers.CheckStateChangedEvent;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
+import org.eclipse.jface.viewers.ICheckStateListener;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.jface.wizard.WizardPage;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.ProfileExternalizationUIPreferences;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.DecoratorModelLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.events.DisposeEvent;
+import org.eclipse.swt.events.DisposeListener;
+import org.eclipse.swt.events.SelectionAdapter;
+import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.layout.GridLayout;
+import org.eclipse.swt.layout.RowLayout;
+import org.eclipse.swt.widgets.Button;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Table;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * @author damus
+ *
+ */
+public class DecoratorModelSelectionPage extends WizardPage {
+ private boolean showDontShowThis;
+
+ protected CheckboxTableViewer table;
+
+ private ResourceSet resourceSet;
+ private Set<URI> input;
+ private Set<IFile> initialSelections;
+
+ private final EventBus bus;
+
+ public DecoratorModelSelectionPage(EventBus bus) {
+ this(bus, null);
+ }
+
+ public DecoratorModelSelectionPage(EventBus bus, ImageDescriptor titleImage) {
+ this("selection", Messages.DecoratorModelSelectionPage_0, bus, titleImage); //$NON-NLS-1$
+ }
+
+ protected DecoratorModelSelectionPage(String name, String title, EventBus bus, ImageDescriptor titleImage) {
+ super(name, title, titleImage);
+
+ this.bus = bus;
+ }
+
+ @Override
+ public void createControl(Composite parent) {
+ Composite main = new Composite(parent, SWT.NONE);
+ main.setLayout(new GridLayout());
+
+ label(main, Messages.DecoratorModelSelectionPage_1);
+ table = new CheckboxTableViewer(new Table(main, SWT.BORDER | SWT.CHECK | SWT.V_SCROLL | SWT.H_SCROLL));
+ fill(table.getTable(), true, true);
+ table.setLabelProvider(new DelegatingStyledCellLabelProvider(new DecoratorModelLabelProvider(resourceSet)));
+ table.setContentProvider(new AvailableResourcesContentProvider());
+ table.setInput(getInput());
+ if (initialSelections != null) {
+ table.setCheckedElements(Iterables.toArray(initialSelections, IFile.class));
+ }
+ table.addCheckStateListener(new ICheckStateListener() {
+
+ @Override
+ public void checkStateChanged(CheckStateChangedEvent event) {
+ validatePage();
+ }
+ });
+
+ createSelectionButtons(main);
+
+ if (showDontShowThis()) {
+ createPreferenceArea(main);
+ }
+
+ setControl(main);
+
+ validatePage();
+ }
+
+ IFile[] getCheckedFiles() {
+ List<?> checked = (table == null) //
+ ? (initialSelections == null) ? Collections.emptyList() : ImmutableList.copyOf(initialSelections) //
+ : Arrays.asList(table.getCheckedElements());
+ return Iterables.toArray(Iterables.filter(checked, IFile.class), IFile.class);
+ }
+
+ protected void createSelectionButtons(Composite parent) {
+ Composite buttons = new Composite(parent, SWT.NONE);
+ align(buttons, SWT.TRAIL);
+
+ RowLayout layout = new RowLayout();
+ layout.marginLeft = 0;
+ layout.marginTop = 0;
+ layout.marginRight = 0;
+ layout.marginBottom = 0;
+ buttons.setLayout(layout);
+
+ createSpecialSelectionButtons(buttons);
+
+ class ButtonHandler extends SelectionAdapter {
+ final boolean select;
+
+ ButtonHandler(boolean select) {
+ this.select = select;
+ }
+
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ table.setAllChecked(select);
+ validatePage();
+ }
+ }
+
+ button(buttons, Messages.DecoratorModelSelectionPage_2).addSelectionListener(new ButtonHandler(true));
+ button(buttons, Messages.DecoratorModelSelectionPage_3).addSelectionListener(new ButtonHandler(false));
+ }
+
+ protected void createSpecialSelectionButtons(Composite buttons) {
+ // Pass
+ }
+
+ protected void createPreferenceArea(Composite parent) {
+ final boolean[] preference = { false };
+ final Button dontShowThisButton = new Button(parent, SWT.CHECK);
+ dontShowThisButton.setText(Messages.DecoratorModelSelectionPage_4);
+
+ dontShowThisButton.addSelectionListener(new SelectionAdapter() {
+ @Override
+ public void widgetSelected(SelectionEvent e) {
+ preference[0] = dontShowThisButton.getSelection();
+ }
+ });
+ dontShowThisButton.getShell().addDisposeListener(new DisposeListener() {
+
+ @Override
+ public void widgetDisposed(DisposeEvent e) {
+ storeDontShowThisPreference(preference[0]);
+ }
+ });
+ }
+
+ protected void storeDontShowThisPreference(boolean dontShowThisAgain) {
+ ProfileExternalizationUIPreferences.setAutoPromptToLoadProfileApplications(!dontShowThisAgain);
+ }
+
+ public void setIsAutomaticPrompt(boolean autoPrompt) {
+ showDontShowThis = autoPrompt;
+ }
+
+ protected boolean showDontShowThis() {
+ return showDontShowThis;
+ }
+
+ public void setInput(Package package_, Set<URI> input) {
+ this.input = input;
+
+ if (package_ != null) {
+ resourceSet = EMFHelper.getResourceSet(package_);
+ }
+
+ if (table != null) {
+ table.setInput(input);
+ }
+
+ validatePage();
+ }
+
+ public Set<URI> getInput() {
+ return input;
+ }
+
+ public void select(Iterable<URI> resources) {
+ Set<IFile> files = urisToFiles(resources);
+ if (!files.equals(this.initialSelections)) {
+ this.initialSelections = urisToFiles(resources);
+
+ if (table != null) {
+ table.setCheckedElements(Iterables.toArray(files, IFile.class));
+ }
+
+ bus.post(initialSelections);
+
+ validatePage();
+ }
+ }
+
+ void validatePage() {
+ setErrorMessage(null);
+ IFile[] checked = getCheckedFiles();
+ bus.post(getCheckedFiles());
+
+ if ((input == null) || input.isEmpty()) {
+ setErrorMessage(Messages.DecoratorModelSelectionPage_5);
+ setPageComplete(false);
+ } else if (checked.length == 0) {
+ setPageComplete(false);
+ } else {
+ setPageComplete(true);
+ }
+ }
+
+ static Set<IFile> urisToFiles(Iterable<URI> uris) {
+ Set<IFile> result = Sets.newLinkedHashSet();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ for (URI next : uris) {
+ if (next.isPlatformResource()) {
+ IFile file = root.getFile(new Path(next.toPlatformString(true)));
+ if ((file != null) && file.exists()) {
+ result.add(file);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ static IFile[] urisToFilesArray(Iterable<URI> uris) {
+ return Iterables.toArray(urisToFiles(uris), IFile.class);
+ }
+
+ //
+ // Nested types
+ //
+
+ static class AvailableResourcesContentProvider implements ITreeContentProvider {
+ private final IFile[] none = {};
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ IFile[] result = none;
+
+ if (inputElement instanceof Collection<?>) {
+ result = urisToFilesArray(Iterables.filter((Collection<?>) inputElement, URI.class));
+ Arrays.sort(result, new Comparator<IFile>() {
+ @Override
+ public int compare(IFile o1, IFile o2) {
+ return o1.getName().compareTo(o2.getName());
+ }
+ });
+ }
+
+ return result;
+ }
+
+ @Override
+ public void dispose() {
+ // Pass
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Pass
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ // There is no tree structure
+ return none;
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ // There is no tree structure
+ return null;
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ // There is no tree structure
+ return false;
+ }
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelPage.java
new file mode 100644
index 00000000000..c2790ba67e3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelPage.java
@@ -0,0 +1,176 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Collection;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.CheckboxTableViewer;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.ProfileResourceLabelProvider;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
+/**
+ * @author damus
+ *
+ */
+public class DuplicateDecoratorModelPage extends AbstractNewDecoratorModelPage<Object, URI> {
+ private final ResourceSet resourceSet;
+
+ public DuplicateDecoratorModelPage(ResourceSet resourceSet) {
+ super("duplicate", Messages.DuplicateDecoratorModelPage_0, null, URI.class); //$NON-NLS-1$
+
+ this.resourceSet = resourceSet;
+
+ setMessage(Messages.DuplicateDecoratorModelPage_1);
+ }
+
+ @Override
+ protected void checkInitialSelections(CheckboxTableViewer table, Collection<URI> initialSelections) {
+ table.setAllChecked(true);
+ }
+
+ @Override
+ protected void browseResource() {
+ browseResource(Messages.DuplicateDecoratorModelPage_2, Messages.DuplicateDecoratorModelPage_3);
+ }
+
+ @Override
+ protected IBaseLabelProvider createProfilesLabelProvider() {
+ return new DelegatingStyledCellLabelProvider(new ProfileResourceLabelProvider(resourceSet));
+ }
+
+ @Override
+ protected IStructuredContentProvider createProfilesContentProvider() {
+ return new IStructuredContentProvider() {
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Set<URI> result = Sets.newLinkedHashSet();
+
+ if (inputElement instanceof Resource) {
+ Resource decoratorModelResource = (Resource) inputElement;
+ for (TreeIterator<EObject> iter = EcoreUtil.getAllContents(getRoot(decoratorModelResource).getNestedPackages()); iter.hasNext();) {
+ EObject next = iter.next();
+ if (next instanceof ProfileApplication) {
+ EObject profile = (EObject) next.eGet(UMLPackage.Literals.PROFILE_APPLICATION__APPLIED_PROFILE, false);
+ if (profile != null) {
+ // Add the URI of the resource containing the applied profile
+ result.add(EcoreUtil.getURI(profile).trimFragment());
+ }
+ iter.prune();
+ } else if (!(next instanceof Package)) {
+ iter.prune();
+ }
+ }
+ } else if (inputElement instanceof URI) {
+ URI decoratorModelURI = (URI) inputElement;
+ try {
+ for (URI next : DecoratorModelIndex.getInstance().getAppliedProfilesByPackage(decoratorModelURI).values()) {
+ // Add the URI of the resource containing the applied profile
+ result.add(next.trimFragment());
+ }
+ } catch (CoreException e) {
+ StatusManager.getManager().handle(e.getStatus(), StatusManager.SHOW | StatusManager.LOG);
+ }
+ }
+
+ return result.toArray();
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Pass
+ }
+
+ @Override
+ public void dispose() {
+ // Pass
+ }
+ };
+ }
+
+ Package getRoot(Resource resource) {
+ return Iterables.getFirst(Iterables.filter(resource.getContents(), Package.class), null);
+ }
+
+ @Override
+ protected String validateExistingFile(IFile file) {
+ return NLS.bind(Messages.DuplicateDecoratorModelPage_4, file.getFullPath());
+ }
+
+ @Override
+ protected String defaultModelName(Object input) {
+ String result = null;
+ if (input instanceof Resource) {
+ Resource resource = (Resource) input;
+ result = NLS.bind(Messages.DuplicateDecoratorModelPage_5, getRoot(resource).getName());
+ } else {
+ try {
+ result = NLS.bind(Messages.DuplicateDecoratorModelPage_5, DecoratorModelIndex.getInstance().getDecoratorModelName((URI) input));
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ result = Messages.DuplicateDecoratorModelPage_7;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ protected String defaultResource(Object input) {
+ URI result;
+
+ if (input instanceof Resource) {
+ Resource resource = (Resource) input;
+ result = resource.getURI();
+ } else {
+ result = (URI) input;
+ }
+
+ String baseName = result.lastSegment();
+ String ext = ""; //$NON-NLS-1$
+ int dot = baseName.indexOf('.');
+
+ if (dot >= 0) {
+ ext = baseName.substring(dot);
+ baseName = baseName.substring(0, dot);
+ }
+
+ result = result.trimSegments(1).appendSegment(NLS.bind(Messages.DuplicateDecoratorModelPage_6, baseName, ext));
+
+ return result.toPlatformString(true);
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelWizard.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelWizard.java
new file mode 100644
index 00000000000..0f4603f749f
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/DuplicateDecoratorModelWizard.java
@@ -0,0 +1,156 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.io.IOException;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collections;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.dialogs.DialogSettings;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.tools.util.ICallableWithProgress;
+import org.eclipse.papyrus.infra.tools.util.UIUtil;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelCopier;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.ui.statushandlers.StatusManager;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * A wizard for duplication of an existing loaded or unloaded decorator model.
+ */
+public class DuplicateDecoratorModelWizard extends Wizard {
+
+ private ResourceSet resourceSet;
+
+ private Object decoratorModel;
+
+ private DuplicateDecoratorModelPage mainPage;
+
+ public DuplicateDecoratorModelWizard() {
+ super();
+
+ setWindowTitle(Messages.DuplicateDecoratorModelWizard_0);
+ setDialogSettings(DialogSettings.getOrCreateSection(Activator.getDefault().getDialogSettings(), getClass().getSimpleName()));
+ }
+
+ public void init(ResourceSet resourceSet, Object decoratorModel) {
+ this.resourceSet = resourceSet;
+ this.decoratorModel = decoratorModel;
+
+ if (mainPage != null) {
+ mainPage.setInput(decoratorModel);
+ }
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new DuplicateDecoratorModelPage(resourceSet);
+ addPage(mainPage);
+ mainPage.setInput(decoratorModel);
+ }
+
+ @Override
+ public boolean needsProgressMonitor() {
+ return true;
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean result = false;
+
+ mainPage.saveSettings();
+
+ final Set<URI> profileURIs = ImmutableSet.copyOf(mainPage.getSelectedProfileApplications());
+ final URI resourceURI = mainPage.getResourceURI();
+ final String modelName = mainPage.getModelName();
+
+ if (!profileURIs.isEmpty() && (resourceURI != null)) {
+ try {
+ result = UIUtil.call(getContainer(), false, false, new ICallableWithProgress<Boolean>() {
+
+ @Override
+ public Boolean call(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
+ boolean result = false;
+
+ final ResourceSet resourceSet;
+ final URI decoratorModelURI;
+
+ monitor.beginTask(Messages.DuplicateDecoratorModelWizard_1, IProgressMonitor.UNKNOWN);
+ try {
+ if (decoratorModel instanceof Resource) {
+ Resource unload = (Resource) decoratorModel;
+ resourceSet = unload.getResourceSet();
+ decoratorModelURI = unload.getURI();
+ if (!UnloadProfileApplicationsWizard.unload(resourceSet, Collections.singleton(unload.getURI()))) {
+ // Bail
+ return false;
+ }
+ } else {
+ resourceSet = null;
+ decoratorModelURI = (URI) decoratorModel;
+ }
+
+ try {
+ result = copy(decoratorModelURI, resourceURI, modelName, profileURIs);
+
+ if (result && (resourceSet != null)) {
+ // Switch to the new copy
+ DecoratorModelUtils.loadDecoratorModels(resourceSet, Collections.singleton(resourceURI));
+ }
+ } catch (IOException e) {
+ throw new InvocationTargetException(e);
+ }
+ } finally {
+ monitor.done();
+ }
+
+ return result;
+ }
+ });
+ } catch (InterruptedException e) {
+ // Pass
+ } catch (InvocationTargetException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.DuplicateDecoratorModelWizard_2, e.getTargetException());
+ StatusManager.getManager().handle(status, StatusManager.SHOW | StatusManager.LOG);
+ }
+ }
+
+ return result;
+ }
+
+ private boolean copy(URI sourceModel, URI destinationModel, String modelName, Set<URI> profileURIs) throws IOException {
+ boolean result = false;
+
+ DecoratorModelCopier copier = new DecoratorModelCopier(modelName, profileURIs);
+ try {
+ Resource destination = copier.copy(sourceModel, destinationModel);
+ destination.save(null);
+ result = true;
+ } finally {
+ copier.dispose();
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsPage.java
new file mode 100644
index 00000000000..2b60d9feb68
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsPage.java
@@ -0,0 +1,143 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.EncapsulatedAdapterFactoryLabelProvider;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.Lists;
+
+/**
+ * @author damus
+ *
+ */
+public class ExternalizeProfileApplicationsPage extends AbstractNewDecoratorModelPage<Package, ProfileApplication> {
+ public ExternalizeProfileApplicationsPage() {
+ super("externalize", Messages.ExternalizeProfileApplicationsPage_0, null, ProfileApplication.class); //$NON-NLS-1$
+
+ setMessage(Messages.ExternalizeProfileApplicationsPage_1);
+ }
+
+ @Override
+ protected void browseResource() {
+ browseResource(Messages.ExternalizeProfileApplicationsPage_2, Messages.ExternalizeProfileApplicationsPage_3);
+ }
+
+ @Override
+ protected IBaseLabelProvider createProfilesLabelProvider() {
+ return EncapsulatedAdapterFactoryLabelProvider.appliedProfiles();
+ }
+
+ @Override
+ protected IStructuredContentProvider createProfilesContentProvider() {
+ return new IStructuredContentProvider() {
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Object[] result = null;
+
+ if (inputElement instanceof Package) {
+ Package package_ = (Package) inputElement;
+ List<ProfileApplication> profileApplications = Lists.newArrayList();
+
+ for (ProfileApplication next : package_.getProfileApplications()) {
+ Profile profile = next.getAppliedProfile();
+
+ if ((profile != null) && !profile.eIsProxy()) {
+ profileApplications.add(next);
+ }
+ }
+
+ result = profileApplications.toArray();
+ }
+
+ return (result == null) ? new Object[0] : result;
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Pass
+ }
+
+ @Override
+ public void dispose() {
+ // Pass
+ }
+ };
+ }
+
+ @Override
+ protected String validateExistingFile(IFile file) {
+ String result = null;
+
+ String conflictingProfile = null;
+ if (!DecoratorModelUtils.isDecoratorModel(getResourceURI())) {
+ result = Messages.ExternalizeProfileApplicationsPage_4;
+ } else if ((conflictingProfile = findProfileApplication(file)) != null) {
+ result = NLS.bind(Messages.ExternalizeProfileApplicationsPage_5, conflictingProfile, getInput().getName());
+ }
+
+ return result;
+ }
+
+ private String findProfileApplication(IFile decoratorModel) {
+ URI decoratorModelURI = URI.createPlatformResourceURI(decoratorModel.getFullPath().toString(), true);
+ String result = null;
+
+ try {
+ Set<URI> applied = DecoratorModelIndex.getInstance().getAppliedProfiles(EcoreUtil.getURI(getInput()), decoratorModelURI);
+ for (ProfileApplication profileApplication : getSelectedProfileApplications()) {
+ if (applied.contains(EcoreUtil.getURI(profileApplication.getAppliedProfile()))) {
+ result = profileApplication.getAppliedProfile().getName();
+ }
+ }
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+
+ return result;
+ }
+
+ @Override
+ protected String defaultResource(Package package_) {
+ String resourceName = (package_ == null) ? "" : UML2Util.getValidJavaIdentifier(package_.getName()); //$NON-NLS-1$
+ if ((resourceName.length() > 0) && Character.isUpperCase(resourceName.charAt(0))) {
+ resourceName = Character.toLowerCase(resourceName.charAt(0)) + resourceName.substring(1);
+ }
+
+ IPath result = new Path(package_.eResource().getURI().toPlatformString(true)).removeLastSegments(1).append(resourceName).addFileExtension(getFileExtension());
+
+ return result.toString();
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsWizard.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsWizard.java
new file mode 100644
index 00000000000..8e8bd4428e7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/ExternalizeProfileApplicationsWizard.java
@@ -0,0 +1,138 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Collections;
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.jface.dialogs.DialogSettings;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.ui.ISelectionListener;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWindow;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.ui.views.properties.PropertySheet;
+import org.eclipse.ui.views.properties.PropertyShowInContext;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * @author damus
+ *
+ */
+public class ExternalizeProfileApplicationsWizard extends Wizard implements IWorkbenchWizard {
+ static final String PROPERTY_SHEET_VIEW_ID = "org.eclipse.ui.views.PropertySheet"; //$NON-NLS-1$
+
+ private IWorkbenchWindow workbenchWindow;
+
+ private Package package_;
+
+ private ExternalizeProfileApplicationsPage mainPage;
+
+ private List<ProfileApplication> initialSelections;
+
+ public ExternalizeProfileApplicationsWizard() {
+ super();
+
+ setWindowTitle(Messages.ExternalizeProfileApplicationsWizard_0);
+ setDialogSettings(DialogSettings.getOrCreateSection(Activator.getDefault().getDialogSettings(), getClass().getSimpleName()));
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ workbenchWindow = workbench.getActiveWorkbenchWindow();
+
+ EObject eObject = EMFHelper.getEObject(selection.getFirstElement());
+ if (eObject instanceof Package) {
+ init((Package) eObject, Collections.<ProfileApplication> emptyList());
+ }
+ }
+
+ public void init(Package package_, Iterable<ProfileApplication> initialSelections) {
+ this.package_ = package_;
+ this.initialSelections = ImmutableList.copyOf(initialSelections);
+
+ if (mainPage != null) {
+ mainPage.setInput(package_);
+ mainPage.select(initialSelections);
+ }
+
+ if (workbenchWindow == null) {
+ workbenchWindow = Activator.getActiveWorkbenchWindow();
+ }
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new ExternalizeProfileApplicationsPage();
+ addPage(mainPage);
+ mainPage.setInput(package_);
+ mainPage.select(initialSelections);
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean result = false;
+
+ mainPage.saveSettings();
+
+ List<ProfileApplication> profileApplications = mainPage.getSelectedProfileApplications();
+ URI resourceURI = mainPage.getResourceURI();
+ String modelName = mainPage.getModelName();
+
+ if (!profileApplications.isEmpty() && (resourceURI != null)) {
+ Command command = DecoratorModelUtils.createSeparateProfileApplicationsCommand(profileApplications, resourceURI, modelName);
+ TransactionUtil.getEditingDomain(package_).getCommandStack().execute(command);
+
+ result = true;
+
+ refreshPropertySheet();
+ }
+
+ return result;
+ }
+
+ private void refreshPropertySheet() {
+ if (workbenchWindow != null) {
+ // Refresh the Properties view in case it wasn't showing the decorator models tab
+ PropertySheet propertiesView = (PropertySheet) workbenchWindow.getActivePage().findView(PROPERTY_SHEET_VIEW_ID);
+ if (propertiesView != null) {
+ PropertyShowInContext context = (PropertyShowInContext) propertiesView.getShowInContext();
+ if ((context != null) && (context.getSelection() instanceof IStructuredSelection) && (propertiesView.getCurrentPage() instanceof ISelectionListener)) {
+ ISelectionListener page = (ISelectionListener) propertiesView.getCurrentPage();
+ IStructuredSelection selection = (IStructuredSelection) context.getSelection();
+
+ // The Tabbed Property Sheet page ignores the selection if it's the same as before
+ page.selectionChanged(context.getPart(), StructuredSelection.EMPTY);
+
+ // The XWT tab descriptor remembers the previous selection and just returns the cache
+ // of tabs if it gets that same selection instance again, so create a new one for it
+ page.selectionChanged(context.getPart(), new StructuredSelection(selection.toArray()));
+ }
+ }
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsPage.java
new file mode 100644
index 00000000000..157a18e454e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsPage.java
@@ -0,0 +1,76 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.List;
+
+import org.eclipse.jface.viewers.IStructuredContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+import com.google.common.collect.Lists;
+
+/**
+ * @author damus
+ *
+ */
+public class InternalizeProfileApplicationsPage extends AbstractProfileApplicationsPage {
+
+ public InternalizeProfileApplicationsPage() {
+ super("internalize", Messages.InternalizeProfileApplicationsPage_0, null); //$NON-NLS-1$
+ }
+
+ @Override
+ protected IStructuredContentProvider createProfilesContentProvider() {
+ return new IStructuredContentProvider() {
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ Object[] result = null;
+
+ if (inputElement instanceof Package) {
+ Package package_ = (Package) inputElement;
+ List<ProfileApplication> profileApplications = Lists.newArrayList();
+
+ for (ProfileApplication next : DecoratorModelUtils.getDecoratorModelProfileApplications(package_)) {
+ Profile profile = next.getAppliedProfile();
+
+ if ((profile != null) && !profile.eIsProxy()) {
+ profileApplications.add(next);
+ }
+ }
+
+ result = profileApplications.toArray();
+ }
+
+ return (result == null) ? new Object[0] : result;
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Pass
+ }
+
+ @Override
+ public void dispose() {
+ // Pass
+ }
+ };
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsWizard.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsWizard.java
new file mode 100644
index 00000000000..01a65f04411
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/InternalizeProfileApplicationsWizard.java
@@ -0,0 +1,83 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.List;
+
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.wizard.Wizard;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.ui.providers.DeleteEmptyDecoratorModelsPolicy;
+import org.eclipse.ui.IWorkbench;
+import org.eclipse.ui.IWorkbenchWizard;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * @author damus
+ *
+ */
+public class InternalizeProfileApplicationsWizard extends Wizard implements IWorkbenchWizard {
+
+ private Package package_;
+
+ private InternalizeProfileApplicationsPage mainPage;
+
+ public InternalizeProfileApplicationsWizard() {
+ super();
+
+ setWindowTitle(Messages.InternalizeProfileApplicationsWizard_0);
+ }
+
+ @Override
+ public void init(IWorkbench workbench, IStructuredSelection selection) {
+ EObject eObject = EMFHelper.getEObject(selection.getFirstElement());
+ if (eObject instanceof Package) {
+ package_ = (Package) eObject;
+
+ if (mainPage != null) {
+ mainPage.setInput(package_);
+ }
+ }
+ }
+
+ @Override
+ public void addPages() {
+ mainPage = new InternalizeProfileApplicationsPage();
+ addPage(mainPage);
+ mainPage.setInput(package_);
+ }
+
+ @Override
+ public boolean performFinish() {
+ boolean result = false;
+
+ List<ProfileApplication> profileApplications = mainPage.getSelectedProfileApplications();
+
+ if (!profileApplications.isEmpty()) {
+ Command command = DecoratorModelUtils.createReclaimProfileApplicationsCommand(profileApplications, new DeleteEmptyDecoratorModelsPolicy(getShell()));
+ TransactionUtil.getEditingDomain(package_).getCommandStack().execute(command);
+
+ result = true;
+ }
+
+ return result;
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadDecoratorModelsPage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadDecoratorModelsPage.java
new file mode 100644
index 00000000000..7806505efc1
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadDecoratorModelsPage.java
@@ -0,0 +1,120 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.SetMultimap;
+import com.google.common.collect.Sets;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * @author damus
+ *
+ */
+public class LoadDecoratorModelsPage extends DecoratorModelSelectionPage {
+
+ /*
+ * Map of (decorator model -> package -> profiles).
+ */
+ private Map<IFile, SetMultimap<URI, URI>> externalApplications;
+
+ public LoadDecoratorModelsPage(EventBus bus) {
+ super(bus);
+ }
+
+ @Override
+ public void setInput(Package package_, Set<URI> input) {
+ super.setInput(package_, input);
+
+ // Compute the external profile applications available
+ externalApplications = Maps.newHashMap();
+ IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
+ for (URI profileApplicationResource : input) {
+ IFile file = root.getFile(new Path(profileApplicationResource.toPlatformString(true)));
+
+ try {
+ SetMultimap<URI, URI> profileApplications = DecoratorModelIndex.getInstance().getAppliedProfilesByPackage(profileApplicationResource);
+ externalApplications.put(file, profileApplications);
+ } catch (CoreException e) {
+ Activator.getDefault().getLog().log(e.getStatus());
+ StatusManager.getManager().handle(e.getStatus(), StatusManager.SHOW);
+ }
+ }
+ }
+
+ protected String computeConflict() {
+ String result = null;
+
+ IFile[] selected = getCheckedFiles();
+ if (selected.length > 1) {
+ out: for (int i = 0; i < selected.length; i++) {
+ IFile a = selected[i];
+ SetMultimap<URI, URI> applicationsFromA = externalApplications.get(a);
+ for (int j = i + 1; j < selected.length; j++) {
+ IFile b = selected[j];
+ SetMultimap<URI, URI> applicationsFromB = externalApplications.get(b);
+ if (intersect(applicationsFromA, applicationsFromB)) {
+ result = NLS.bind(Messages.LoadDecoratorModelsPage_0, a.getName(), b.getName());
+ break out;
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ static <K, V> boolean intersect(SetMultimap<K, V> a, SetMultimap<K, V> b) {
+ boolean result = false;
+
+ for (K next : a.keySet()) {
+ if (!Sets.intersection(a.get(next), b.get(next)).isEmpty()) {
+ result = true;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ void validatePage() {
+ setErrorMessage(null);
+
+ String conflict = computeConflict();
+ if (conflict != null) {
+ setErrorMessage(conflict);
+ setPageComplete(false);
+ } else {
+ super.validatePage();
+ }
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadProfileApplicationsWizard.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadProfileApplicationsWizard.java
new file mode 100644
index 00000000000..1bdb368c64d
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/LoadProfileApplicationsWizard.java
@@ -0,0 +1,230 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.dialogs.DialogSettings;
+import org.eclipse.jface.dialogs.IDialogSettings;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.base.Functions;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+import com.google.common.eventbus.EventBus;
+
+/**
+ * @author damus
+ *
+ */
+public class LoadProfileApplicationsWizard extends AbstractManageProfileApplicationsWizard {
+
+ private static final String SECTION_RESOURCES = "resources"; //$NON-NLS-1$
+ private static final String KEY_AUTO_PROMPT_SELECTIONS = "autoPromptSelections"; //$NON-NLS-1$
+
+ private Set<URI> loadedProfileApplicationResources;
+
+ private ConflictingDecoratorModelsPage conflictsPage;
+
+ private final boolean promptingConflicts;
+
+ public LoadProfileApplicationsWizard(boolean autoPrompt) {
+ this(autoPrompt, false);
+ }
+
+ public LoadProfileApplicationsWizard(boolean autoPrompt, boolean promptingConflicts) {
+ super(autoPrompt);
+
+ this.promptingConflicts = promptingConflicts;
+
+ setWindowTitle(Messages.LoadProfileApplicationsWizard_0);
+ }
+
+ @Override
+ protected DecoratorModelSelectionPage createSelectionPage(EventBus bus) {
+ return new LoadDecoratorModelsPage(bus);
+ }
+
+ @Override
+ protected void configureSelectionPage(DecoratorModelSelectionPage page) {
+ page.setMessage(Messages.LoadProfileApplicationsWizard_1);
+ }
+
+ @Override
+ Set<URI> getAvailableProfileApplicationResources(Package package_) {
+ Set<URI> result = Sets.newHashSet();
+
+ // Collect all available decorator models
+ result.addAll(DecoratorModelUtils.getUnloadedDecoratorModels(package_.eResource()));
+
+ // If we are automatically prompting the user, then do it only for the actual resource being opened
+ if (!isAutoPrompt()) {
+ // Collect available decorator models for loaded sub-units
+ for (Package subUnit : DecoratorModelUtils.getLoadedSubUnitPackages(package_)) {
+ result.addAll(DecoratorModelUtils.getUnloadedDecoratorModels(subUnit.eResource()));
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ protected void createPages(Package package_, EventBus bus) {
+ super.createPages(package_, bus);
+
+ loadedProfileApplicationResources = getLoadedProfileApplicationResources(package_);
+
+ if (needsUnloadConflictsPage()) {
+ // Have potential for conflicts, or at least resources that we can unload
+ conflictsPage = new ConflictingDecoratorModelsPage(bus);
+ conflictsPage.setIsAutomaticPrompt(promptingConflicts);
+ }
+ }
+
+ @Override
+ protected void initPages(Package package_, Iterable<URI> initialSelections) {
+ if (isAutoPrompt() && Iterables.isEmpty(initialSelections)) {
+ // Compute the initial selections
+ initialSelections = getSavedDecoratorsSelection();
+ }
+
+ super.initPages(package_, initialSelections);
+
+ if (conflictsPage != null) {
+ conflictsPage.setInput(package_, loadedProfileApplicationResources);
+ }
+ }
+
+ @Override
+ public void addPages() {
+ super.addPages();
+
+ if (conflictsPage != null) {
+ addPage(conflictsPage);
+ }
+ }
+
+ public boolean needsUnloadConflictsPage() {
+ return (loadedProfileApplicationResources != null) && !loadedProfileApplicationResources.isEmpty();
+ }
+
+ protected Set<URI> getLoadedProfileApplicationResources(Package package_) {
+ Set<Resource> resources = Sets.newHashSet();
+ resources.add(package_.eResource());
+ for (Package next : DecoratorModelUtils.getLoadedSubUnitPackages(package_)) {
+ resources.add(next.eResource());
+ }
+
+ Set<URI> result = Sets.newHashSet();
+
+ for (Resource next : resources) {
+ result.addAll(DecoratorModelUtils.getLoadedDecoratorModels(next));
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean isComplete() {
+ return super.isComplete() && ((conflictsPage == null) || conflictsPage.isPageComplete());
+ }
+
+ @Override
+ protected boolean performFinish(ResourceSet resourceSet, Set<URI> resourceURIs) {
+ if (conflictsPage != null) {
+ Set<URI> unload = conflictsPage.getResourcesToUnload();
+ if (!unload.isEmpty() && !UnloadProfileApplicationsWizard.unload(resourceSet, unload)) {
+ // Bail
+ return false;
+ }
+ }
+
+ boolean result = DecoratorModelUtils.loadDecoratorModels(resourceSet, resourceURIs);
+
+ if (isAutoPrompt()) {
+ saveDecoratorsSelection(resourceURIs);
+ }
+
+ return result;
+ }
+
+ protected void saveDecoratorsSelection(Set<URI> resourceURIs) {
+ boolean remove = resourceURIs.isEmpty();
+
+ IDialogSettings resourcesSection = getSection(SECTION_RESOURCES, !remove);
+ if (resourcesSection != null) {
+ pruneResourceSections(resourcesSection);
+
+ String resourceURI = getPackage().eResource().getURI().toString();
+
+ IDialogSettings resource = getSection(resourcesSection, resourceURI, !remove);
+ if (resource != null) {
+ if (remove) {
+ resource.put(KEY_AUTO_PROMPT_SELECTIONS, (String[]) null);
+ } else {
+ String[] uris = Iterables.toArray(Iterables.transform(resourceURIs, Functions.toStringFunction()), String.class);
+ resource.put(KEY_AUTO_PROMPT_SELECTIONS, uris);
+ }
+ }
+ }
+ }
+
+ private Set<URI> getSavedDecoratorsSelection() {
+ ImmutableSet.Builder<URI> result = ImmutableSet.builder();
+ IDialogSettings resourcesSection = getSection(SECTION_RESOURCES, false);
+ if (resourcesSection != null) {
+ String resourceURI = getPackage().eResource().getURI().toString();
+ IDialogSettings resource = resourcesSection.getSection(resourceURI);
+ if (resource != null) {
+ String[] uris = resource.getArray(KEY_AUTO_PROMPT_SELECTIONS);
+ if (uris != null) {
+ for (String next : uris) {
+ result.add(URI.createURI(next));
+ }
+ }
+ }
+ }
+
+ return result.build();
+ }
+
+ private void pruneResourceSections(IDialogSettings resourcesSection) {
+ for (IDialogSettings next : resourcesSection.getSections()) {
+ URI uri = URI.createURI(next.getName());
+ boolean exists = false;
+
+ if (uri.isPlatformResource()) {
+ IPath path = new Path(uri.toPlatformString(true));
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
+
+ // If the file's project is closed, assume the file still exists
+ exists = (file != null) && (file.isAccessible() || !file.getProject().isOpen());
+ }
+
+ if (!exists) {
+ ((DialogSettings) resourcesSection).removeSection(next);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/UnloadProfileApplicationsWizard.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/UnloadProfileApplicationsWizard.java
new file mode 100644
index 00000000000..7ac8c273eec
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/internal/ui/wizards/UnloadProfileApplicationsWizard.java
@@ -0,0 +1,93 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.ui.wizards;
+
+import java.util.Set;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.commands.UnloadDecoratorModelHandler;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.ui.statushandlers.StatusManager;
+import org.eclipse.uml2.uml.Package;
+
+import com.google.common.collect.Sets;
+
+/**
+ * @author damus
+ *
+ */
+public class UnloadProfileApplicationsWizard extends AbstractManageProfileApplicationsWizard {
+
+ public UnloadProfileApplicationsWizard() {
+ super(false); // There is no auto-prompt for unload
+
+ setWindowTitle(Messages.UnloadProfileApplicationsWizard_0);
+ }
+
+ @Override
+ protected void configureSelectionPage(DecoratorModelSelectionPage page) {
+ page.setMessage(Messages.UnloadProfileApplicationsWizard_1);
+ }
+
+ @Override
+ Set<URI> getAvailableProfileApplicationResources(Package package_) {
+ Set<URI> result = Sets.newHashSet();
+
+ // Collect all loaded profile application resources for loaded sub-units
+ result.addAll(DecoratorModelUtils.getLoadedDecoratorModels(package_.eResource()));
+ for (Package subUnit : DecoratorModelUtils.getLoadedSubUnitPackages(package_)) {
+ result.addAll(DecoratorModelUtils.getLoadedDecoratorModels(subUnit.eResource()));
+ }
+
+ return result;
+ }
+
+ @Override
+ protected boolean performFinish(final ResourceSet resourceSet, final Set<URI> resourceURIs) {
+ return unload(resourceSet, resourceURIs);
+ }
+
+ static boolean unload(final ResourceSet resourceSet, final Set<URI> resourceURIs) {
+ boolean result = false;
+
+ Set<Resource> toUnload = Sets.newHashSet();
+
+ for (URI uri : resourceURIs) {
+ Resource resource = resourceSet.getResource(uri, false);
+ if ((resource != null) && resource.isLoaded()) {
+ toUnload.add(resource);
+ }
+ }
+
+ if (!toUnload.isEmpty()) {
+ try {
+ UnloadDecoratorModelHandler.unloadResources(Activator.getActiveWorkbenchWindow(), resourceSet, toUnload);
+ result = true;
+ } catch (ExecutionException e) {
+ IStatus status = new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.UnloadProfileApplicationsWizard_2, e);
+ Activator.getDefault().getLog().log(status);
+ StatusManager.getManager().handle(status, StatusManager.BLOCK);
+ }
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/ui/providers/DeleteEmptyDecoratorModelsPolicy.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/ui/providers/DeleteEmptyDecoratorModelsPolicy.java
new file mode 100644
index 00000000000..7d7a53bbba5
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui/src/org/eclipse/papyrus/uml/decoratormodel/ui/providers/DeleteEmptyDecoratorModelsPolicy.java
@@ -0,0 +1,119 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.ui.providers;
+
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.WhenKind.ALWAYS;
+import static org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.WhenKind.NEVER;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
+import org.eclipse.jface.dialogs.MessageDialogWithToggle;
+import org.eclipse.jface.viewers.ArrayContentProvider;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider;
+import org.eclipse.jface.viewers.TableViewer;
+import org.eclipse.jface.viewers.ViewerComparator;
+import org.eclipse.jface.window.IShellProvider;
+import org.eclipse.jface.window.SameShellProvider;
+import org.eclipse.papyrus.uml.decoratormodel.helper.IDeleteEmptyDecoratorModelsPolicy;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.preferences.ProfileExternalizationUIPreferences;
+import org.eclipse.papyrus.uml.decoratormodel.internal.ui.providers.DecoratorModelLabelProvider;
+import org.eclipse.swt.SWT;
+import org.eclipse.swt.layout.FillLayout;
+import org.eclipse.swt.layout.GridData;
+import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Control;
+import org.eclipse.swt.widgets.Shell;
+
+/**
+ * UI based policy for deletion of empty decorator models, with the possibility of interactively prompting the user.
+ */
+public class DeleteEmptyDecoratorModelsPolicy implements IDeleteEmptyDecoratorModelsPolicy {
+ private final IShellProvider parentShell;
+
+ public DeleteEmptyDecoratorModelsPolicy(IShellProvider parentShell) {
+ super();
+
+ this.parentShell = parentShell;
+ }
+
+ public DeleteEmptyDecoratorModelsPolicy(Shell parentShell) {
+ this(new SameShellProvider(parentShell));
+ }
+
+ @Override
+ public boolean shouldDeleteDecoratorModels(Collection<? extends Resource> decoratorModels) {
+ boolean result;
+
+ switch (ProfileExternalizationUIPreferences.getDeleteEmptyDecoratorModels()) {
+ case PROMPT:
+ result = promptToDelete(decoratorModels);
+ break;
+ case ALWAYS:
+ result = true;
+ break;
+ case NEVER:
+ default:
+ result = false;
+ break;
+ }
+
+ return result;
+ }
+
+ private boolean promptToDelete(final Collection<? extends Resource> decoratorModels) {
+ MessageDialogWithToggle dlg = new MessageDialogWithToggle(parentShell.getShell(), Messages.DeleteEmptyDecoratorModelsPolicy_0, null, Messages.DeleteEmptyDecoratorModelsPolicy_1,
+ MessageDialog.QUESTION, new String[] { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL }, 1, Messages.DeleteEmptyDecoratorModelsPolicy_2, false) {
+ @Override
+ protected Control createCustomArea(Composite parent) {
+ Composite custom = new Composite(parent, SWT.NONE);
+ custom.setLayout(new FillLayout());
+ custom.setLayoutData(new GridData(GridData.FILL_BOTH));
+
+ TableViewer table = new TableViewer(custom, SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL);
+ table.setContentProvider(ArrayContentProvider.getInstance());
+ table.setLabelProvider(new DelegatingStyledCellLabelProvider(new DecoratorModelLabelProvider()));
+ table.setComparator(new ViewerComparator()); // Label-based sort is fine
+ table.setInput(decoratorModels);
+
+ return custom;
+ }
+ };
+
+ boolean result;
+
+ switch (dlg.open()) {
+ case IDialogConstants.YES_ID:
+ result = true;
+ if (dlg.getToggleState()) {
+ ProfileExternalizationUIPreferences.setDeleteEmptyDecoratorModels(ALWAYS);
+ }
+ break;
+ case IDialogConstants.NO_ID:
+ result = false;
+ if (dlg.getToggleState()) {
+ ProfileExternalizationUIPreferences.setDeleteEmptyDecoratorModels(NEVER);
+ }
+ break;
+ default: // canceled
+ result = false;
+ break;
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.classpath b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.project b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.project
new file mode 100644
index 00000000000..cb1b41de6a3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.decoratormodel</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/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..94d61f00da6
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..0a20855a793
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/META-INF/MANIFEST.MF
@@ -0,0 +1,39 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.decoratormodel;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Bundle-ClassPath: .
+Bundle-Activator: org.eclipse.papyrus.uml.decoratormodel.Activator
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.emf.ecore;bundle-version="2.10.0";visibility:=reexport,
+ org.eclipse.uml2.types;bundle-version="2.0.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.uml2.uml;bundle-version="5.1.0";visibility:=reexport,
+ org.eclipse.uml2.common;bundle-version="2.0.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.emf.transaction;bundle-version="1.4.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
+ org.eclipse.core.expressions;bundle-version="3.4.600",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy;exclude:=org.eclipse.papyrus.uml.decoratormodel.internal.expressions
+Export-Package: org.eclipse.papyrus.uml.decoratormodel,
+ org.eclipse.papyrus.uml.decoratormodel.helper,
+ org.eclipse.papyrus.uml.decoratormodel.internal.commands;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.expressions;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.messages;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.providers;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.internal.resource;x-friends:="org.eclipse.papyrus.uml.decoratormodel.ui,org.eclipse.papyrus.uml.decoratormodel.properties,org.eclipse.papyrus.uml.decoratormodel.controlmode",
+ org.eclipse.papyrus.uml.decoratormodel.internal.resource.index;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.model,
+ org.eclipse.papyrus.uml.decoratormodel.profileExternalization,
+ org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl,
+ org.eclipse.papyrus.uml.decoratormodel.profileExternalization.internal.operations;x-internal:=true,
+ org.eclipse.papyrus.uml.decoratormodel.profileExternalization.util
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/about.html b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/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/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/build.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/build.properties
new file mode 100644
index 00000000000..aadf93b715a
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/build.properties
@@ -0,0 +1,12 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ documentation.pdoc,\
+ plugin.xml,\
+ model/profileExternalization.ecore,\
+ model/ProfileExternalization.profile.uml,\
+ model/ProfileExternalization.profile.genmodel,\
+ plugin.properties
+src.includes = about.html
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/conception.textile b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/conception.textile
index eb6708f2bab..d08e0596b42 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/conception.textile
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/conception.textile
@@ -7,9 +7,12 @@ h2. Context
Currently, profile applications are serialized within the same file as the model itself. This feature will enable to serialize profile applications within a dedicated file. This feature will be an option that the user may configure within the Papyrus preferences. If one applies several profiles on a model, each profile application is serialized within its own resource. It has to be possible to switch from one configuration to the other, i.e. either to externalize profile applications or to internalize them.
Control mode shall be taken into consideration here and should continue to work correctly.
-Enable external profile application
+h3. Enable external profile application
+
The purpose of this task will consist in patching the UML2 component in order this latter can fully support the possibility to apply profiles on UML models by serializing this profile application in a separate file and vice-versa. Papyrus UI has also to be enriched in order to enable the user to configure Papyrus in order to enable or disable this option. The process will be reversible, i.e. profiles would be serializable individually in or out the model resources. In addition, the tool will also support the ability to apply several times the same profile. In case of a profile has been applied several time (values of the stereotype properties would be possibly different in that case), only one profile application is defined as part of the current configuration.
-Control mode extension
+
+h3. Control mode extension
+
This task will consist in analyzing the impact of the externalization of profile serialization and update its design in order the control mode can still run correctly in that case. The test set of the control mode will also be extended to cover this new use case.
h2. Thoughts
@@ -20,8 +23,21 @@ h2. Thoughts
# integration with the control mode: should one/several new resource be created when splitting the model?
# integration with rename/copy files
# integration with copy paste: does the current extension of the copy/paste work with this module?
+# profile migration: when Papyrus detects that a new definition of a profile is available, the migration needs to account for externalized stereotype applications. These must be loaded, converted, and unloaded again if not currently loaded; this is very like the stereotype repair functionality
+# do we really need to be able to store profile applications independently of their applying packages? And multiple applications of the same profile? It should be sufficient to store stereotype applications separately, and perhaps multiple disjoint sets of applications of the same stereotypes from the same profile on the same model elements. What really matters in UML terms is the discovery and loading of a particular set of stereotype applications; the profile application has no value except in determining which stereotypes are applicable in a given scope
h2. Current external mechanism limitations
+h3. Stereotype application helper
+
UML2 module provides a framework for externalization of the stereotype applications, but this mechanism is rather basic. It relies with a singleton helper, referenced in the java system properties. If the externalization is done, it will be done for all components in the installation relying on UML2 metamodel, not only Papyrus models. Moreover, only one Eclipse component can provide a customization. If another component that Papyrus relies on that extension mechanism, only one will work at the same time.
+* should be simple to let stereotype application helpers be attached to a resource set
+
+h3. Required extensions
+
+Stereotypes may define required metaclass extensions, which imply that every instance of the extended metaclass in the scope of the profile application must have an application of the stereotype. This is actually enforced by the UML API at run-time; when a profile is applied that has required extensions, the stereotypes are applied to all elements that require them. Also, when an element is attached to the model, all required stereotypes are applied that are not already applied
+
+* the enforcement of required stereotypes is suppressed when loading a model, which means that required stereotype applications can be stored in separate resources and loaded separately
+* a resource containing required stereotype applications may be unloaded. The UML API tolerates required stereotype applications being unapplied in this way
+* for profiles that do not have any required extensions, it is feasible to edit the model without having any stereotype resource loaded. Not so if it has required metaclass extensions, because any attachment/move/reattachment of an element will cause it and all of its contents to have required stereotypes applied. If a stereotype resource is not loaded at the time, then the UML API will think the required stereotypes are unapplied and will try to apply them
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/documentation.pdoc b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/documentation.pdoc
new file mode 100644
index 00000000000..a9948960562
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/documentation.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="Core APIs for management of profile and stereotype applications in external resources">
+ <referent firstName="Christian" lastName="Damus" eMail="give.a.damus@gmail.com" currentCompany="independent"/>
+</doc:Documentation>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.notation b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.di
index bf9abab340f..bf9abab340f 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.notation
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.di
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel
new file mode 100644
index 00000000000..93e853d2624
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.genmodel
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<genmodel:GenModel 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:genmodel="http://www.eclipse.org/uml2/2.2.0/GenModel"
+ copyrightText="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"
+ modelDirectory="/org.eclipse.papyrus.uml.decoratormodel/src" modelPluginID="org.eclipse.papyrus.uml.decoratormodel"
+ modelName="ProfileExternalization" nonNLSMarkers="true" rootExtendsClass="org.eclipse.emf.ecore.impl.MinimalEObjectImpl$Container"
+ codeFormatting="true" commentFormatting="true" importerID="org.eclipse.uml2.uml.ecore.importer"
+ complianceLevel="6.0" copyrightFields="false" usedGenPackages="../../org.eclipse.emf.ecore/model/Ecore.genmodel#//ecore ../../org.eclipse.uml2.types/model/Types.genmodel#//types ../../org.eclipse.uml2.uml/model/UML.genmodel#//uml"
+ operationReflection="true" importOrganizing="true" cleanup="true" factoryMethods="true"
+ pluralizedGetters="true" cacheAdapterSupport="true" safeStrings="true" invariantPrefix="validate">
+ <genAnnotations source="http://www.eclipse.org/emf/2002/GenModel/importer/org.eclipse.uml2.uml.ecore.importer">
+ <details key="ECORE_TAGGED_VALUES" value="PROCESS"/>
+ <details key="UNION_PROPERTIES" value="PROCESS"/>
+ <details key="UNTYPED_PROPERTIES" value="PROCESS"/>
+ <details key="DUPLICATE_FEATURES" value="PROCESS"/>
+ <details key="SUBSETTING_PROPERTIES" value="PROCESS"/>
+ <details key="VALIDATION_DELEGATES" value="PROCESS"/>
+ <details key="OPPOSITE_ROLE_NAMES" value="PROCESS"/>
+ <details key="COMMENTS" value="PROCESS"/>
+ <details key="DUPLICATE_FEATURE_INHERITANCE" value="PROCESS"/>
+ <details key="DUPLICATE_OPERATIONS" value="PROCESS"/>
+ <details key="PROPERTY_DEFAULT_EXPRESSIONS" value="PROCESS"/>
+ <details key="INVARIANT_CONSTRAINTS" value="PROCESS"/>
+ <details key="REDEFINING_PROPERTIES" value="PROCESS"/>
+ <details key="ANNOTATION_DETAILS" value="PROCESS"/>
+ <details key="NON_API_INVARIANTS" value="PROCESS"/>
+ <details key="DUPLICATE_OPERATION_INHERITANCE" value="PROCESS"/>
+ <details key="REDEFINING_OPERATIONS" value="PROCESS"/>
+ <details key="INVOCATION_DELEGATES" value="PROCESS"/>
+ <details key="DERIVED_FEATURES" value="PROCESS"/>
+ <details key="OPERATION_BODIES" value="PROCESS"/>
+ <details key="CAMEL_CASE_NAMES" value="IGNORE"/>
+ <details key="SUPER_CLASS_ORDER" value="PROCESS"/>
+ </genAnnotations>
+ <foreignModel>ProfileExternalization.profile.uml</foreignModel>
+ <genPackages xsi:type="genmodel:GenPackage" prefix="ProfileExternalization" basePackage="org.eclipse.papyrus.uml.decoratormodel"
+ disposableProviderFactory="true" fileExtensions="profileext" ecorePackage="profileExternalization.ecore#/"
+ operationsPackage="org.eclipse.papyrus.uml.decoratormodel.profileExternalization.internal.operations">
+ <genClasses xsi:type="genmodel:GenClass" ecoreClass="profileExternalization.ecore#//ApplyProfiles">
+ <genFeatures xsi:type="genmodel:GenFeature" notify="false" createChild="false"
+ propertySortChoices="true" ecoreFeature="ecore:EReference profileExternalization.ecore#//ApplyProfiles/base_Dependency"/>
+ <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="profileExternalization.ecore#//ApplyProfiles/getAppliedProfiles"/>
+ <genOperations xsi:type="genmodel:GenOperation" ecoreOperation="profileExternalization.ecore#//ApplyProfiles/getExternalizedAppliedProfilePackages"/>
+ </genClasses>
+ </genPackages>
+</genmodel:GenModel>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.notation b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.notation
new file mode 100644
index 00000000000..2c286961aff
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.notation
@@ -0,0 +1,86 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram 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:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_M2EtsEWjEeSNXJj2G3jVCw" type="PapyrusUMLProfileDiagram" name="stereotypes" measurementUnit="Pixel">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hcw_sEW1EeSNXJj2G3jVCw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hcw_sUW1EeSNXJj2G3jVCw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hcw_skW1EeSNXJj2G3jVCw" key="StereotypeList" value="Ecore::EPackage"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hcxmwEW1EeSNXJj2G3jVCw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hcxmwUW1EeSNXJj2G3jVCw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hcxmwkW1EeSNXJj2G3jVCw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_OOR2wEWjEeSNXJj2G3jVCw" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_OOX9YEWjEeSNXJj2G3jVCw" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OOc14EWjEeSNXJj2G3jVCw" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OOc14UWjEeSNXJj2G3jVCw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OOc14kWjEeSNXJj2G3jVCw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OOc140WjEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OOc15EWjEeSNXJj2G3jVCw"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_OOdc8EWjEeSNXJj2G3jVCw" type="1019">
+ <children xmi:type="notation:Node" xmi:id="_baY2QEWkEeSNXJj2G3jVCw" type="3020">
+ <element xmi:type="uml:Operation" href="ProfileExternalization.profile.uml#_baC4AEWkEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_baY2QUWkEeSNXJj2G3jVCw"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_hadJAEWpEeSNXJj2G3jVCw" type="3020">
+ <element xmi:type="uml:Operation" href="ProfileExternalization.profile.uml#_hab64EWpEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_hadwEEWpEeSNXJj2G3jVCw"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_OOdc8UWjEeSNXJj2G3jVCw"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_OOdc8kWjEeSNXJj2G3jVCw"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_OOdc80WjEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OOdc9EWjEeSNXJj2G3jVCw"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="ProfileExternalization.profile.uml#_ON8fkEWjEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_OOSd0EWjEeSNXJj2G3jVCw" x="129" y="139"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_c82kAEWjEeSNXJj2G3jVCw" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_c84ZMEWjEeSNXJj2G3jVCw" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c84ZMUWjEeSNXJj2G3jVCw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c84ZMkWjEeSNXJj2G3jVCw" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c84ZM0WjEeSNXJj2G3jVCw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c84ZNEWjEeSNXJj2G3jVCw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_c84ZNUWjEeSNXJj2G3jVCw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_c82kAkWjEeSNXJj2G3jVCw" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_c82kA0WjEeSNXJj2G3jVCw" x="549" y="148"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_hb0CoEWjEeSNXJj2G3jVCw" type="1014">
+ <children xmi:type="notation:DecorationNode" xmi:id="_hb0CokWjEeSNXJj2G3jVCw" type="1015"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_hb0psEWjEeSNXJj2G3jVCw" type="5063"/>
+ <element xmi:type="uml:Constraint" href="ProfileExternalization.profile.uml#_hbLwgEWjEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hb0CoUWjEeSNXJj2G3jVCw" x="177" y="284"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_7MEUoEWjEeSNXJj2G3jVCw" type="1014">
+ <children xmi:type="notation:DecorationNode" xmi:id="_7ME7sEWjEeSNXJj2G3jVCw" type="1015"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_7ME7sUWjEeSNXJj2G3jVCw" type="5063"/>
+ <element xmi:type="uml:Constraint" href="ProfileExternalization.profile.uml#_7MDGgEWjEeSNXJj2G3jVCw"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_7MEUoUWjEeSNXJj2G3jVCw" x="141" y="369"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_M2EtsUWjEeSNXJj2G3jVCw" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_M2EtskWjEeSNXJj2G3jVCw"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_M2Ets0WjEeSNXJj2G3jVCw">
+ <owner xmi:type="uml:Profile" href="ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ <edges xmi:type="notation:Connector" xmi:id="_eLjLwEWjEeSNXJj2G3jVCw" type="1013" source="_OOR2wEWjEeSNXJj2G3jVCw" target="_c82kAEWjEeSNXJj2G3jVCw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_eLjLwUWjEeSNXJj2G3jVCw"/>
+ <element xmi:type="uml:Extension" href="ProfileExternalization.profile.uml#_eLao4EWjEeSNXJj2G3jVCw"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_eLjLwkWjEeSNXJj2G3jVCw" points="[50, -5, -255, 0]$[291, -17, -14, -12]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_efEksEWjEeSNXJj2G3jVCw" id="(1.0,0.22522522522522523)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_eL8NUEWjEeSNXJj2G3jVCw" id="(0.0,0.32)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_iMuiMEWjEeSNXJj2G3jVCw" type="8500" source="_hb0CoEWjEeSNXJj2G3jVCw" target="_OOR2wEWjEeSNXJj2G3jVCw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_iMuiMUWjEeSNXJj2G3jVCw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_iMuiMkWjEeSNXJj2G3jVCw" points="[0, 0, 91, 94]$[-70, -115, 21, -21]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iM0BwEWjEeSNXJj2G3jVCw" id="(0.08588957055214724,0.15)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_iM0o0EWjEeSNXJj2G3jVCw" id="(0.24919093851132687,0.918918918918919)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_7byysEWjEeSNXJj2G3jVCw" type="8500" source="_7MEUoEWjEeSNXJj2G3jVCw" target="_OOR2wEWjEeSNXJj2G3jVCw">
+ <styles xmi:type="notation:FontStyle" xmi:id="_7byysUWjEeSNXJj2G3jVCw"/>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_7byyskWjEeSNXJj2G3jVCw" points="[0, 0, 93, 126]$[-79, -109, 14, 17]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7b1O8EWjEeSNXJj2G3jVCw" id="(0.05396825396825397,0.03333333333333333)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_7b12AEWjEeSNXJj2G3jVCw" id="(0.12631578947368421,0.95)"/>
+ </edges>
+</notation:Diagram>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.uml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.uml
new file mode 100644
index 00000000000..ef644591746
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/ProfileExternalization.profile.uml
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA">
+ <uml:Profile xmi:id="_Mzzc0EWjEeSNXJj2G3jVCw" name="ProfileExternalization" URI="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" metaclassReference="_c8xEcEWjEeSNXJj2G3jVCw">
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_c8xEcEWjEeSNXJj2G3jVCw" alias="Dependency">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </elementImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_ON8fkEWjEeSNXJj2G3jVCw" name="ApplyProfiles">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_hbLwgEWjEeSNXJj2G3jVCw" name="suppliers_are_packages">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_47v30EWjEeSNXJj2G3jVCw">
+ <language>OCL</language>
+ <body>base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))</body>
+ </specification>
+ </ownedRule>
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_7MDGgEWjEeSNXJj2G3jVCw" name="clients_are_packages">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_CGxc8EWkEeSNXJj2G3jVCw">
+ <language>OCL</language>
+ <body>base_Dependency.client->forAll(oclIsKindOf(uml::Package))</body>
+ </specification>
+ </ownedRule>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_eLaB0EWjEeSNXJj2G3jVCw" name="base_Dependency" association="_eLao4EWjEeSNXJj2G3jVCw">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_baC4AEWkEeSNXJj2G3jVCw" name="getAppliedProfiles">
+ <ownedRule xmi:type="uml:Constraint" xmi:id="_-EjIMEWkEeSNXJj2G3jVCw" name="">
+ <specification xmi:type="uml:OpaqueExpression" xmi:id="_-EjIMUWkEeSNXJj2G3jVCw">
+ <language>OCL</language>
+ <body>base_Dependency.supplier->selectByKind(uml::Package).appliedProfile</body>
+ </specification>
+ </ownedRule>
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_n4wbcEWkEeSNXJj2G3jVCw" direction="return" effect="read">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Profile"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_pjhUIEWkEeSNXJj2G3jVCw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_pjh7MEWkEeSNXJj2G3jVCw" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_hab64EWpEeSNXJj2G3jVCw" name="getExternalizedAppliedProfilePackages">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_pHz2QEWpEeSNXJj2G3jVCw" direction="return" effect="read">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_qF6dQEWpEeSNXJj2G3jVCw"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_qF7EUEWpEeSNXJj2G3jVCw" value="*"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_eLao4EWjEeSNXJj2G3jVCw" name="E_ApplyProfiles_Dependency1" memberEnd="_eLao4UWjEeSNXJj2G3jVCw _eLaB0EWjEeSNXJj2G3jVCw">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_eLao4UWjEeSNXJj2G3jVCw" name="extension_ApplyProfiles" type="_ON8fkEWjEeSNXJj2G3jVCw" aggregation="composite" association="_eLao4EWjEeSNXJj2G3jVCw"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_bkeWoEW1EeSNXJj2G3jVCw">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bkxRkEW1EeSNXJj2G3jVCw" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Profile>
+ <Ecore:EPackage xmi:id="_hcTFoEW1EeSNXJj2G3jVCw" base_Package="_Mzzc0EWjEeSNXJj2G3jVCw" packageName="profileExternalization" nsPrefix="profileext" basePackage="org.eclipse.papyrus.uml.decoratormodel"/>
+</xmi:XMI>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/profileExternalization.ecore b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/profileExternalization.ecore
new file mode 100644
index 00000000000..1b80f2a96ac
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/model/profileExternalization.ecore
@@ -0,0 +1,32 @@
+<?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="profileExternalization" nsURI="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization"
+ nsPrefix="profileext">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="validationDelegates" value="http://www.eclipse.org/emf/2002/Ecore/OCL"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <details key="originalName" value="ProfileExternalization"/>
+ </eAnnotations>
+ <eClassifiers xsi:type="ecore:EClass" name="ApplyProfiles">
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore">
+ <details key="constraints" value="suppliers_are_packages clients_are_packages"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/Ecore/OCL">
+ <details key="suppliers_are_packages" value="base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))"/>
+ <details key="clients_are_packages" value="base_Dependency.client->forAll(oclIsKindOf(uml::Package))"/>
+ </eAnnotations>
+ <eAnnotations source="http://www.eclipse.org/emf/2002/GenModel">
+ <details key="documentation" value="base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))&#xA;base_Dependency.client->forAll(oclIsKindOf(uml::Package))"/>
+ </eAnnotations>
+ <eOperations name="getAppliedProfiles" ordered="false" upperBound="-1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Profile"/>
+ <eOperations name="getExternalizedAppliedProfilePackages" ordered="false" upperBound="-1"
+ eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Package"/>
+ <eStructuralFeatures xsi:type="ecore:EReference" name="base_Dependency" ordered="false"
+ lowerBound="1" eType="ecore:EClass ../../org.eclipse.uml2.uml/model/UML.ecore#//Dependency">
+ <eAnnotations source="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName">
+ <details key="body" value="extension_ApplyProfiles"/>
+ </eAnnotations>
+ </eStructuralFeatures>
+ </eClassifiers>
+</ecore:EPackage>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties
new file mode 100644
index 00000000000..b7baf78fbf7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.properties
@@ -0,0 +1,14 @@
+# Copyright (c) 2014 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+
+pluginName = Papyrus Decorator Models Core
+providerName = Eclipse Modeling Project
+
+content-type.name = Papyrus Profile Application
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.xml
new file mode 100644
index 00000000000..544441f79eb
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/plugin.xml
@@ -0,0 +1,83 @@
+<?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.decoratormodel.internal.expressions.FilePropertyTester"
+ id="org.eclipse.papyrus.uml.decoratormodel.file"
+ namespace="org.eclipse.papyrus.uml.decoratormodel"
+ properties="isDecoratorModel"
+ type="org.eclipse.core.resources.IFile">
+ </propertyTester>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.model">
+ <model
+ classname="org.eclipse.papyrus.uml.decoratormodel.model.DecoratorModel">
+ <dependency>
+ <loadAfter
+ identifier="org.eclipse.papyrus.infra.core.resource.uml.UmlModel">
+ </loadAfter>
+ </dependency>
+ <modelSnippet
+ classname="org.eclipse.papyrus.uml.decoratormodel.model.UMLSnippet"
+ description="UML model listener support for loaded decorator models.">
+ </modelSnippet>
+ </model>
+ </extension>
+ <extension
+ point="org.eclipse.emf.ecore.uri_mapping">
+ <mapping
+ source="pathmap://PAPYRUS_PROFILEEXT/"
+ target="platform:/plugin/org.eclipse.papyrus.uml.decoratormodel/model/">
+ </mapping>
+ </extension>
+
+ <extension point="org.eclipse.emf.ecore.generated_package">
+ <!-- @generated ProfileExternalization.profile -->
+ <package
+ uri="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization"
+ class="org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage"
+ genModel="model/ProfileExternalization.profile.genmodel"/>
+ </extension>
+ <extension
+ point="org.eclipse.uml2.uml.generated_package">
+ <profile
+ location="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"
+ uri="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization">
+ </profile>
+ </extension>
+ <extension
+ point="org.eclipse.core.contenttype.contentTypes">
+ <content-type
+ base-type="org.eclipse.uml2.uml"
+ id="org.eclipse.papyrus.uml.decoratormodel.decorator_model"
+ name="%content-type.name"
+ priority="normal">
+ <describer
+ class="org.eclipse.papyrus.infra.emf.resource.AnyRootNamespaceContentHandler$Describer">
+ <parameter
+ name="namespacePattern"
+ value="http://www\.eclipse\.org/Papyrus/2014/profile/profileExternalization" />
+ </describer>
+ </content-type>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.emf.readonly.readOnlyHandler">
+ <readOnlyHandler
+ id="org.eclipse.papyrus.uml.decoratormodel.DecoratorModel"
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelReadOnlyHandler"
+ priority="50">
+ <affinity
+ axis="discretion">
+ </affinity>
+ </readOnlyHandler>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.uml.tools.profileApplicationDelegates">
+ <delegate
+ class="org.eclipse.papyrus.uml.decoratormodel.internal.providers.ExternalizedProfileApplicationDelegate">
+ </delegate>
+ </extension>
+</plugin>
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml
new file mode 100644
index 00000000000..3c362f5eae1
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../../releng/top-pom-main.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/Activator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/Activator.java
index 5272fa70ce6..8eb6aaa4ba0 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/Activator.java
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/Activator.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,37 +8,34 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests;
+package org.eclipse.papyrus.uml.decoratormodel;
+
+import org.eclipse.core.runtime.Plugin;
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 {
+public class Activator extends Plugin {
// The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.profile.externalresource.tests"; //$NON-NLS-1$
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.decoratormodel"; //$NON-NLS-1$
// The shared instance
private static Activator plugin;
-
+
/** logger helper */
public static LogHelper log;
- /**
- * The constructor
- */
public Activator() {
+ super();
}
- /**
- * {@inheritDoc}
- */
@Override
public void start(BundleContext context) throws Exception {
super.start(context);
@@ -46,16 +43,13 @@ public class Activator extends AbstractUIPlugin {
log = new LogHelper(this);
}
- /**
- * {@inheritDoc}
- */
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
log = null;
super.stop(context);
}
-
+
/**
* Returns the shared instance
*
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java
new file mode 100644
index 00000000000..59026a769d2
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/DecoratorModelUtils.java
@@ -0,0 +1,1201 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.helper;
+
+import java.io.BufferedInputStream;
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.content.IContentDescription;
+import org.eclipse.core.runtime.content.IContentType;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.command.CompoundCommand;
+import org.eclipse.emf.common.command.UnexecutableCommand;
+import org.eclipse.emf.common.util.TreeIterator;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.ContentHandler;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.InternalEList;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.emf.resource.AnyRootNamespaceContentHandler;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.internal.commands.CreateDecoratorModelCommand;
+import org.eclipse.papyrus.uml.decoratormodel.internal.commands.DeleteDecoratorModelCommand;
+import org.eclipse.papyrus.uml.decoratormodel.internal.commands.ReclaimProfileApplicationsCommand;
+import org.eclipse.papyrus.uml.decoratormodel.internal.commands.SaveDecoratorModelCommand;
+import org.eclipse.papyrus.uml.decoratormodel.internal.commands.SeparateProfileApplicationsCommand;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.model.DecoratorModel;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage;
+import org.eclipse.papyrus.uml.tools.utils.CustomUMLUtil;
+import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Component;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.DirectedRelationship;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+import com.google.common.base.Function;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.SetMultimap;
+import com.google.common.collect.Sets;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+import com.google.common.util.concurrent.UncheckedExecutionException;
+
+/**
+ * Utility class for stereotype application management in external resources. Descriptions of individual
+ * methods indicate whether they do or do not access the decorator model index, to assist in determining
+ * appropriate code patterns to ensure liveness of threads etc.
+ */
+public class DecoratorModelUtils {
+
+ public static final URI PROFILE_URI = URI.createURI("pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw", true); //$NON-NLS-1$
+
+ public static final IContentType DECORATOR_MODEL_CONTENT_TYPE = Platform.getContentTypeManager().getContentType("org.eclipse.papyrus.uml.decoratormodel.decorator_model"); //$NON-NLS-1$
+
+ private static final ContentHandler DECORATOR_MODEL_CONTENT_HANDLER = new AnyRootNamespaceContentHandler(DECORATOR_MODEL_CONTENT_TYPE.getId(), null, ProfileExternalizationPackage.eNS_URI);
+
+ private static final String STEREOTYPE_PREFIX = "ProfileExternalization::"; //$NON-NLS-1$
+
+ public static final String APPLY_PROFILES_QNAME = STEREOTYPE_PREFIX + "ApplyProfiles"; //$NON-NLS-1$
+
+ private static final Object LOADED_RESOURCES_CACHE_KEY = new Object();
+
+ private static final Object UNLOADED_RESOURCE_DECORATORS_CACHE_KEY = new Object();
+
+ private static final Object UNLOADED_PACKAGE_DECORATORS_CACHE_KEY = new Object();
+
+ private static final Object INTRINSIC_PROFILE_APPLICATIONS_CACHE_KEY = new Object();
+
+ public static void externalizeProfileApplication(ProfileApplication profileApplication, Resource decoratorResource) {
+ Resource sourceResource = profileApplication.eResource();
+ ResourceSet resourceSet = (sourceResource == null) ? null : sourceResource.getResourceSet();
+
+ // Ensure existence of the root package for external resource packages.
+ // The Externalization Profile is applied here so that it is not inherited
+ // by the packages in the user model
+ Package decoratorModel = getDecoratorModel(decoratorResource);
+
+ // Ensure existence of the externalizing package
+ Package externalPackage = getDecoratorPackage(decoratorModel, profileApplication.getApplyingPackage(), true);
+
+ // Move the profile application to the externalizing package
+ externalPackage.getProfileApplications().add(profileApplication);
+
+ // Find all of the profile's stereotype applications in the source resource
+ List<EObject> stereotypeApplications = new ArrayList<EObject>();
+ for (EObject next : sourceResource.getContents()) {
+ if (!(next instanceof Element) && isDefinedBy(profileApplication, next)) {
+ stereotypeApplications.add(next);
+ }
+ }
+
+ // Move them
+ StereotypeApplicationHelper stereotypeHelper = StereotypeApplicationHelper.getInstance(resourceSet);
+ for (EObject next : stereotypeApplications) {
+ stereotypeHelper.addToContainmentList(UMLUtil.getBaseElement(next), next);
+ }
+ }
+
+ public static void internalizeProfileApplications(Iterable<? extends ProfileApplication> profileApplications, IDeleteEmptyDecoratorModelsPolicy deletePolicy) {
+ List<Package> emptyDecoratorModels = Lists.newArrayList();
+
+ for (ProfileApplication profileApplication : profileApplications) {
+ Resource sourceResource = profileApplication.eResource();
+ ResourceSet resourceSet = (sourceResource == null) ? null : sourceResource.getResourceSet();
+
+ Package externalPackage = profileApplication.getApplyingPackage();
+ Package applyingPackage = getUserPackage(externalPackage);
+
+ // Find all of the profile's stereotype applications in the source resource
+ List<EObject> stereotypeApplications = new ArrayList<EObject>();
+ for (EObject next : sourceResource.getContents()) {
+ if (!(next instanceof Element) && isDefinedBy(profileApplication, next)) {
+ stereotypeApplications.add(next);
+ }
+ }
+
+ // Move the profile application to the applying package
+ applyingPackage.getProfileApplications().add(profileApplication);
+
+ // Delete the external package if it's no longer needed
+ Package root = externalPackage.getNestingPackage();
+ List<ProfileApplication> remaining = externalPackage.getProfileApplications();
+ if (remaining.isEmpty()) {
+ externalPackage.destroy();
+
+ // And the root, too
+ if ((root != null) && root.getNestedPackages().isEmpty()) {
+ emptyDecoratorModels.add(root);
+ }
+ }
+
+ // Move the stereotype applications
+ StereotypeApplicationHelper stereotypeHelper = StereotypeApplicationHelper.getInstance(resourceSet);
+ for (EObject next : stereotypeApplications) {
+ stereotypeHelper.addToContainmentList(UMLUtil.getBaseElement(next), next);
+ }
+ }
+
+ if (!emptyDecoratorModels.isEmpty() && shouldDelete(emptyDecoratorModels, deletePolicy)) {
+ CustomUMLUtil.destroyAll(emptyDecoratorModels);
+ }
+ }
+
+ private static boolean shouldDelete(Collection<? extends Package> decoratorModels, IDeleteEmptyDecoratorModelsPolicy deletePolicy) {
+ boolean result = (deletePolicy == null);
+
+ if (!result) {
+ // Consult the policy
+ Set<Resource> decoratorModelResources = Sets.newLinkedHashSet();
+ for (Package next : decoratorModels) {
+ decoratorModelResources.add(next.eResource());
+ }
+
+ result = deletePolicy.shouldDeleteDecoratorModels(decoratorModelResources);
+ }
+
+ return result;
+ }
+
+ public static Profile getExternalizationProfile(ResourceSet resourceSet) {
+ return (Profile) resourceSet.getEObject(PROFILE_URI, true);
+ }
+
+ public static Package getDecoratorModel(Resource resource) {
+ Package result = null;
+
+ Profile externalizationProfile = getExternalizationProfile(resource.getResourceSet());
+ for (Package next : Iterables.filter(resource.getContents(), Package.class)) {
+ if (next.isProfileApplied(externalizationProfile)) {
+ result = next;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ private static boolean isDefinedBy(ProfileApplication profileApplication, EObject stereotypeApplication) {
+ boolean result = false;
+
+ Element baseElement = UMLUtil.getBaseElement(stereotypeApplication);
+ if (baseElement != null) {
+ Stereotype stereotype = UMLUtil.getStereotype(stereotypeApplication);
+ if (stereotype != null) {
+ result = profileApplication.getAppliedDefinition(stereotype) == stereotypeApplication.eClass();
+ }
+ }
+
+ return result;
+ }
+
+ private static boolean isApplyProfiles(Dependency dependency) {
+ boolean result = false;
+
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(dependency);
+ if (cache != null) {
+ for (EStructuralFeature.Setting setting : cache.getNonNavigableInverseReferences(dependency)) {
+ if (setting.getEStructuralFeature() == ProfileExternalizationPackage.Literals.APPLY_PROFILES__BASE_DEPENDENCY) {
+ result = true;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries the packages in currently loaded decorator models that provide profile applications to a given package.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param package_
+ * a package
+ * @return its currently loaded decorator-model packages
+ */
+ public static Iterable<Package> getDecoratorPackages(Package package_) {
+ Set<Package> result = null;
+
+ for (ApplyProfiles next : getDecoratorModelDependencies(package_)) {
+ if (result == null) {
+ result = new LinkedHashSet<Package>();
+ }
+ result.addAll(next.getExternalizedAppliedProfilePackages());
+ }
+
+ return (result == null) ? Collections.<Package> emptySet() : result;
+ }
+
+ /**
+ * Queries the currently loaded profile applications of a package that are provided by decorator models.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param package_
+ * a package
+ * @return its currently loaded decorator-model profile applications
+ */
+ public static Iterable<ProfileApplication> getDecoratorModelProfileApplications(Package package_) {
+ Set<ProfileApplication> result = null;
+
+ for (ApplyProfiles next : getDecoratorModelDependencies(package_)) {
+ if (result == null) {
+ result = new LinkedHashSet<ProfileApplication>();
+ }
+ for (Package externalPackage : next.getExternalizedAppliedProfilePackages()) {
+ result.addAll(externalPackage.getProfileApplications());
+ }
+ }
+
+ return (result == null) ? Collections.<ProfileApplication> emptySet() : result;
+ }
+
+ /**
+ * Queries the package in the user model to which an externalized profile application applies a profile.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param profileApplication
+ * a profile application
+ * @return the user-model package to which it applies a profile
+ */
+ public static Package getUserModelApplyingPackage(ProfileApplication profileApplication) {
+ Package applying = profileApplication.getApplyingPackage();
+ Package result = applying; // Maybe it's not actually an externalized profile application
+
+ if (applying != null) {
+ for (Dependency next : Iterables.filter(applying.getTargetDirectedRelationships(UMLPackage.Literals.DEPENDENCY), Dependency.class)) {
+ if (isApplyProfiles(next)) {
+ Package clientPackage = Iterables.getFirst(Iterables.filter(next.getClients(), Package.class), null);
+ if (clientPackage != null) {
+ result = clientPackage;
+ break;
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries a mapping of the currently loaded profile applications in a decorator model resource.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param decoratorModel
+ * a decorator model resource
+ *
+ * @return a mapping of user-model package to applied profile as specified by the decorator model
+ */
+ public static Map<Package, Profile> getDecoratorProfileApplications(Resource decoratorModel) {
+ Map<Package, Profile> result = Maps.newHashMap();
+
+ for (ApplyProfiles next : Iterables.filter(decoratorModel.getContents(), ApplyProfiles.class)) {
+ Dependency base = next.getBase_Dependency();
+ if (base != null) {
+ for (Package applying : Iterables.filter(base.getClients(), Package.class)) {
+ for (Profile profile : next.getAppliedProfiles()) {
+ result.put(applying, profile);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries the currently loaded applied profiles of a package from decorator models.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param package_
+ * a user model package
+ *
+ * @return its applied profiles from currently loaded decorator models
+ */
+ public static Iterable<Profile> getDecoratorModelAppliedProfiles(Package package_) {
+ Set<Profile> result = null;
+
+ for (ApplyProfiles next : getDecoratorModelDependencies(package_)) {
+ if (result == null) {
+ result = new LinkedHashSet<Profile>();
+ }
+ result.addAll(next.getAppliedProfiles());
+ }
+
+ return (result == null) ? Collections.<Profile> emptySet() : result;
+ }
+
+ /**
+ * Queries the mapping of URIs of all applied profiles of a package from decorator models, including those inherited
+ * from ancestor packages, to mappings of URIs of decorator models to URIs of Ecore definitions applied by those decorators.
+ * The second-order map is necessary because multiple decorator models can apply different definitions of the same profile
+ * to the same package.
+ * <p>
+ * This method <em>accesses the decorator model index</em> and is therefore not suitable for use in time-sensitive code because an invocation may block the caller for an indeterminate interval. It is equivalent to invoking
+ * {@code getAllDecoratorModelAppliedProfileDefinitions(package_, true, true)}.
+ *
+ * @param package_
+ * a user model package
+ *
+ * @return the mapping of URIs of all profiles that it applies, loaded and unloaded, to applied Ecore definitions by decorator model
+ *
+ * @throws CoreException
+ * on failure to access the decorator model index
+ *
+ * @see #getAllDecoratorModelAppliedProfileDefinitions(Package, boolean, boolean)
+ */
+ public static Map<URI, Map<URI, URI>> getAllDecoratorModelAppliedProfileDefinitions(Package package_) throws CoreException {
+ return getAllDecoratorModelAppliedProfileDefinitions(package_, true, true);
+ }
+
+ /**
+ * Queries the mapping of URIs of all applied profiles of a package from decorator models, including those inherited
+ * from ancestor packages, to mappings of URIs of decorator models to URIs of Ecore definitions applied by those decorators.
+ * The second-order map is necessary because multiple decorator models can apply different definitions of the same profile
+ * to the same package.
+ * <p>
+ * This method <em>accesses the decorator model index</em> if {@code includeUnloaded} is {@code true} and is therefore not suitable for use in time-sensitive code in that case because an invocation may block the caller for an indeterminate interval.
+ *
+ * @param package_
+ * a user model package
+ * @param includeLoaded
+ * whether to include profile definitions from decorator models that are currently loaded
+ * @param includeUnloaded
+ * whether to include profile definitions from decorator models that are <em>not</em> currently loaded.
+ * Obviously, it is not useful to exclude both loaded and unloaded decorator models, because that guarantees an empty result
+ *
+ * @return the mapping of URIs of all profiles that it applies, loaded and unloaded, to applied Ecore definitions by decorator model
+ *
+ * @throws CoreException
+ * on failure to access the decorator model index in the {@code includeUnloaded} case
+ */
+ public static Map<URI, Map<URI, URI>> getAllDecoratorModelAppliedProfileDefinitions(Package package_, boolean includeLoaded, boolean includeUnloaded) throws CoreException {
+ Map<URI, Map<URI, URI>> result = Maps.newLinkedHashMap();
+
+ for (Package each : Iterables.concat(Collections.singleton(package_), package_.allOwningPackages())) {
+ if (includeLoaded) {
+ Iterable<ProfileApplication> loaded = getDecoratorModelProfileApplications(each);
+ if (!Iterables.isEmpty(loaded)) {
+ for (ProfileApplication next : loaded) {
+ Profile profile = next.getAppliedProfile();
+ EPackage definition = next.getAppliedDefinition();
+ if ((profile != null) && (definition != null)) {
+ URI profileURI = EcoreUtil.getURI(profile);
+ URI decoratorURI = next.eResource().getURI();
+ URI definitionURI = EcoreUtil.getURI(definition);
+
+ Map<URI, URI> definitions = result.get(profileURI);
+ if (definitions == null) {
+ definitions = Maps.newHashMap();
+ result.put(profileURI, definitions);
+ }
+
+ // Only take the first package's loaded definition URI because that is the one
+ // that is actually applied; any higher ones are occluded
+ if (!definitions.containsKey(decoratorURI)) {
+ definitions.put(decoratorURI, definitionURI);
+ }
+ }
+ }
+ }
+ }
+
+ if (includeUnloaded) {
+ Map<URI, Map<URI, URI>> index = DecoratorModelIndex.getInstance().getAllAppliedProfileDefinitions(EcoreUtil.getURI(each));
+ if (!index.isEmpty()) {
+ // Only add profiles from decorator models that aren't currently loaded
+ ResourceSet rset = EMFHelper.getResourceSet(each);
+ if (rset != null) {
+ for (URI profile : index.keySet()) {
+ Map<URI, URI> profileResult = result.get(profile);
+ if (profileResult == null) {
+ profileResult = Maps.newHashMap();
+ result.put(profile, profileResult);
+ }
+ for (Map.Entry<URI, URI> application : index.get(profile).entrySet()) {
+ // Add profile definitions from (profile, decorator) pairs that we do not yet have
+ // and that are not loaded
+ URI decorator = application.getKey();
+ if (!profileResult.containsKey(decorator)) {
+ Resource resource = rset.getResource(decorator, false);
+ if ((resource == null) || !resource.isLoaded()) {
+ profileResult.put(decorator, application.getValue());
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ static Iterable<ApplyProfiles> getDecoratorModelDependencies(Package package_) {
+ List<ApplyProfiles> result = null;
+
+ for (Dependency dependency : package_.getClientDependencies()) {
+ for (EStructuralFeature.Setting setting : CacheAdapter.getCacheAdapter(dependency).getNonNavigableInverseReferences(dependency)) {
+ if (setting.getEStructuralFeature() == ProfileExternalizationPackage.Literals.APPLY_PROFILES__BASE_DEPENDENCY) {
+ if (result == null) {
+ result = new ArrayList<ApplyProfiles>();
+ }
+
+ result.add((ApplyProfiles) setting.getEObject());
+ }
+ }
+ }
+
+ return (result == null) ? Collections.<ApplyProfiles> emptyList() : result;
+ }
+
+ public static Package getDecoratorPackage(Package externalizationModel, Package userPackage, boolean createIfNecessary) {
+ Package result = null;
+ for (Package next : externalizationModel.getNestedPackages()) {
+ if (getUserPackage(next) == userPackage) {
+ result = next;
+ break;
+ }
+ }
+ if (result == null) {
+ result = externalizationModel.createNestedPackage(UML2Util.getValidJavaIdentifier(userPackage.getQualifiedName()));
+ Dependency dependency = UMLFactory.eINSTANCE.createDependency();
+ dependency.getClients().add(userPackage);
+ dependency.getSuppliers().add(result);
+ result.getPackagedElements().add(dependency);
+
+ // This stereotype name is unambiguous at this point because the only available profile
+ // is the externalization profile inherited from the root package
+ dependency.applyStereotype(dependency.getApplicableStereotype(APPLY_PROFILES_QNAME));
+ }
+
+ return result;
+ }
+
+ static Package getUserPackage(Package externalPackage) {
+ Package result = null;
+
+ for (DirectedRelationship next : externalPackage.getTargetDirectedRelationships(UMLPackage.Literals.DEPENDENCY)) {
+ for (EStructuralFeature.Setting setting : CacheAdapter.getCacheAdapter(next).getNonNavigableInverseReferences(next)) {
+ if (setting.getEStructuralFeature() == ProfileExternalizationPackage.Literals.APPLY_PROFILES__BASE_DEPENDENCY) {
+ result = Iterables.getFirst(Iterables.filter(next.getSources(), Package.class), null);
+ if (result != null) {
+ break;
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries whether a package has the externalization profile applied that is used by decorator models.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param package_
+ * a package
+ * @return whether it has the externalization profile applied
+ */
+ public static boolean hasExternalizationProfile(Package package_) {
+ boolean result = false;
+
+ for (Profile next : package_.getAppliedProfiles()) {
+ if (PROFILE_URI.equals(EcoreUtil.getURI(next))) {
+ result = true;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ public static Command createSeparateProfileApplicationsCommand(Iterable<? extends ProfileApplication> profileApplications, URI resourceURI, String modelName) {
+ Command result;
+
+ ProfileApplication any = Iterables.getFirst(profileApplications, null);
+
+ if (any == null) {
+ result = UnexecutableCommand.INSTANCE;
+ } else {
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(any);
+ if (domain == null) {
+ result = UnexecutableCommand.INSTANCE;
+ } else {
+ // First, ensure the existence of the decorator model resource
+ result = new CreateDecoratorModelCommand(domain, resourceURI, modelName);
+ CompoundCommand compound = new CompoundCommand(1, result.getLabel(), result.getDescription());
+ compound.append(result);
+ result = compound;
+
+ // Then put the profile applications in it
+ compound.append(new SeparateProfileApplicationsCommand(domain, profileApplications, resourceURI));
+
+ // And, finally, ensure that the model-set will save the decorator model when the editor is next saved
+ if (domain.getResourceSet() instanceof ModelSet) {
+ compound.append(new SaveDecoratorModelCommand((ModelSet) domain.getResourceSet(), resourceURI));
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Creates a command that reintegrates the specified profile applications into the user model proper. Empty decorator models will always be deleted.
+ *
+ * @param profileApplications
+ * the externalized profile applications to reintegrate
+ *
+ * @return the delete command, or an unexecutable command if the request is invalid for some reason
+ *
+ * @see #createReclaimProfileApplicationsCommand(Iterable, IDeleteEmptyDecoratorModelsPolicy)
+ */
+ public static Command createReclaimProfileApplicationsCommand(Iterable<? extends ProfileApplication> profileApplications) {
+ return createReclaimProfileApplicationsCommand(profileApplications, null);
+ }
+
+ /**
+ * Creates a command that reintegrates the specified profile applications into the user model proper.
+ *
+ * @param profileApplications
+ * the externalized profile applications to reintegrate
+ * @param deletePolicy
+ * an optional policy determining whether any decorator models that are left without profile applications should be deleted. May be {@code null}, in which case empty decorator models will be deleted
+ *
+ * @return the delete command, or an unexecutable command if the request is invalid for some reason
+ */
+ public static Command createReclaimProfileApplicationsCommand(Iterable<? extends ProfileApplication> profileApplications, IDeleteEmptyDecoratorModelsPolicy deletePolicy) {
+ Command result;
+
+ ProfileApplication any = Iterables.getFirst(profileApplications, null);
+
+ if (any == null) {
+ result = UnexecutableCommand.INSTANCE;
+ } else {
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(any);
+ if (domain == null) {
+ result = UnexecutableCommand.INSTANCE;
+ } else {
+ result = new ReclaimProfileApplicationsCommand(domain, profileApplications, deletePolicy);
+ CompoundCommand compound = new CompoundCommand(0, result.getLabel(), result.getDescription());
+ compound.append(result);
+ result = compound;
+
+ // Managing the resources to delete on save only applies to model-sets
+ if (domain.getResourceSet() instanceof ModelSet) {
+ ModelSet modelSet = (ModelSet) domain.getResourceSet();
+ Set<URI> resourcesToDelete = Sets.newHashSet();
+ for (ProfileApplication next : profileApplications) {
+ Resource toDelete = next.eResource();
+ if (resourcesToDelete.add(toDelete.getURI())) {
+ compound.append(new DeleteDecoratorModelCommand(modelSet, toDelete));
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries whether a resource is a loaded decorator model resource.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param resource
+ * a resource
+ *
+ * @return whether it is a loaded decorator model resource
+ */
+ public static boolean isDecoratorModel(Resource resource) {
+ boolean result = false;
+
+ ResourceSet rset = resource.getResourceSet();
+ if (rset != null) {
+ // There must be at least one <<applyProfiles>> dependency in a profile applications resource
+ result = EcoreUtil.getObjectByType(resource.getContents(), ProfileExternalizationPackage.Literals.APPLY_PROFILES) != null;
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries whether a resource is a loaded decorator model for the given user model resource.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param resource
+ * a resource
+ * @param modelResource
+ * a user model resource
+ *
+ * @return whether the {@code resource} is a loaded decorator model for the user model resource
+ */
+ public static boolean isDecoratorModelFor(Resource resource, Resource modelResource) {
+ boolean result = false;
+
+ ResourceSet rset = resource.getResourceSet();
+ if (rset != null) {
+ for (ApplyProfiles next : Iterables.filter(EcoreUtil.getObjectsByType(resource.getContents(), ProfileExternalizationPackage.Literals.APPLY_PROFILES), ApplyProfiles.class)) {
+ Dependency baseDependency = next.getBase_Dependency();
+ if (baseDependency != null) {
+ for (Iterator<NamedElement> iter = ((InternalEList<NamedElement>) baseDependency.getClients()).basicIterator(); !result && iter.hasNext();) {
+ NamedElement client = iter.next();
+ if (client.eIsProxy()) {
+ URI uri = EcoreUtil.getURI(client).trimFragment();
+ result = uri.equals(modelResource.getURI());
+ } else {
+ result = client.eResource() == modelResource;
+ }
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries the URIs of user model resources that contain packages for which a decorator model provides applied profiles.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param decoratorModelResource
+ * a resource in a decorator model
+ *
+ * @return the URIs of resources in user models containing packages to which the decorator model applies profiles
+ */
+ public static Set<URI> getUserModelResources(Resource decoratorModelResource) {
+ Set<URI> result = Sets.newHashSet();
+
+ for (ApplyProfiles next : Iterables.filter(EcoreUtil.getObjectsByType(decoratorModelResource.getContents(), ProfileExternalizationPackage.Literals.APPLY_PROFILES), ApplyProfiles.class)) {
+ Dependency baseDependency = next.getBase_Dependency();
+ if (baseDependency != null) {
+ for (Iterator<NamedElement> iter = ((InternalEList<NamedElement>) baseDependency.getClients()).basicIterator(); iter.hasNext();) {
+ NamedElement client = iter.next();
+ if (client.eIsProxy()) {
+ result.add(EcoreUtil.getURI(client).trimFragment());
+ } else {
+ result.add(client.eResource().getURI());
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Whether the resource indicated by the given URI is a decorator model resource.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param uri
+ * the URI of some resource, which may or may not exist
+ *
+ * @return whether the resource at the URI exists and is a decorator model
+ */
+ public static boolean isDecoratorModel(URI uri) {
+ boolean result = false;
+
+ if (uri.isPlatformResource()) {
+ // Let the workspace's content-type manager handle it (which can cache the information)
+ IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(new Path(uri.toPlatformString(true)));
+
+ try {
+ IContentDescription desc = file.exists() ? file.getContentDescription() : null;
+ result = (desc != null) && (desc.getContentType() != null) && desc.getContentType().isKindOf(DECORATOR_MODEL_CONTENT_TYPE);
+ } catch (CoreException e) {
+ // Couldn't determine content description? Then it cannot be our type
+ Activator.getDefault().getLog().log(e.getStatus());
+ }
+ } else {
+ // Work it out the hard way
+ InputStream input = null;
+
+ try {
+ input = URIConverter.INSTANCE.createInputStream(uri);
+ if (!input.markSupported()) {
+ input = new BufferedInputStream(input);
+ }
+ input.mark(Integer.MAX_VALUE);
+
+ Map<String, ?> desc = DECORATOR_MODEL_CONTENT_HANDLER.contentDescription(uri, input, Maps.newHashMap(), Maps.newHashMap());
+ result = desc.get(ContentHandler.VALIDITY_PROPERTY) == ContentHandler.Validity.VALID;
+ } catch (Exception e) {
+ // Couldn't read the contents? Then it's not what we're looking for
+ } finally {
+ if (input != null) {
+ try {
+ input.close();
+ } catch (Exception e) {
+ Activator.log.error(e);
+ }
+ }
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Queries the URIs of decorator model resources currently loaded in a user model resource's resource-set that contain
+ * profile applications for packages in that user model resource.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param modelResource
+ * a resource in an user model
+ *
+ * @return the URIs of resources currently loaded in the same resource set that provide profile applications to packages
+ * in the user model resource
+ */
+ public static Set<URI> getLoadedDecoratorModels(Resource modelResource) {
+ Element root = (Element) EcoreUtil.getObjectByType(modelResource.getContents(), UMLPackage.Literals.ELEMENT);
+ if (root == null) {
+ return Collections.emptySet();
+ }
+
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(root);
+
+ @SuppressWarnings("unchecked")
+ Set<URI> result = (Set<URI>) cache.get(root, LOADED_RESOURCES_CACHE_KEY);
+ if (result == null) {
+ result = Sets.newHashSet();
+ collectLoadedDecoratorModels(modelResource, result);
+ cache.put(root, LOADED_RESOURCES_CACHE_KEY, result);
+ }
+
+ return result;
+ }
+
+ private static void collectLoadedDecoratorModels(Resource modelResource, Set<URI> result) {
+ // We don't do externalization of profile applications in the resources that externalize profile applications
+ if (!isDecoratorModel(modelResource)) {
+ ResourceSet resourceSet = modelResource.getResourceSet();
+ URI modelURI = modelResource.getURI();
+ for (Resource next : resourceSet.getResources()) {
+ URI uri = next.getURI();
+ if (next.isLoaded() && !uri.equals(modelURI) && isDecoratorModelFor(next, modelResource)) {
+ result.add(uri);
+ }
+ }
+ }
+ }
+
+ /**
+ * Queries the URIs of decorator models in the workspace that are not yet loaded that provide profile applications for
+ * packages in the given user model resource. This set excludes and decorator models that have profile applications that
+ * would conflict with natively-applied profiles of packages in the user model resource, as it would not be permitted
+ * to load any of these.
+ * <p>
+ * This method <em>accesses the decorator model index</em> and is therefore not suitable for use in time-sensitive code because an invocation may block the caller for an indeterminate interval. In cases where responsiveness is essential, use the
+ * {@link #getUnloadedDecoratorModelsAsync(Resource)} API, instead.
+ *
+ * @param modelResource
+ * a user model resource
+ * @return the URIs of its currently available unloaded decorator models
+ *
+ * @see #getUnloadedDecoratorModelsAsync(Resource)
+ */
+ public static Set<URI> getUnloadedDecoratorModels(Resource modelResource) {
+ Element root = (Element) EcoreUtil.getObjectByType(modelResource.getContents(), UMLPackage.Literals.ELEMENT);
+ if (root == null) {
+ return Collections.emptySet();
+ }
+
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(root);
+
+ @SuppressWarnings("unchecked")
+ Set<URI> result = (Set<URI>) cache.get(root, UNLOADED_RESOURCE_DECORATORS_CACHE_KEY);
+ if (result == null) {
+ result = Sets.newHashSet();
+ try {
+ collectUnloadedDecoratorModels(DecoratorModelIndex.getInstance().getDecoratorModels(), modelResource, result);
+ } catch (CoreException e) {
+ Activator.log.error("Error in determining unloaded decorator models.", e); //$NON-NLS-1$
+ }
+ cache.put(root, UNLOADED_RESOURCE_DECORATORS_CACHE_KEY, result);
+ }
+
+ return result;
+ }
+
+ /**
+ * Asynchronously queries the URIs of decorator models in the workspace that are not yet loaded that provide profile applications for
+ * packages in the given user model resource. This set excludes and decorator models that have profile applications that
+ * would conflict with natively-applied profiles of packages in the user model resource, as it would not be permitted
+ * to load any of these.
+ *
+ * @param modelResource
+ * a user model resource
+ * @return the future result of the URIs of its currently available unloaded decorator models
+ *
+ * @see #getUnloadedDecoratorModelsAsync(Iterable)
+ * @see #getUnloadedDecoratorModelsAsync(Package)
+ * @see #getUnloadedDecoratorModels(Resource)
+ */
+ public static ListenableFuture<Set<URI>> getUnloadedDecoratorModelsAsync(final Resource modelResource) {
+ return getUnloadedDecoratorModelsAsync(Collections.singleton(modelResource));
+ }
+
+ /**
+ * Asynchronously queries the URIs of decorator models in the workspace that are not yet loaded that provide profile applications for
+ * packages in the given user model resources. This set excludes and decorator models that have profile applications that
+ * would conflict with natively-applied profiles of packages in the user model resources, as it would not be permitted
+ * to load any of these.
+ *
+ * @param modelResources
+ * zero or more user model resources
+ * @return the future result of the URIs of their currently available unloaded decorator models
+ *
+ * @see #getUnloadedDecoratorModelsAsync(Resource)
+ * @see #getUnloadedDecoratorModelsAsync(Package)
+ */
+ public static ListenableFuture<Set<URI>> getUnloadedDecoratorModelsAsync(final Iterable<Resource> modelResources) {
+ if (Iterables.isEmpty(modelResources)) {
+ return Futures.immediateFuture(Collections.<URI> emptySet());
+ }
+
+ ListenableFuture<SetMultimap<URI, URI>> decoratorMap = DecoratorModelIndex.getInstance().getDecoratorModelsAsync();
+ Function<SetMultimap<URI, URI>, Set<URI>> transform = new Function<SetMultimap<URI, URI>, Set<URI>>() {
+ @Override
+ public Set<URI> apply(SetMultimap<URI, URI> input) {
+ Set<URI> result = Sets.newHashSet();
+
+ for (Resource modelResource : modelResources) {
+ Element root = Iterables.isEmpty(modelResources) ? null : (Element) EcoreUtil.getObjectByType(modelResource.getContents(), UMLPackage.Literals.ELEMENT);
+ if (root != null) {
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(root);
+
+ @SuppressWarnings("unchecked")
+ Set<URI> local = (Set<URI>) cache.get(root, UNLOADED_RESOURCE_DECORATORS_CACHE_KEY);
+ if (local == null) {
+ local = Sets.newHashSet();
+ collectUnloadedDecoratorModels(input, modelResource, local);
+ cache.put(root, UNLOADED_RESOURCE_DECORATORS_CACHE_KEY, local);
+ }
+ result.addAll(local);
+ }
+ }
+
+ return result;
+ }
+ };
+
+ return Futures.transform(decoratorMap, transform);
+ }
+
+ /**
+ * Asynchronously queries the URIs of decorator models in the workspace that are not yet loaded that provide profile applications for
+ * the given user model package. This set excludes and decorator models that have profile applications that
+ * would conflict with natively-applied profiles of that package, as it would not be permitted
+ * to load any of these.
+ *
+ * @param package_
+ * a package in a user model
+ * @return the future result of the URIs of its currently available unloaded decorator models
+ *
+ * @see #getUnloadedDecoratorModelsAsync(Resource)
+ * @see #getUnloadedDecoratorModelsAsync(Iterable)
+ */
+ public static ListenableFuture<Set<URI>> getUnloadedDecoratorModelsAsync(final Package package_) {
+ if (package_.eResource() == null) {
+ return Futures.immediateFuture(Collections.<URI> emptySet());
+ }
+
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(package_);
+ @SuppressWarnings("unchecked")
+ Set<URI> cached = (Set<URI>) cache.get(package_, UNLOADED_PACKAGE_DECORATORS_CACHE_KEY);
+ if (cached != null) {
+ return Futures.immediateFuture(cached);
+ }
+
+ ListenableFuture<Set<URI>> decoratorMap = DecoratorModelIndex.getInstance().getDecoratorModelsForPackageAsync(EcoreUtil.getURI(package_));
+ Function<Set<URI>, Set<URI>> transform = new Function<Set<URI>, Set<URI>>() {
+ @Override
+ public Set<URI> apply(Set<URI> input) {
+ Set<URI> result = Sets.newHashSet();
+
+ Resource resource = package_.eResource();
+ if (resource != null) {
+ try {
+ collectUnloadedDecoratorModels(DecoratorModelIndex.getInstance().getDecoratorModels(), resource, result);
+ } catch (CoreException e) {
+ throw new UncheckedExecutionException(e);
+ }
+ }
+
+ // filter for only those unloaded resources that apply profiles to this package
+ result.retainAll(input);
+
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(package_);
+ cache.put(package_, UNLOADED_PACKAGE_DECORATORS_CACHE_KEY, result);
+
+ return result;
+ }
+ };
+
+ return Futures.transform(decoratorMap, transform);
+ }
+
+ /**
+ * Asynchronously queries whether the resource containing the given package (or, optionally, any of its currently loaded
+ * sub-units) has applicable decorator models that are not yet loaded.
+ *
+ * @param package_
+ * a package in a user model
+ * @param recursive
+ * whether to check loaded sub-units recursively
+ * @return the future result of whether the package has available unloaded decorator models
+ *
+ * @see #getUnloadedDecoratorModelsAsync(Resource)
+ */
+ public static ListenableFuture<Boolean> hasUnloadedDecoratorModelsAsync(Package package_, boolean recursive) {
+ Resource modelResource = package_.eResource();
+ if ((modelResource == null) || isDecoratorModel(modelResource)) {
+ return Futures.immediateFuture(Boolean.FALSE);
+ }
+
+ Iterable<Resource> resources = Collections.singleton(modelResource);
+ if (recursive) {
+ resources = Iterables.concat(resources, getLoadedSubUnitPackageResources(package_));
+ }
+
+ return Futures.transform(getUnloadedDecoratorModelsAsync(resources), new Function<Collection<?>, Boolean>() {
+ @Override
+ public Boolean apply(Collection<?> input) {
+ return (input != null) && !input.isEmpty();
+ }
+ });
+ }
+
+ private static void collectUnloadedDecoratorModels(SetMultimap<URI, URI> userModelsToDecoratorModels, Resource modelResource, Set<URI> result) {
+ URI uri = modelResource.getURI();
+ ResourceSet resourceSet = modelResource.getResourceSet();
+
+ // We don't do externalization of profile applications in the resources that externalize profile applications
+ if (uri.isPlatformResource() && !isDecoratorModel(modelResource)) {
+ // Managing the resources to delete on save only applies to model-sets
+ Set<URI> pendingDeletion = (resourceSet instanceof ModelSet) ? ((ModelSet) resourceSet).getResourcesToDeleteOnSave() : Collections.<URI> emptySet();
+
+ try {
+ for (URI indexed : Sets.difference(userModelsToDecoratorModels.get(uri), pendingDeletion)) {
+ Resource indexedResource = resourceSet.getResource(indexed, false);
+ if ((indexedResource == null) || !indexedResource.isLoaded()) {
+ // Don't include resources that have profile applications conflicting with profile applications
+ // owned by the current model
+ if (!hasConflictingProfileApplication(indexed, modelResource)) {
+ result.add(indexed);
+ }
+ }
+ }
+ } catch (CoreException e) {
+ Activator.log.error("Error in determining unloaded decorator models.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ private static Collection<ProfileApplication> getIntrinsicProfileApplications(Resource modelResource) {
+ Element root = (Element) EcoreUtil.getObjectByType(modelResource.getContents(), UMLPackage.Literals.ELEMENT);
+ if (root == null) {
+ return Collections.emptyList();
+ }
+
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(root);
+
+ @SuppressWarnings("unchecked")
+ Collection<ProfileApplication> result = (Collection<ProfileApplication>) cache.get(root, INTRINSIC_PROFILE_APPLICATIONS_CACHE_KEY);
+ if (result == null) {
+ result = Lists.newArrayList();
+ for (TreeIterator<EObject> iter = EcoreUtil.getAllProperContents(root, false); iter.hasNext();) {
+ EObject next = iter.next();
+ if (next instanceof ProfileApplication) {
+ result.add((ProfileApplication) next);
+
+ // No profile applications inside a profile application
+ iter.prune();
+ } else if (!((next instanceof Package) || (next instanceof Component))) {
+ // Packages are only in packages or components, and that's where profile applications may be found
+ iter.prune();
+ }
+ }
+ cache.put(root, INTRINSIC_PROFILE_APPLICATIONS_CACHE_KEY, result);
+ }
+
+ return result;
+ }
+
+ private static boolean hasConflictingProfileApplication(URI profileApplicationResourceURI, Resource modelResource) throws CoreException {
+ boolean result = false;
+
+ SetMultimap<URI, URI> indexed = DecoratorModelIndex.getInstance().getAppliedProfilesByPackage(profileApplicationResourceURI);
+
+ for (ProfileApplication profileApplication : getIntrinsicProfileApplications(modelResource)) {
+ if (indexed.containsEntry(EcoreUtil.getURI(profileApplication.getApplyingPackage()), EcoreUtil.getURI(profileApplication.getAppliedProfile()))) {
+ result = true;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ /**
+ * Obtains the currently loaded packages nested to any depth within the given package that are roots of sub-unit resources.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param package_
+ * a package in an user model
+ *
+ * @return nested packages that are roots of loaded sub-unit resources
+ */
+ public static Iterable<Package> getLoadedSubUnitPackages(Package package_) {
+ List<Package> result = Lists.newArrayListWithExpectedSize(0);
+
+ final Resource topResource = package_.eResource();
+ for (TreeIterator<EObject> iter = EcoreUtil.getAllContents(package_, false); iter.hasNext();) {
+ EObject next = iter.next();
+ if (next instanceof Package) {
+ if (!next.eIsProxy() && (next.eResource() != topResource)) {
+ // It's in a loaded sub-unit
+ result.add((Package) next);
+ }
+ } else if (!(next instanceof Component)) {
+ // No sense in looking into anything that can't contain packages
+ iter.prune();
+ }
+ }
+
+ return result;
+ }
+
+ static Iterable<Resource> getLoadedSubUnitPackageResources(Package package_) {
+ return Iterables.transform(getLoadedSubUnitPackages(package_), getResourceFunction());
+ }
+
+ static Function<EObject, Resource> getResourceFunction() {
+ return new Function<EObject, Resource>() {
+ @Override
+ public Resource apply(EObject input) {
+ return input.eResource();
+ }
+ };
+ }
+
+ /**
+ * Loads the specified decorator models in a given resource set context.
+ * <p>
+ * This method does <em>not</em> access the decorator model index.
+ *
+ * @param resourceSet
+ * the context in which to load the decorator models
+ * @param resourceURIs
+ * URIs of the decorator models to load
+ *
+ * @return whether the decorator models were successfully loaded
+ */
+ public static boolean loadDecoratorModels(final ResourceSet resourceSet, final Iterable<? extends URI> resourceURIs) {
+ boolean result = false;
+
+ Runnable operation = new Runnable() {
+ @Override
+ public void run() {
+ if (resourceSet instanceof ModelSet) {
+ DecoratorModel model = DecoratorModel.getInstance((ModelSet) resourceSet);
+ for (URI next : resourceURIs) {
+ model.loadDecoratorModel(next);
+ }
+ } else {
+ for (URI next : resourceURIs) {
+ resourceSet.getResource(next, true);
+ }
+ }
+ }
+ };
+
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(resourceSet);
+ if (domain != null) {
+ try {
+ domain.runExclusive(operation);
+ result = true;
+ } catch (InterruptedException e) {
+ Activator.log.error(e);
+ }
+ } else {
+ operation.run();
+ }
+
+ return result;
+ }
+
+ /**
+ * Configures a resource set to support profile applications externalized in decorator models.
+ *
+ * @param resourceSet
+ * the resource set to configure
+ */
+ public static void configure(ResourceSet resourceSet) {
+ if (resourceSet == null) {
+ throw new IllegalArgumentException("null resourceSet"); //$NON-NLS-1$
+ }
+
+ UMLUtil.ProfileApplicationHelper.setInstance(resourceSet, new PapyrusProfileApplicationHelper());
+ UMLUtil.StereotypeApplicationHelper.setInstance(resourceSet, new PapyrusStereotypeApplicationHelper());
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/IDeleteEmptyDecoratorModelsPolicy.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/IDeleteEmptyDecoratorModelsPolicy.java
new file mode 100644
index 00000000000..9684e2d5986
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/IDeleteEmptyDecoratorModelsPolicy.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.helper;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.resource.Resource;
+
+/**
+ * A protocol by which the profile-application reintegration command can query the client whether to delete decorator models that have been emptied of
+ * the last of their profile applications.
+ */
+public interface IDeleteEmptyDecoratorModelsPolicy {
+ /**
+ * Queries whether the specified decorator model resources may be deleted now that they contain no more profile applications.
+ *
+ * @param decoratorModels
+ * decorator models to delete
+ * @return whether they should be deleted
+ */
+ boolean shouldDeleteDecoratorModels(Collection<? extends Resource> decoratorModels);
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusProfileApplicationHelper.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusProfileApplicationHelper.java
new file mode 100644
index 00000000000..cc2eccbc898
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusProfileApplicationHelper.java
@@ -0,0 +1,61 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.helper;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+import java.util.Set;
+
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.util.UMLUtil.ProfileApplicationHelper;
+
+import com.google.common.collect.Iterables;
+
+
+/**
+ * Extended profile application helper for Papyrus tool.
+ * <P>
+ * When this helper is activated, profiles are located in external resources
+ * </P>
+ */
+public class PapyrusProfileApplicationHelper extends ProfileApplicationHelper {
+
+ @Override
+ public Iterable<Package> getOtherApplyingPackages(Package package_) {
+ Iterable<Package> result = super.getOtherApplyingPackages(package_);
+ Set<Package> combined = null;
+
+ for (Package parent : Iterables.concat(Collections.singleton(package_), result)) {
+ Iterator<Package> externalized = DecoratorModelUtils.getDecoratorPackages(parent).iterator();
+ if (externalized.hasNext()) {
+ if (combined == null) {
+ combined = new LinkedHashSet<Package>();
+
+ Iterables.addAll(combined, result);
+ }
+
+ while (externalized.hasNext()) {
+ combined.add(externalized.next());
+ }
+ }
+ }
+
+ if (combined != null) {
+ result = combined;
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusStereotypeApplicationHelper.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusStereotypeApplicationHelper.java
new file mode 100644
index 00000000000..73c14a72675
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/helper/PapyrusStereotypeApplicationHelper.java
@@ -0,0 +1,46 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.helper;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.uml.tools.utils.ProfileUtil;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
+
+
+/**
+ * Specific Stereotype Application Helper for Papyrus tool. If it detects the model is not a model handled by Papyrus, it will delegate to the standard Stereotype application helper.
+ */
+public class PapyrusStereotypeApplicationHelper extends StereotypeApplicationHelper {
+
+ @Override
+ protected EList<EObject> getContainmentList(Element element, EClass definition) {
+ // Locate stereotype applications in the same resource as the profile application
+
+ ProfileApplication profileApplication = ProfileUtil.getProfileApplication(element, definition);
+ if (profileApplication != null) {
+ Resource containingResource = profileApplication.eResource();
+ if (containingResource != null) {
+ return containingResource.getContents();
+ }
+ }
+
+ return super.getContainmentList(element, definition);
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/CreateDecoratorModelCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/CreateDecoratorModelCommand.java
new file mode 100644
index 00000000000..5be5f0036fc
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/CreateDecoratorModelCommand.java
@@ -0,0 +1,130 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.commands;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.model.DecoratorModel;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * A command that ensures existence of the decorator model resource into which profile applications will be put by the {@link SeparateProfileApplicationsCommand}. Undoing this command will remove the decorator model resource from
+ * the resource set if it created it.
+ */
+public class CreateDecoratorModelCommand extends AbstractCommand {
+ private final TransactionalEditingDomain domain;
+ private final URI resourceURI;
+ private final String modelName;
+
+ private Resource createdResource;
+ private Package createdDecoratorModel;
+
+ public CreateDecoratorModelCommand(TransactionalEditingDomain domain, URI resourceURI, String modelName) {
+ super(Messages.CreateDecoratorModelCommand_0);
+
+ this.domain = domain;
+ this.resourceURI = resourceURI;
+ this.modelName = modelName;
+ }
+
+ @Override
+ protected boolean prepare() {
+ return (domain != null) && (domain.getResourceSet() != null) && (resourceURI != null);
+ }
+
+ @Override
+ public void execute() {
+ ResourceSet resourceSet = domain.getResourceSet();
+ Resource decoratorModel = resourceSet.getResource(resourceURI, false);
+
+ if (decoratorModel == null) {
+ if (canLoad(resourceSet, resourceURI)) {
+ // Just load it, then, for the next command to find. This is not undoable (nor needs to be)
+ resourceSet.getResource(resourceURI, true);
+ } else {
+ // Create the new decorator model resource
+ if (resourceSet instanceof ModelSet) {
+ DecoratorModel model = DecoratorModel.getInstance((ModelSet) resourceSet);
+ createdResource = model.loadDecoratorModel(resourceURI);
+ } else {
+ // Ensure that we get a UML resource, regardless of the URI
+ createdResource = resourceSet.createResource(resourceURI, UMLPackage.eCONTENT_TYPE);
+ }
+
+ initializeDecoratorModel(createdResource, modelName);
+ }
+ }
+ }
+
+ protected void initializeDecoratorModel(Resource resource, String modelName) {
+ createdDecoratorModel = UMLFactory.eINSTANCE.createPackage();
+ createdDecoratorModel.setName(modelName);
+ resource.getContents().add(createdDecoratorModel);
+
+ // The Externalization Profile is applied here so that it is not inherited by the packages in the user model
+ Profile externalizationProfile = DecoratorModelUtils.getExternalizationProfile(resource.getResourceSet());
+ createdDecoratorModel.applyProfile(externalizationProfile);
+ }
+
+ protected boolean canLoad(ResourceSet resourceSet, URI resourceURI) {
+ boolean result = resourceSet.getURIConverter().exists(resourceURI, null);
+
+ if (result) {
+ // Furthermore, is it a decorator model?
+ result = DecoratorModelUtils.isDecoratorModel(resourceURI);
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean canUndo() {
+ return true;
+ }
+
+ @Override
+ public void undo() {
+ if (createdResource != null) {
+ // Unload it and remove it
+ createdResource.unload();
+ createdResource.getResourceSet().getResources().remove(createdResource);
+ createdResource.eAdapters().clear();
+ }
+ }
+
+ @Override
+ public void redo() {
+ if (createdResource != null) {
+ ResourceSet resourceSet = domain.getResourceSet();
+ if (resourceSet.getResource(createdResource.getURI(), false) == null) {
+ // Simply put the same resource back
+ resourceSet.getResources().add(createdResource);
+ createdResource.getContents().clear(); // Just in case
+ createdResource.getContents().add(createdDecoratorModel);
+ ((InternalEObject) createdDecoratorModel).eSetProxyURI(null);
+ }
+ }
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/DeleteDecoratorModelCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/DeleteDecoratorModelCommand.java
new file mode 100644
index 00000000000..87a8a0ee367
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/DeleteDecoratorModelCommand.java
@@ -0,0 +1,105 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.commands;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.AbstractCommand.NonDirtying;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
+
+import com.google.common.collect.Lists;
+
+/**
+ * A command that ensures the next save of the {@link ModelSet} will delete the decorator model
+ * emptied out by some previous {@link ReclaimProfileApplicationsCommand}.
+ */
+public class DeleteDecoratorModelCommand extends AbstractCommand implements NonDirtying {
+ private final ModelSet modelSet;
+ private final Resource resource;
+ private Collection<Resource> deleted;
+
+ public DeleteDecoratorModelCommand(ModelSet modelSet, Resource resource) {
+ super(Messages.DeleteDecoratorModelCommand_0);
+
+ this.modelSet = modelSet;
+ this.resource = resource;
+ }
+
+ @Override
+ protected boolean prepare() {
+ return (resource != null) && resource.isLoaded();
+ }
+
+ @Override
+ public void execute() {
+ if (resource.getContents().isEmpty()) {
+ // there are usually three resources to delete in any Papyrus model
+ deleted = Lists.newArrayListWithExpectedSize(3);
+
+ modelSet.getResourcesToDeleteOnSave().add(resource.getURI());
+ resource.unload();
+ modelSet.getResources().remove(resource);
+ resource.eAdapters().clear();
+ deleted.add(resource);
+
+ // find its siblings
+ URI withoutExtension = resource.getURI().trimFileExtension();
+ for (Iterator<Resource> iter = modelSet.getResources().iterator(); iter.hasNext();) {
+ Resource next = iter.next();
+ if (next.getURI().trimFileExtension().equals(withoutExtension)) {
+ modelSet.getResourcesToDeleteOnSave().add(next.getURI());
+ next.unload();
+ iter.remove();
+ next.eAdapters().clear();
+ deleted.add(next);
+ }
+ }
+ }
+ }
+
+ /**
+ * Because this command only unloads the resource if it's empty, this is undoable simply by re-adding the resource to the resource set.
+ *
+ * @return {@code true}, always
+ */
+ @Override
+ public boolean canUndo() {
+ return true;
+ }
+
+ @Override
+ public void undo() {
+ if (deleted != null) {
+ for (Resource next : deleted) {
+ modelSet.getResourcesToDeleteOnSave().remove(next.getURI());
+ if (modelSet.getResource(next.getURI(), false) == null) {
+ modelSet.getResources().add(next);
+
+ // Don't attempt to load the resource because we'll be putting its contents back as part of the undo!
+ }
+ }
+ }
+ }
+
+ @Override
+ public void redo() {
+ execute();
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/ReclaimProfileApplicationsCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/ReclaimProfileApplicationsCommand.java
new file mode 100644
index 00000000000..1e5cb0af714
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/ReclaimProfileApplicationsCommand.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.commands;
+
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.helper.IDeleteEmptyDecoratorModelsPolicy;
+import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * A command that brings one or more profile applications back from a separate resource into the UML model.
+ */
+public class ReclaimProfileApplicationsCommand extends RecordingCommand {
+
+ private final IDeleteEmptyDecoratorModelsPolicy deletePolicy;
+
+ private final Iterable<? extends ProfileApplication> profileApplications;
+
+ public ReclaimProfileApplicationsCommand(TransactionalEditingDomain domain, Iterable<? extends ProfileApplication> profileApplications, IDeleteEmptyDecoratorModelsPolicy deletePolicy) {
+ super(domain, Messages.ReclaimProfileApplicationsCommand_0);
+
+ this.profileApplications = profileApplications;
+ this.deletePolicy = deletePolicy;
+ }
+
+ @Override
+ protected void doExecute() {
+ DecoratorModelUtils.internalizeProfileApplications(profileApplications, deletePolicy);
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SaveDecoratorModelCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SaveDecoratorModelCommand.java
new file mode 100644
index 00000000000..7a6b3ddc1c2
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SaveDecoratorModelCommand.java
@@ -0,0 +1,74 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.commands;
+
+import java.util.Set;
+
+import org.eclipse.emf.common.command.AbstractCommand;
+import org.eclipse.emf.common.command.AbstractCommand.NonDirtying;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
+
+import com.google.common.collect.Sets;
+
+/**
+ * A command that ensures the next save of the {@link ModelSet} will save the decorator model
+ * potentially created (if not already existing) by some previous {@link SeparateProfileApplicationsCommand}.
+ */
+public class SaveDecoratorModelCommand extends AbstractCommand implements NonDirtying {
+ private final ModelSet modelSet;
+ private final URI resourceURIWithoutExtension;
+ private Set<URI> rescued;
+
+ public SaveDecoratorModelCommand(ModelSet modelSet, URI resourceURI) {
+ super(Messages.SaveDecoratorModelCommand_0);
+
+ this.modelSet = modelSet;
+ this.resourceURIWithoutExtension = resourceURI.trimFileExtension();
+ }
+
+ @Override
+ protected boolean prepare() {
+ rescued = Sets.newHashSet();
+ for (URI next : modelSet.getResourcesToDeleteOnSave()) {
+ if (next.trimFileExtension().equals(resourceURIWithoutExtension)) {
+ rescued.add(next);
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ public boolean canUndo() {
+ return true;
+ }
+
+ @Override
+ public void execute() {
+ modelSet.getResourcesToDeleteOnSave().removeAll(rescued);
+ }
+
+ @Override
+ public void undo() {
+ modelSet.getResourcesToDeleteOnSave().addAll(rescued);
+ }
+
+ @Override
+ public void redo() {
+ execute();
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SeparateProfileApplicationsCommand.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SeparateProfileApplicationsCommand.java
new file mode 100644
index 00000000000..c5b65962148
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/commands/SeparateProfileApplicationsCommand.java
@@ -0,0 +1,53 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.commands;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * A command that factors out one or more profile applications into a separate resource.
+ * This command has a pre-requisite that the decorator model resource must already exist when it executes. This may be
+ * satisfied either by the resource already existing in storage or being created by a previous command in a compound.
+ */
+public class SeparateProfileApplicationsCommand extends RecordingCommand {
+
+ private final ResourceSet resourceSet;
+ private final Iterable<? extends ProfileApplication> profileApplications;
+ private final URI resourceURI;
+
+ public SeparateProfileApplicationsCommand(TransactionalEditingDomain domain, Iterable<? extends ProfileApplication> profileApplications, URI resourceURI) {
+ super(domain, Messages.SeparateProfileApplicationsCommand_0);
+
+ this.resourceSet = domain.getResourceSet();
+ this.profileApplications = profileApplications;
+ this.resourceURI = resourceURI;
+ }
+
+ @Override
+ protected void doExecute() {
+ Resource decoratorModel = resourceSet.getResource(resourceURI, true);
+
+ for (ProfileApplication profileApplication : profileApplications) {
+ DecoratorModelUtils.externalizeProfileApplication(profileApplication, decoratorModel);
+ }
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/FilePropertyTester.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/FilePropertyTester.java
new file mode 100644
index 00000000000..ebaba3f98db
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/FilePropertyTester.java
@@ -0,0 +1,54 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.expressions;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+
+/**
+ * A core-expressions property tester for {@link IFile}s.
+ */
+public class FilePropertyTester extends PropertyTester {
+ public static final String PROPERTY_IS_DECORATOR_MODEL = "isDecoratorModel"; //$NON-NLS-1$
+
+ public FilePropertyTester() {
+ super();
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ boolean result = false;
+ if (receiver instanceof IFile) {
+ IFile file = (IFile) receiver;
+
+ if (PROPERTY_IS_DECORATOR_MODEL.equals(property)) {
+ result = expectBoolean(expectedValue) == isDecoratorModel(file);
+ }
+ }
+
+ return result;
+ }
+
+ private static boolean expectBoolean(Object expectedValue) {
+ return (expectedValue == null) || ((expectedValue instanceof Boolean) && ((Boolean) expectedValue).booleanValue());
+ }
+
+ boolean isDecoratorModel(IFile file) {
+ URI uri = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+ return DecoratorModelUtils.isDecoratorModel(uri);
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/Messages.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/Messages.java
new file mode 100644
index 00000000000..a48cbbd3b59
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/Messages.java
@@ -0,0 +1,37 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.messages;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @author damus
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.decoratormodel.internal.messages.messages"; //$NON-NLS-1$
+ public static String CreateDecoratorModelCommand_0;
+ public static String DecoratorModelIndex_0;
+ public static String DeleteDecoratorModelCommand_0;
+ public static String ReclaimProfileApplicationsCommand_0;
+ public static String SaveDecoratorModelCommand_0;
+ public static String SeparateProfileApplicationsCommand_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/messages.properties b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/messages.properties
new file mode 100644
index 00000000000..8fa99336bb3
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/messages/messages.properties
@@ -0,0 +1,6 @@
+CreateDecoratorModelCommand_0=Create Profile Application
+DecoratorModelIndex_0=Failed to access profile application index
+DeleteDecoratorModelCommand_0=Delete Profile Application
+ReclaimProfileApplicationsCommand_0=Reclaim Profile Applications
+SaveDecoratorModelCommand_0=Save Profile Application
+SeparateProfileApplicationsCommand_0=Separate Profile Applications
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java
new file mode 100644
index 00000000000..f2f4ae44a3c
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/providers/ExternalizedProfileApplicationDelegate.java
@@ -0,0 +1,222 @@
+/*****************************************************************************
+ * Copyright (c) 2005, 2014 IBM Corporation, Embarcadero Technologies, CEA, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM - initial API and implementation
+ * Kenn Hussey (Embarcadero Technologies) - 271470
+ * Kenn Hussey - 323181, 348433
+ * Kenn Hussey (CEA) - 327039, 369492, 313951, 163556, 418466, 447901
+ * Christian W. Damus (CEA) - 300957, 431998
+ * Christian W. Damus - 444588, 399859
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.providers;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+import org.eclipse.emf.common.util.ECollections;
+import org.eclipse.emf.common.util.EList;
+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.resource.Resource;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Stereotype;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * An implementation of the profile-application delegate protocol for externalized profile applications.
+ */
+public class ExternalizedProfileApplicationDelegate implements IProfileApplicationDelegate {
+
+ private final PrivateUtil util = new PrivateUtil();
+
+ public ExternalizedProfileApplicationDelegate() {
+ super();
+ }
+
+ @Override
+ public boolean appliesTo(Package package_) {
+ return true;
+ }
+
+ @Override
+ public Iterable<ProfileApplication> getProfileApplications(Package package_) {
+ return Iterables.concat(package_.getProfileApplications(), DecoratorModelUtils.getDecoratorModelProfileApplications(package_));
+ }
+
+ @Override
+ public ProfileApplication getProfileApplication(Package package_, Profile profile) {
+ ProfileApplication result = package_.getProfileApplication(profile);
+
+ if (result == null) {
+ for (ProfileApplication next : DecoratorModelUtils.getDecoratorModelProfileApplications(package_)) {
+ if (next.getAppliedProfile() == profile) {
+ result = next;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public boolean appliesTo(ProfileApplication profileApplication) {
+ Resource resource = profileApplication.eResource();
+ return (resource != null) && DecoratorModelUtils.isDecoratorModel(resource);
+ }
+
+ @Override
+ public Package getApplyingPackage(ProfileApplication profileApplication) {
+ return DecoratorModelUtils.getUserModelApplyingPackage(profileApplication);
+ }
+
+ @Override
+ public Profile getAppliedProfile(ProfileApplication profileApplication) {
+ return profileApplication.getAppliedProfile();
+ }
+
+ @Override
+ public EList<EObject> reapplyProfile(Package package_, Profile profile) {
+ ProfileApplication existing = getProfileApplication(package_, profile);
+ return (existing == null) ? ECollections.<EObject> emptyEList() // Nothing to do
+ : (existing.getApplyingPackage() == package_) ? package_.applyProfile(profile) // Simple UML case
+ : util.reapplyProfile(package_, existing); // Our extended UML case
+ }
+
+ //
+ // Nested types
+ //
+
+ // extending UML-internal PackageOperations class to access protected API
+ @SuppressWarnings("restriction")
+ private class PrivateUtil extends org.eclipse.uml2.uml.internal.operations.PackageOperations {
+
+ EList<EObject> reapplyProfile(Package package_, ProfileApplication profileApplication) {
+ Profile profile = ExternalizedProfileApplicationDelegate.this.getAppliedProfile(profileApplication);
+ EPackage definition = profile.getDefinition();
+
+ Collection<EObject> originals = Lists.newArrayList();
+ StereotypeApplicationCopier copier = new PrivateStereotypeCopier(profile);
+
+ // First, update the referenced definition of profile applications and copy all stereotype applications that are still applicable
+ for (TreeIterator<EObject> allContents = getAllContents(package_, true, false); allContents.hasNext();) {
+ EObject eObject = allContents.next();
+
+ if (eObject instanceof Element) {
+ Element element = (Element) eObject;
+
+ if (element instanceof Package) {
+ for (ProfileApplication next : ExternalizedProfileApplicationDelegate.this.getProfileApplications((Package) element)) {
+ if (ExternalizedProfileApplicationDelegate.this.getAppliedProfile(next) == profile) {
+ EList<EObject> references = getEAnnotation(profileApplication, UML2_UML_PACKAGE_2_0_NS_URI, true).getReferences();
+
+ if (references.isEmpty()) {
+ references.add(definition);
+ } else {
+ references.set(0, definition);
+ }
+ }
+ }
+ }
+
+ for (EObject stereotypeApplication : element.getStereotypeApplications()) {
+ Stereotype stereotype = getStereotype(stereotypeApplication);
+
+ if ((stereotype != null) && (stereotype.getProfile() == profile)) {
+ if (element.isStereotypeApplicable(stereotype)) {
+ EObject copy = copier.copy(stereotypeApplication);
+ Resource eResource = stereotypeApplication.eResource();
+
+ if (eResource != null) {
+ EList<EObject> contents = eResource.getContents();
+
+ if (eResource == copy.eResource()) {
+ contents.move(contents.indexOf(stereotypeApplication), copy);
+ } else {
+ contents.set(contents.indexOf(stereotypeApplication), copy);
+ }
+ }
+ }
+
+ originals.add(stereotypeApplication);
+ }
+ }
+ }
+ }
+
+ // Copy cross-references within the stereotype application forest that was copied
+ copier.copyReferences();
+
+ // Propagate object IDs of stereotype applications and update all incoming cross-references from objects that were not copied
+ for (EObject key : copier.keySet()) {
+ EObject copy = copier.get(key);
+
+ Resource eResource = key.eResource();
+
+ if (eResource instanceof XMLResource) {
+ XMLResource xmlResource = (XMLResource) eResource;
+ xmlResource.setID(copy, xmlResource.getID(key));
+ }
+
+ for (Setting setting : new ArrayList<EStructuralFeature.Setting>(
+ getNonNavigableInverseReferences(key))) {
+
+ EObject eObject = setting.getEObject();
+
+ if (!copier.containsKey(eObject)) {
+ EStructuralFeature eStructuralFeature = setting.getEStructuralFeature();
+
+ if ((eStructuralFeature != null) && eStructuralFeature.isChangeable()) {
+ if (eStructuralFeature.isMany()) {
+ Object value = eObject.eGet(eStructuralFeature);
+
+ @SuppressWarnings("unchecked")
+ EList<EObject> list = ((EList<EObject>) value);
+ list.set(list.indexOf(key), copy);
+ } else {
+ setting.set(copy);
+ }
+ }
+ }
+ }
+ }
+
+ // Delete all of the original stereotype applications (leaving only the copies)
+ destroyAll(originals);
+
+ // Easy result in the common case of the profile not having any required metaclass extensions
+ return profile.getOwnedExtensions(true).isEmpty() ? ECollections.<EObject> emptyEList() : applyAllRequiredStereotypes(package_);
+ }
+
+ //
+ // Nested types
+ //
+
+ private class PrivateStereotypeCopier extends StereotypeApplicationCopier {
+ private static final long serialVersionUID = 1L;
+
+ PrivateStereotypeCopier(Profile profile) {
+ super(profile);
+ }
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelCopier.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelCopier.java
new file mode 100644
index 00000000000..907287290a1
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelCopier.java
@@ -0,0 +1,207 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource;
+
+import java.util.List;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EAttribute;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.PackageableElement;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.base.Preconditions;
+
+/**
+ * A utility for copying decorator models, with optional filtering of which profile applications are copied.
+ */
+public class DecoratorModelCopier {
+
+ private final ResourceSet resourceSet;
+ private final FilteredCopier copier;
+
+ /**
+ * Initializes me with the name of the copy model. All profile applications are copied.
+ *
+ * @param modelName
+ * the name of the new decorator model
+ */
+ public DecoratorModelCopier(String modelName) {
+ this(modelName, null);
+ }
+
+ /**
+ * Initializes me with the name of the copy model and the set of URIs of profiles to include in the copy.
+ *
+ * @param modelName
+ * the name of the new decorator model
+ * @param profileURIs
+ * the URIs of the resources storing profiles which applications are to be copied, or {@code null} to copy all profile applications.
+ *
+ * @throws IllegalArgumentException
+ * if the set of profile URIs is empty, because then the resulting model would be useless
+ */
+ public DecoratorModelCopier(String modelName, Set<URI> profileURIs) {
+ super();
+
+ Preconditions.checkArgument((profileURIs == null) || !profileURIs.isEmpty(), "empty profileURIs set"); //$NON-NLS-1$
+
+ this.resourceSet = new DecoratorModelResourceSet(profileURIs);
+ this.copier = new FilteredCopier(modelName, profileURIs);
+ }
+
+ public void dispose() {
+ copier.clear();
+ EMFHelper.unload(resourceSet);
+ }
+
+ /**
+ * Copies the decorator model indicated by the source URI to the destination URI. It is the caller's responsibility to save the destination resource.
+ *
+ * @param sourceModel
+ * the source model URI
+ * @param destinationModel
+ * the destination model URI
+ *
+ * @return the destination resource, which is new and not yet saved
+ */
+ public Resource copy(URI sourceModel, URI destinationModel) {
+ Resource result = resourceSet.createResource(destinationModel, UMLPackage.eCONTENT_TYPE);
+ Resource source = resourceSet.getResource(sourceModel, true);
+
+ List<EObject> output = result.getContents();
+ for (EObject next : source.getContents()) {
+ if (copier.shouldCopy(next)) {
+ output.add(copier.copy(next));
+ }
+ }
+ copier.copyReferences();
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class FilteredCopier extends EcoreUtil.Copier {
+ private static final long serialVersionUID = 1L;
+
+ private final String modelName;
+
+ private final Set<URI> profileURIs;
+
+ FilteredCopier(String modelName, Set<URI> profileURIs) {
+ super(false);
+
+ this.modelName = modelName;
+ this.profileURIs = profileURIs;
+ }
+
+ @Override
+ protected void copyAttribute(EAttribute eAttribute, EObject eObject, EObject copyEObject) {
+ if ((eAttribute == UMLPackage.Literals.NAMED_ELEMENT__NAME) && (eObject.eContainer() == null)) {
+ // Set the name of the target model
+ copyEObject.eSet(eAttribute, modelName);
+ } else {
+ super.copyAttribute(eAttribute, eObject, copyEObject);
+ }
+ }
+
+ @Override
+ protected void copyContainment(EReference eReference, EObject eObject, EObject copyEObject) {
+ if (eObject instanceof Package) {
+ Package package_ = (Package) eObject;
+
+ if (package_.eContainer() == null) {
+ // Root package
+ if (eReference == UMLPackage.Literals.PACKAGE__PACKAGED_ELEMENT) {
+ List<PackageableElement> source = package_.getPackagedElements();
+ List<PackageableElement> target = ((Package) copyEObject).getPackagedElements();
+ for (PackageableElement next : source) {
+ // Don't copy nested packages for which we don't want any of the profile applications
+ if (shouldCopy(next)) {
+ target.add((PackageableElement) copy(next));
+ }
+ }
+ } else {
+ super.copyContainment(eReference, eObject, copyEObject);
+ }
+ } else if (eReference == UMLPackage.Literals.PACKAGE__PROFILE_APPLICATION) {
+ List<ProfileApplication> source = package_.getProfileApplications();
+ List<ProfileApplication> target = ((Package) copyEObject).getProfileApplications();
+ for (ProfileApplication next : source) {
+ // Don't copy applications of profiles that we want to exclude
+ if (shouldCopy(next)) {
+ target.add((ProfileApplication) copy(next));
+ }
+ }
+ } else {
+ super.copyContainment(eReference, eObject, copyEObject);
+ }
+ } else {
+ super.copyContainment(eReference, eObject, copyEObject);
+ }
+ }
+
+ boolean shouldCopy(EObject object) {
+ boolean result = profileURIs == null;
+
+ if (!result) {
+ if (object instanceof Package) {
+ // We copy a package if it's the root model package or we want any of its profile applications
+ result = object.eContainer() == null;
+ if (!result) {
+ for (ProfileApplication next : ((Package) object).getProfileApplications()) {
+ if (shouldCopy(next)) {
+ result = true;
+ break;
+ }
+ }
+ }
+ } else if (object instanceof ProfileApplication) {
+ ProfileApplication profileApplication = (ProfileApplication) object;
+
+ // Always copy the root package's profile applications
+ result = profileApplication.getApplyingPackage().eContainer() == null;
+ if (!result) {
+ // Remember that our resource set doesn't resolve proxies
+ Profile profile = ((ProfileApplication) object).getAppliedProfile();
+ result = profileURIs.contains(EcoreUtil.getURI(profile).trimFragment());
+ }
+ } else if (object instanceof ApplyProfiles) {
+ // Did we copy the dependency to which this stereotype is applied?
+ result = get(((ApplyProfiles) object).getBase_Dependency()) != null;
+ } else if (object.eContainer() == null) {
+ // It's a stereotype application. Copy it if its profile is in our set
+ result = profileURIs.contains(EcoreUtil.getURI(object.eClass()).trimFragment());
+ } else {
+ result = true;
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java
new file mode 100644
index 00000000000..057c24a3846
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndex.java
@@ -0,0 +1,589 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.CopyOnWriteArrayList;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.Future;
+
+import javax.xml.parsers.SAXParser;
+import javax.xml.parsers.SAXParserFactory;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndex;
+import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndex.IndexHandler;
+import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndexAdapter;
+import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndexEvent;
+import org.eclipse.papyrus.uml.decoratormodel.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.internal.messages.Messages;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.index.ProfileIndexHandler;
+import org.eclipse.uml2.common.util.CacheAdapter;
+
+import com.google.common.base.Function;
+import com.google.common.collect.HashMultimap;
+import com.google.common.collect.ImmutableMap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.ImmutableSetMultimap;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.SetMultimap;
+import com.google.common.util.concurrent.Futures;
+import com.google.common.util.concurrent.ListenableFuture;
+
+/**
+ * A workspace-wide index mapping UML model resources to decorator models that apply profiles to them.
+ */
+public class DecoratorModelIndex {
+
+ private static final int MAX_INDEX_JOBS = 5;
+
+ private static final DecoratorModelIndex INSTANCE = new DecoratorModelIndex();
+
+ private final Object sync = new Object();
+ private final SetMultimap<URI, URI> modelToDecorators = HashMultimap.create();
+ private final SetMultimap<URI, URI> decoratorToModels = HashMultimap.create();
+ private final SetMultimap<URI, URI> packageToDecoratorModels = HashMultimap.create();
+
+ private final Map<URI, Map<URI, Map<URI, URI>>> decoratorModelToPackageToProfileApplications = Maps.newHashMap();
+ private final Map<URI, String> decoratorModelNames = Maps.newHashMap();
+
+ private final WorkspaceModelIndex<DecoratorModelIndex> index;
+
+ private final CopyOnWriteArrayList<IDecoratorModelIndexListener> listeners = Lists.newCopyOnWriteArrayList();
+
+ /**
+ * Not instantiable by clients.
+ */
+ private DecoratorModelIndex() {
+ super();
+
+ index = new WorkspaceModelIndex<DecoratorModelIndex>("decoratorModels", DecoratorModelUtils.DECORATOR_MODEL_CONTENT_TYPE.getId(), indexer(), MAX_INDEX_JOBS); //$NON-NLS-1$
+ index.addListener(new WorkspaceModelIndexAdapter() {
+ @Override
+ protected void indexAboutToCalculateOrRecalculate(WorkspaceModelIndexEvent event) {
+ // Clear the CacheAdapter to purge any caches of information derived from this index
+ CacheAdapter.getInstance().clear();
+ }
+
+ @Override
+ protected void indexCalculatedOrRecalculated(WorkspaceModelIndexEvent event) {
+ notifyChanged();
+ }
+ });
+ }
+
+ public void dispose() {
+ index.dispose();
+ modelToDecorators.clear();
+ }
+
+ public static DecoratorModelIndex getInstance() {
+ return INSTANCE;
+ }
+
+ /**
+ * Asynchronously queries the mapping of URIs of user models to URIs of decorator models that apply profiles to them.
+ *
+ * @param modelResourceURI
+ * the URI of a user model resource
+ * @return a future result of the mapping of user model URIs to decorator model URIs
+ */
+ public ListenableFuture<SetMultimap<URI, URI>> getDecoratorModelsAsync() {
+ return afterIndex(getDecoratorModelsCallable());
+ }
+
+ /**
+ * Queries the mapping of URIs of user models to URIs of decorator models that apply profiles to them.
+ *
+ * @return the mapping of user model URIs to decorator model URIs
+ */
+ public SetMultimap<URI, URI> getDecoratorModels() throws CoreException {
+ return sync(afterIndex(getDecoratorModelsCallable()));
+ }
+
+ Callable<SetMultimap<URI, URI>> getDecoratorModelsCallable() {
+ return new SyncCallable<SetMultimap<URI, URI>>() {
+ @Override
+ protected SetMultimap<URI, URI> doCall() {
+ return ImmutableSetMultimap.copyOf(modelToDecorators);
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries the URIs of decorator models that apply profiles to the specified user model resource.
+ *
+ * @param modelResourceURI
+ * the URI of a user model resource
+ * @return a future result of the URIs of decorator models for the user model resource
+ */
+ public ListenableFuture<Set<URI>> getDecoratorModelsAsync(URI modelResourceURI) {
+ return afterIndex(getDecoratorModelsCallable(modelResourceURI));
+ }
+
+ /**
+ * Queries the URIs of decorator models that apply profiles to the specified user model resource.
+ *
+ * @param modelResourceURI
+ * the URI of a user model resource
+ * @return the URIs of decorator models for the user model resource
+ */
+ public Set<URI> getDecoratorModels(URI modelResourceURI) throws CoreException {
+ return sync(afterIndex(getDecoratorModelsCallable(modelResourceURI)));
+ }
+
+ final <V> V sync(Future<V> future) throws CoreException {
+ try {
+ return future.get();
+ } catch (InterruptedException e) {
+ throw new CoreException(Status.CANCEL_STATUS);
+ } catch (ExecutionException e) {
+ throw new CoreException(new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.DecoratorModelIndex_0, e));
+ }
+ }
+
+ Callable<Set<URI>> getDecoratorModelsCallable(final URI modelResourceURI) {
+ return new SyncCallable<Set<URI>>() {
+ @Override
+ protected Set<URI> doCall() {
+ return ImmutableSet.copyOf(modelToDecorators.get(modelResourceURI));
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries the URIs of profiles applied to the specified user model package by the specified decorator model.
+ *
+ * @param packageURI
+ * the URI of a package in a user model
+ * @param decoratorModel
+ * the URI of a decorator model
+ * @return the future result of the URIs of profiles applied to the package by the resource
+ */
+ public ListenableFuture<Set<URI>> getAppliedProfilesAsync(final URI packageURI, URI decoratorModel) {
+ return Futures.transform(getAppliedProfilesByPackageAsync(decoratorModel), new Function<SetMultimap<URI, URI>, Set<URI>>() {
+ @Override
+ public Set<URI> apply(SetMultimap<URI, URI> input) {
+ return input.get(packageURI);
+ }
+ });
+ }
+
+ /**
+ * Queries the URIs of profiles applied to the specified user model package by the specified decorator model.
+ *
+ * @param packageURI
+ * the URI of a package in a user model
+ * @param decoratorModel
+ * the URI of a decorator model
+ * @return the URIs of profiles applied to the package by the resource
+ */
+ public Set<URI> getAppliedProfiles(URI packageURI, URI decoratorModel) throws CoreException {
+ return sync(getAppliedProfilesAsync(packageURI, decoratorModel));
+ }
+
+ /**
+ * Asynchronously queries a mapping of user-model package URIs to URIs of profiles applied to them by the specified decorator model.
+ *
+ * @param decoratorModel
+ * the URI of a decorator model
+ * @return the future result of the URIs of user model packages to profiles applied to them by the resource
+ */
+ public ListenableFuture<SetMultimap<URI, URI>> getAppliedProfilesByPackageAsync(URI decoratorModel) {
+ return afterIndex(getAppliedProfilesByPackageCallable(decoratorModel));
+ }
+
+ /**
+ * Queries a mapping of user-model package URIs to URIs of profiles applied to them by the specified decorator model.
+ *
+ * @param decoratorModel
+ * the URI of a decorator model
+ * @return the URIs of user model packages to profiles applied to them by the resource
+ */
+ public SetMultimap<URI, URI> getAppliedProfilesByPackage(URI decoratorModel) throws CoreException {
+ return sync(afterIndex(getAppliedProfilesByPackageCallable(decoratorModel)));
+ }
+
+ Callable<SetMultimap<URI, URI>> getAppliedProfilesByPackageCallable(final URI decoratorModel) {
+ return new SyncCallable<SetMultimap<URI, URI>>() {
+ @Override
+ protected SetMultimap<URI, URI> doCall() {
+ SetMultimap<URI, URI> result;
+
+ Map<URI, Map<URI, URI>> packageToProfileApplications = decoratorModelToPackageToProfileApplications.get(decoratorModel);
+ if (packageToProfileApplications == null) {
+ result = ImmutableSetMultimap.of();
+ } else {
+ ImmutableSetMultimap.Builder<URI, URI> builder = ImmutableSetMultimap.builder();
+ for (Map.Entry<URI, Map<URI, URI>> next : packageToProfileApplications.entrySet()) {
+ builder.putAll(next.getKey(), next.getValue().keySet());
+ }
+ result = builder.build();
+ }
+
+ return result;
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries a mapping of all profiles applied externally on a package to the resources that apply those profiles.
+ * The mapping is one-to-many because any number of decorator models can apply the same profile to a package.
+ *
+ * @param package_
+ * the URI of a user-model package
+ * @return the future result of a mapping of the URIs of profiles externally applied on the package to the resources that apply them
+ */
+ public ListenableFuture<SetMultimap<URI, URI>> getAllAppliedProfilesAsync(URI package_) {
+ return afterIndex(getAllAppliedProfilesCallable(package_));
+ }
+
+ /**
+ * Queries a mapping of all profiles applied externally on a package to the resources that apply those profiles.
+ * The mapping is one-to-many because any number of decorator models can apply the same profile to a package.
+ *
+ * @param package_
+ * the URI of a user-model package
+ * @return a mapping of the URIs of profiles externally applied on the package to the resources that apply them
+ */
+ public SetMultimap<URI, URI> getAllAppliedProfiles(URI package_) throws CoreException {
+ return sync(afterIndex(getAllAppliedProfilesCallable(package_)));
+ }
+
+ Callable<SetMultimap<URI, URI>> getAllAppliedProfilesCallable(final URI packageURI) {
+ return new SyncCallable<SetMultimap<URI, URI>>() {
+ @Override
+ protected SetMultimap<URI, URI> doCall() {
+ ImmutableSetMultimap.Builder<URI, URI> result = ImmutableSetMultimap.builder();
+
+ for (URI paResource : modelToDecorators.get(packageURI.trimFragment())) {
+ Map<URI, Map<URI, URI>> packageToProfileApplications = decoratorModelToPackageToProfileApplications.get(paResource);
+ if (packageToProfileApplications != null) {
+ Map<URI, URI> profileApplications = packageToProfileApplications.get(packageURI);
+ if (profileApplications != null) {
+ for (URI profile : profileApplications.keySet()) {
+ result.put(profile, paResource);
+ }
+ }
+ }
+ }
+
+ return result.build();
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries a mapping of all profiles applied externally on a package to mappings of decorator model resources that apply those profiles
+ * to the Ecore definitions applied by those decorators. That is, (profile&nbsp;==>&nbsp;decorator-model&nbsp;==>&nbsp;ecore-definition).
+ * The mapping is one-to-many because any number of decorator models can apply the same profile to a package.
+ *
+ * @param package_
+ * the URI of a user-model package
+ * @return the future result of a mapping of the URIs of profiles externally applied on the package to the resources that apply them to
+ * the Ecore definitions applied by those resources
+ */
+ public ListenableFuture<Map<URI, Map<URI, URI>>> getAllAppliedProfileDefinitionsAsync(URI package_) {
+ return afterIndex(getAllAppliedProfileDefinitionsCallable(package_));
+ }
+
+ /**
+ * Queries a mapping of all profiles applied externally on a package to mappings of decorator model resources that apply those profiles
+ * to the Ecore definitions applied by those decorators. That is, (profile&nbsp;==>&nbsp;decorator-model&nbsp;==>&nbsp;ecore-definition).
+ * The mapping is one-to-many because any number of decorator models can apply the same profile to a package.
+ *
+ * @param package_
+ * the URI of a user-model package
+ * @return a mapping of the URIs of profiles externally applied on the package to the resources that apply them to
+ * the Ecore definitions applied by those resources
+ */
+ public Map<URI, Map<URI, URI>> getAllAppliedProfileDefinitions(URI package_) throws CoreException {
+ return sync(afterIndex(getAllAppliedProfileDefinitionsCallable(package_)));
+ }
+
+ Callable<Map<URI, Map<URI, URI>>> getAllAppliedProfileDefinitionsCallable(final URI packageURI) {
+ return new SyncCallable<Map<URI, Map<URI, URI>>>() {
+ @Override
+ protected Map<URI, Map<URI, URI>> doCall() {
+ Map<URI, ImmutableMap.Builder<URI, URI>> gather = Maps.newHashMap();
+
+ for (URI paResource : modelToDecorators.get(packageURI.trimFragment())) {
+ Map<URI, Map<URI, URI>> packageToProfileApplications = decoratorModelToPackageToProfileApplications.get(paResource);
+ if (packageToProfileApplications != null) {
+ Map<URI, URI> profileApplications = packageToProfileApplications.get(packageURI);
+ if (profileApplications != null) {
+ for (Map.Entry<URI, URI> next : profileApplications.entrySet()) {
+ URI profile = next.getKey();
+ ImmutableMap.Builder<URI, URI> builder = gather.get(profile);
+ if (builder == null) {
+ builder = ImmutableMap.builder();
+ gather.put(profile, builder);
+ }
+
+ builder.put(paResource, next.getValue());
+ }
+ }
+ }
+ }
+
+ ImmutableMap.Builder<URI, Map<URI, URI>> result = ImmutableMap.builder();
+ for (Map.Entry<URI, ImmutableMap.Builder<URI, URI>> next : gather.entrySet()) {
+ result.put(next.getKey(), next.getValue().build());
+ }
+ return result.build();
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries the set of URIs of decorator models that apply profiles to the specified package.
+ *
+ * @param package_
+ * the URI of a user-model package
+ * @return the future result of the URIs of all decorator models that apply profiels to it
+ */
+ public ListenableFuture<Set<URI>> getDecoratorModelsForPackageAsync(URI package_) {
+ return afterIndex(getDecoratorModelsForPackageCallable(package_));
+ }
+
+ /**
+ * Queries the set of URIs of decorator models that apply profiles to the specified package.
+ *
+ * @param package_
+ * the URI of a user-model package
+ * @return the URIs of all decorator models that apply profiels to it
+ */
+ public Set<URI> getDecoratorModelsForPackage(URI package_) throws CoreException {
+ return sync(afterIndex(getDecoratorModelsForPackageCallable(package_)));
+ }
+
+ Callable<Set<URI>> getDecoratorModelsForPackageCallable(final URI packageURI) {
+ return new SyncCallable<Set<URI>>() {
+ @Override
+ protected Set<URI> doCall() {
+ return ImmutableSet.copyOf(packageToDecoratorModels.get(packageURI));
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries a mapping of the user-defined names/identifiers of the profile application externalization models in the workspace.
+ *
+ * @return the future result of the known decorator models' names
+ */
+ public ListenableFuture<Map<URI, String>> getDecoratorModelNamesAsync() {
+ return afterIndex(getDecoratorModelNamesCallable());
+ }
+
+ /**
+ * Queries a mapping of the user-defined names/identifiers of the profile application externalization models in the workspace.
+ *
+ * @return the known decorator models' names
+ */
+ public Map<URI, String> getDecoratorModelNames() throws CoreException {
+ return sync(afterIndex(getDecoratorModelNamesCallable()));
+ }
+
+ Callable<Map<URI, String>> getDecoratorModelNamesCallable() {
+ return new SyncCallable<Map<URI, String>>() {
+ @Override
+ protected Map<URI, String> doCall() {
+ return ImmutableMap.copyOf(decoratorModelNames);
+ }
+ };
+ }
+
+ /**
+ * Asynchronously queries the user-defined names/identifier of a decorator model.
+ *
+ * @param resourceURI
+ * the URI of the decorator model
+ * @return the future result of the decorator model name
+ */
+ public ListenableFuture<String> getDecoratorModelNameAsync(final URI resourceURI) {
+ return Futures.transform(getDecoratorModelNamesAsync(), new Function<Map<URI, String>, String>() {
+ @Override
+ public String apply(Map<URI, String> input) {
+ return input.get(resourceURI);
+ }
+ });
+ }
+
+ /**
+ * Queries the user-defined names/identifier of a decorator model.
+ *
+ * @param resourceURI
+ * the URI of the decorator model
+ * @return the decorator model name
+ */
+ public String getDecoratorModelName(URI resourceURI) throws CoreException {
+ return sync(getDecoratorModelNameAsync(resourceURI));
+ }
+
+ <V> ListenableFuture<V> afterIndex(Callable<V> callable) {
+ return index.afterIndex(callable);
+ }
+
+ private void index(IFile file) {
+ final URI decoratorURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+
+ ProfileIndexHandler handler = new ProfileIndexHandler(decoratorURI);
+
+ InputStream input = null;
+
+ try {
+ SAXParserFactory factory = SAXParserFactory.newInstance();
+ factory.setValidating(false);
+ factory.setNamespaceAware(true);
+ SAXParser parser = factory.newSAXParser();
+
+ input = file.getContents();
+
+ parser.parse(input, handler, decoratorURI.toString());
+ } catch (Exception e) {
+ // We intentionally bomb out early with an exception
+ } finally {
+ if (input != null) {
+ try {
+ input.close();
+ } catch (IOException e) {
+ Activator.log.error("Could not close file after indexing.", e); //$NON-NLS-1$
+ }
+ }
+ }
+
+ synchronized (sync) {
+ // first, remove all links to the decorator model
+ for (URI next : decoratorToModels.get(decoratorURI)) {
+ modelToDecorators.remove(next, decoratorURI);
+ }
+
+ // update the forward mapping
+ decoratorToModels.replaceValues(decoratorURI, handler.getReferencedModelURIs());
+
+ // update the reverse mapping
+ for (URI next : handler.getReferencedModelURIs()) {
+ modelToDecorators.put(next, decoratorURI);
+ }
+
+ // remove all package links to the decorator model
+ Map<URI, Map<URI, URI>> packageToProfileApplications = decoratorModelToPackageToProfileApplications.get(decoratorURI);
+ if (packageToProfileApplications != null) {
+ for (URI next : packageToProfileApplications.keySet()) {
+ packageToDecoratorModels.remove(next, decoratorURI);
+ }
+ }
+
+ // update the package links
+ for (URI next : handler.getPackageToProfileApplications().keySet()) {
+ packageToDecoratorModels.put(next, decoratorURI);
+ }
+
+ // and update the package-to-profiles-to-definitions index
+ decoratorModelToPackageToProfileApplications.put(decoratorURI, handler.getPackageToProfileApplications());
+
+ // and the externalization name index
+ decoratorModelNames.put(decoratorURI, handler.getExternalizationName());
+ }
+ }
+
+ private void unindex(IFile file) {
+ final URI decoratorURI = URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+
+ synchronized (sync) {
+ // first, remove all links to the decorator model
+ for (URI next : decoratorToModels.get(decoratorURI)) {
+ modelToDecorators.remove(next, decoratorURI);
+ }
+
+ // remove the forward mapping
+ decoratorToModels.removeAll(decoratorURI);
+
+ // remove from mapping of packages to decorator models
+ Map<URI, Map<URI, URI>> packageToProfileApplications = decoratorModelToPackageToProfileApplications.get(decoratorURI);
+ if (packageToProfileApplications != null) {
+ for (URI next : packageToProfileApplications.keySet()) {
+ packageToDecoratorModels.get(next).remove(decoratorURI);
+ }
+ }
+
+ // remove the package-to-profiles index
+ decoratorModelToPackageToProfileApplications.remove(decoratorURI);
+
+ // and the name index
+ decoratorModelNames.remove(decoratorURI);
+ }
+ }
+
+ private IndexHandler<DecoratorModelIndex> indexer() {
+ return new IndexHandler<DecoratorModelIndex>() {
+ @Override
+ public DecoratorModelIndex index(IFile file) {
+ DecoratorModelIndex.this.index(file);
+ return DecoratorModelIndex.this;
+ }
+
+ @Override
+ public void unindex(IFile file) {
+ DecoratorModelIndex.this.unindex(file);
+ }
+ };
+ }
+
+ public void addIndexListener(IDecoratorModelIndexListener listener) {
+ listeners.addIfAbsent(listener);
+ }
+
+ public void removeIndexListener(IDecoratorModelIndexListener listener) {
+ listeners.remove(listener);
+ }
+
+ protected final void notifyChanged() {
+ if (!listeners.isEmpty()) {
+ DecoratorModelIndexEvent event = new DecoratorModelIndexEvent(this, DecoratorModelIndexEvent.INDEX_CHANGED);
+ for (IDecoratorModelIndexListener next : listeners) {
+ try {
+ next.indexChanged(event);
+ } catch (Exception e) {
+ Activator.log.error("Uncaught exception in decorator model index listener.", e); //$NON-NLS-1$
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ abstract class SyncCallable<V> implements Callable<V> {
+ @Override
+ public final V call() throws Exception {
+ synchronized (sync) {
+ return doCall();
+ }
+ }
+
+ protected abstract V doCall();
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndexEvent.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndexEvent.java
new file mode 100644
index 00000000000..8c911fd8112
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelIndexEvent.java
@@ -0,0 +1,42 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource;
+
+import java.util.EventObject;
+
+/**
+ * Event object notifying of changes to the {@link DecoratorModelIndex}.
+ */
+public class DecoratorModelIndexEvent extends EventObject {
+
+ public static final int INDEX_CHANGED = 0;
+
+ private static final long serialVersionUID = 1L;
+
+ private final int eventType;
+
+ public DecoratorModelIndexEvent(DecoratorModelIndex source, int eventType) {
+ super(source);
+
+ this.eventType = eventType;
+ }
+
+ public final DecoratorModelIndex getIndex() {
+ return (DecoratorModelIndex) getSource();
+ }
+
+ public final int getEventType() {
+ return eventType;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelReadOnlyHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelReadOnlyHandler.java
new file mode 100644
index 00000000000..d0cd231810d
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelReadOnlyHandler.java
@@ -0,0 +1,79 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource;
+
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.infra.core.resource.AbstractReadOnlyHandler;
+import org.eclipse.papyrus.infra.core.resource.IReadOnlyHandler2;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ReadOnlyAxis;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+
+import com.google.common.base.Optional;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
+/**
+ * Read-only handler for profile application resources used by the current model.
+ */
+public class DecoratorModelReadOnlyHandler extends AbstractReadOnlyHandler {
+
+ public DecoratorModelReadOnlyHandler(EditingDomain editingDomain) {
+ super(editingDomain);
+ }
+
+ @Override
+ public Optional<Boolean> anyReadOnly(Set<ReadOnlyAxis> axes, URI[] uris) {
+ // mine is a discretionary read-only policy
+ if (axes.contains(ReadOnlyAxis.DISCRETION)) {
+ EditingDomain domain = getEditingDomain();
+ ResourceSet rset = (domain == null) ? null : domain.getResourceSet();
+ if (rset instanceof ModelSet) {
+ Set<URI> userModels = Sets.newHashSet();
+
+ for (URI next : uris) {
+ Resource resource = rset.getResource(next, false);
+ if ((resource != null) && resource.isLoaded() && DecoratorModelUtils.isDecoratorModel(resource)) {
+ userModels.addAll(DecoratorModelUtils.getUserModelResources(resource));
+ }
+ }
+
+ if (userModels.isEmpty()) {
+ // An empty profile applications resource is not read-only; it's waiting for us to add stuff to it!
+ return Optional.of(false);
+ } else {
+ // This resource's read-only status is the same as the resources for which it provides profile applications
+ IReadOnlyHandler2 manager = ((ModelSet) rset).getReadOnlyHandler();
+ if (manager != null) {
+ return manager.anyReadOnly(ReadOnlyAxis.discretionAxes(), Iterables.toArray(userModels, URI.class));
+ }
+ }
+ }
+ }
+
+ return Optional.absent();
+ }
+
+ @Override
+ public Optional<Boolean> makeWritable(Set<ReadOnlyAxis> axes, URI[] uris) {
+ // I never make anything writable; my job is to make sure that resources don't appear read-only when they shouldn't
+ return Optional.absent();
+ }
+
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelResourceSet.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelResourceSet.java
new file mode 100644
index 00000000000..b5b46e67021
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/DecoratorModelResourceSet.java
@@ -0,0 +1,116 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource;
+
+import java.util.Set;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EFactory;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.impl.EPackageRegistryImpl;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.BasicExtendedMetaData;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * A minimalist resource set that does not resolve proxies except in some given scope of target resource URIs.
+ */
+public class DecoratorModelResourceSet extends ResourceSetImpl {
+ private final Set<URI> resolutionScope;
+
+ public DecoratorModelResourceSet() {
+ this(null);
+ }
+
+ public DecoratorModelResourceSet(Set<URI> resolutionScope) {
+ super();
+
+ this.resolutionScope = resolutionScope;
+
+ EPackage.Registry registry = new DecoratorModelPackageRegistry();
+ ExtendedMetaData metadata = new BasicExtendedMetaData(registry);
+
+ setPackageRegistry(registry);
+ getLoadOptions().put(XMLResource.OPTION_EXTENDED_META_DATA, metadata);
+
+ getLoadOptions().put(XMLResource.OPTION_DEFER_IDREF_RESOLUTION, true);
+ getLoadOptions().put(XMLResource.OPTION_LAX_FEATURE_PROCESSING, true);
+ getLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, true);
+ getLoadOptions().put(XMLResource.OPTION_USE_PACKAGE_NS_URI_AS_LOCATION, false);
+ }
+
+ @Override
+ public EObject getEObject(URI uri, boolean loadOnDemand) {
+ EObject result = null;
+
+ // Don't resolve any proxies except to metamodels and registered profiles and resources in our scope
+ if (!loadOnDemand || !uri.isPlatformResource() || ((resolutionScope != null) && resolutionScope.contains(uri.trimFragment()))) {
+ result = super.getEObject(uri, loadOnDemand);
+ } else {
+ result = super.getEObject(uri, false);
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+
+ private static class DecoratorModelPackageRegistry extends EPackageRegistryImpl {
+ private static final long serialVersionUID = 1L;
+
+ private final Set<EPackage> acceptedPackages = ImmutableSet.of(UMLPackage.eINSTANCE, EcorePackage.eINSTANCE, ProfileExternalizationPackage.eINSTANCE);
+ private final Set<EFactory> acceptedFactories;
+
+ {
+ ImmutableSet.Builder<EFactory> factories = ImmutableSet.builder();
+ for (EPackage next : acceptedPackages) {
+ factories.add(next.getEFactoryInstance());
+ }
+ acceptedFactories = factories.build();
+ }
+
+ DecoratorModelPackageRegistry() {
+ super(EPackage.Registry.INSTANCE);
+ }
+
+ // Don't resolve anything but the UML metamodel and the externalization profile
+ @Override
+ protected EPackage delegatedGetEPackage(String nsURI) {
+ EPackage result = super.delegatedGetEPackage(nsURI);
+ if (!acceptedPackages.contains(result)) {
+ result = null;
+ }
+ return result;
+ }
+
+ @Override
+ protected EFactory delegatedGetEFactory(String nsURI) {
+ EFactory result = super.delegatedGetEFactory(nsURI);
+ if (!acceptedFactories.contains(result)) {
+ result = null;
+ }
+ return result;
+ }
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/IDecoratorModelIndexListener.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/IDecoratorModelIndexListener.java
new file mode 100644
index 00000000000..7589d2e835d
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/IDecoratorModelIndexListener.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource;
+
+/**
+ * Protocol for receiving notifications of index change events.
+ */
+public interface IDecoratorModelIndexListener {
+ /**
+ * Notifies me that the index has changed, usually due to changes to workspace resources that are decorator models.
+ *
+ * @param event
+ * the change event
+ */
+ void indexChanged(DecoratorModelIndexEvent event);
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/index/ProfileIndexHandler.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/index/ProfileIndexHandler.java
new file mode 100644
index 00000000000..9aa4106ee01
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/index/ProfileIndexHandler.java
@@ -0,0 +1,367 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource.index;
+
+import java.util.Collection;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.OperationCanceledException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.xml.sax.Attributes;
+import org.xml.sax.SAXException;
+import org.xml.sax.helpers.DefaultHandler;
+
+import com.google.common.base.Strings;
+import com.google.common.collect.ArrayListMultimap;
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Multimap;
+import com.google.common.collect.Sets;
+
+/**
+ * SAX parsing handler for indexing a profile-application resource. It produces two outputs:
+ * <ul>
+ * <li>{@link #getReferencedModelURIs()}: the set of model resource URIs for which the resource profiles profile applications (without fragments)</li>
+ * <li>{@link #getAppliedProfileURIs()}: a mapping of applying package to applied profile, as object URIs (with fragments)</li>
+ * </ul>
+ */
+public class ProfileIndexHandler extends DefaultHandler {
+ private final URI fileURI;
+ private final Set<URI> referencedModelURIs = Sets.newHashSet();
+ private final Map<URI, Map<URI, URI>> packageToProfileApplications = Maps.newHashMap();
+ private String externalizationName;
+
+ private String umlNamespace;
+ private String umlPrefix;
+ private String xmiType;
+ private String xmiID;
+ private Set<String> packageTypes;
+ private String dependencyType;
+ private String client;
+ private String profileApplication;
+ private String appliedProfile;
+ private String eAnnotations;
+ private String references;
+
+ private UMLElement top;
+ private int ignore;
+
+ private UMLElement currentPackage;
+
+ private Map<String, URI> packageClients = Maps.newHashMap();
+ private URIPair currentProfileApplication;
+ private Multimap<String, URIPair> packageProfileApplications = ArrayListMultimap.create();
+
+ private Await await = new Await();
+
+ /**
+ * Initializes me.
+ *
+ * @param fileURI
+ * the URI of the profile-application file that I am parsing
+ */
+ public ProfileIndexHandler(final URI fileURI) {
+ this.fileURI = fileURI;
+ }
+
+ public URI getFileURI() {
+ return fileURI;
+ }
+
+ public Set<URI> getReferencedModelURIs() {
+ return referencedModelURIs;
+ }
+
+ public Map<URI, Map<URI, URI>> getPackageToProfileApplications() {
+ return packageToProfileApplications;
+ }
+
+ public String getExternalizationName() {
+ return externalizationName;
+ }
+
+ @Override
+ public void startPrefixMapping(String prefix, String uri) throws SAXException {
+ if (uri.startsWith(XMIResource.XMI_NAMESPACE_PREFIX) || uri.startsWith(XMIResource.XMI_2_4_NAMESPACE_PREFIX)) {
+ xmiType = qname(prefix, "type"); //$NON-NLS-1$
+ xmiID = qname(prefix, "id"); //$NON-NLS-1$
+ } else if (EPackage.Registry.INSTANCE.getEPackage(uri) == UMLPackage.eINSTANCE) {
+ umlNamespace = uri;
+ umlPrefix = prefix;
+
+ packageTypes = ImmutableSet.of(umlElement("Package"), umlElement("Model"), umlElement("Profile")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ dependencyType = umlElement("Dependency"); //$NON-NLS-1$
+ client = "client"; //$NON-NLS-1$
+
+ profileApplication = "profileApplication"; //$NON-NLS-1$
+ appliedProfile = "appliedProfile"; //$NON-NLS-1$
+
+ eAnnotations = "eAnnotations"; //$NON-NLS-1$
+ references = "references"; //$NON-NLS-1$
+ }
+ }
+
+ protected final String umlElement(String name) {
+ return qname(umlPrefix, name);
+ }
+
+ protected final String qname(String prefix, String name) {
+ StringBuilder buf = new StringBuilder(prefix.length() + name.length() + 1);
+ return buf.append(prefix).append(':').append(name).toString();
+ }
+
+ @Override
+ public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
+ if (umlNamespace.equals(uri) || (top != null)) {
+ // skip over annotations
+ if (!ignore(qName, attributes)) {
+ push(qName, attributes);
+ handleUMLElement(top, attributes);
+ }
+ }
+ }
+
+ boolean ignore(String qName, Attributes attributes) {
+ boolean result = false;
+
+ if (attributes != null) { // Starting an element
+ result = (ignore > 0) || (eAnnotations.equals(qName) && !UMLUtil.UML2_UML_PACKAGE_2_0_NS_URI.equals(attributes.getValue("source"))); //$NON-NLS-1$
+ if (result) {
+ ignore++;
+ }
+ } else { // Ending an element
+ result = (ignore > 0);
+ if (result) {
+ ignore--;
+ }
+ }
+
+ return result;
+ }
+
+ protected final void push(String qName, Attributes attributes) {
+ top = new UMLElement(qName, attributes);
+ }
+
+ protected final UMLElement pop() {
+ UMLElement result = top;
+ if (top != null) {
+ top = top.parent;
+ }
+ return result;
+ }
+
+ protected void handleUMLElement(UMLElement element, Attributes attributes) throws SAXException {
+ if (element.isPackage() && (element.getHREF() == null)) {
+ // An href is a reference to a package, not a package in our element hierarchy
+ currentPackage = element;
+
+ // if it's the top package, get its name
+ if (currentPackage.parent == null) {
+ externalizationName = attributes.getValue("name"); //$NON-NLS-1$
+ }
+ }
+
+ if (element.isA(dependencyType)) {
+ // It's a dependency. We want its client
+ await.push(client);
+ } else if (element.isRole(profileApplication)) {
+ currentProfileApplication = new URIPair();
+ packageProfileApplications.put(currentPackage.id, currentProfileApplication);
+ await.push(appliedProfile);
+ } else if (element.isA(UMLUtil.UML2_UML_PACKAGE_2_0_NS_URI)) {
+ // It's the applied profile definition annotation
+ await.push(references);
+ } else if (await.isAwaiting(element)) {
+ if (element.isRole(client) && element.isPackage()) {
+ // Got a package dependency client
+ handleDependencyClient(element);
+ } else if (element.isRole(appliedProfile)) {
+ handleAppliedProfile(element);
+ } else if (element.isRole(references)) {
+ handleReferences(element);
+ }
+
+ await.pop();
+ }
+ }
+
+ protected void handleDependencyClient(UMLElement client) {
+ URI href = client.getHREF();
+ if (href != null) {
+ referencedModelURIs.add(href.trimFragment());
+ packageClients.put(currentPackage.id, href);
+ }
+ }
+
+ protected void handleReferences(UMLElement references) {
+ URI href = references.getHREF();
+ if (href != null) {
+ currentProfileApplication.second = href;
+ }
+ }
+
+ protected void handleAppliedProfile(UMLElement appliedProfile) {
+ URI href = appliedProfile.getHREF();
+ if (href != null) {
+ currentProfileApplication.first = href;
+ }
+ }
+
+ protected void summarize() {
+ for (String packageID : packageProfileApplications.keySet()) {
+ URI applyingPackageURI = packageClients.get(packageID);
+ if (applyingPackageURI != null) {
+ Collection<URIPair> profileApplications = packageProfileApplications.get(packageID);
+ if (!profileApplications.isEmpty()) {
+ Map<URI, URI> map = packageToProfileApplications.get(applyingPackageURI);
+ if (map == null) {
+ map = Maps.newHashMap();
+ packageToProfileApplications.put(applyingPackageURI, map);
+ }
+ for (URIPair profileApplication : profileApplications) {
+ map.put(profileApplication.first, profileApplication.second);
+ }
+ }
+ }
+ }
+ }
+
+ @Override
+ public void endElement(String uri, String localName, String qName) throws SAXException {
+ if (!ignore(qName, null)) {
+ if (await.stopAt(pop())) {
+ await.pop();
+ }
+
+ if (top != null) {
+ currentPackage = top.nearestPackage();
+ }
+
+ if (top == null) {
+ // We're done with UML content
+ summarize();
+ throw new OperationCanceledException();
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ class UMLElement {
+ final UMLElement parent;
+
+ final String role;
+ final String type;
+ final String id;
+ final String href;
+
+ UMLElement(String qName, Attributes attributes) {
+ parent = top;
+
+ String type;
+ if (qName.equals(eAnnotations)) {
+ // "type" of an annotation is its source
+ type = attributes.getValue("source"); //$NON-NLS-1$
+ } else {
+ type = attributes.getValue(xmiType);
+ if (Strings.isNullOrEmpty(type)) {
+ type = qName;
+ }
+ }
+
+ this.role = qName;
+ this.type = type;
+ this.id = attributes.getValue(xmiID);
+ this.href = attributes.getValue("href"); //$NON-NLS-1$
+ }
+
+ boolean isPackage() {
+ return packageTypes.contains(type);
+ }
+
+ boolean isRole(String roleName) {
+ return roleName.equals(role);
+ }
+
+ boolean isA(String xmiType) {
+ return xmiType.equals(type);
+ }
+
+ URI getHREF() {
+ return Strings.isNullOrEmpty(href) ? null : URI.createURI(href).resolve(fileURI);
+ }
+
+ UMLElement nearestPackage() {
+ for (UMLElement next = this; next != null; next = next.parent) {
+ if (next.isPackage()) {
+ return next;
+ }
+ }
+ return null;
+ }
+ }
+
+ class Await {
+ final Await parent = await;
+
+ final String awaiting;
+ final UMLElement limit;
+
+ Await() {
+ this(null);
+ }
+
+ private Await(String awaiting) {
+ this.awaiting = awaiting;
+ this.limit = top;
+ }
+
+ boolean isRoot() {
+ return parent == null;
+ }
+
+ boolean isAwaiting(UMLElement element) {
+ return !isRoot() && element.isRole(awaiting);
+ }
+
+ boolean stopAt(UMLElement element) {
+ return !isRoot() && (limit == element);
+ }
+
+ Await push(String elementName) {
+ Await result = new Await(elementName);
+ await = result;
+ return result;
+ }
+
+ void pop() {
+ if (!isRoot()) {
+ await = parent;
+ }
+ }
+ }
+
+ private static final class URIPair {
+ URI first;
+ URI second;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java
new file mode 100644
index 00000000000..f673d2f0530
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/DecoratorModel.java
@@ -0,0 +1,260 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.model;
+
+import java.io.IOException;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.core.runtime.IPath;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMIResource;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.AbstractModel;
+import org.eclipse.papyrus.infra.core.resource.IModelSnippet;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.Activator;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Sets;
+
+/**
+ * A Papyrus Model managing loaded decorator models for the model being edited.
+ */
+public class DecoratorModel extends AbstractModel {
+
+ /** identifier of this IModel */
+ public static final String ID = "org.eclipse.papyrus.uml.decoratormodel.DecoratorModel"; //$NON-NLS-1$
+
+ // URI of an as-yet-empty resource that we are creating to put profile applications into, so that it will
+ // be known to be a decorator model resource
+ private URI creatingDecoratorModelURI;
+
+ @Override
+ public String getIdentifier() {
+ return ID;
+ }
+
+ @Override
+ public void init(ModelSet modelSet) {
+ super.init(modelSet);
+
+ DecoratorModelUtils.configure(modelSet);
+ }
+
+ /*
+ * Overridden to make it visible in this package.
+ */
+ @Override
+ protected ModelSet getModelManager() {
+ return super.getModelManager();
+ }
+
+ @Override
+ public void loadModel(IPath path) {
+ loadModel(getPlatformURI(path));
+ }
+
+ /**
+ * Returns a platform resource URI of the given path
+ *
+ * @param path
+ * the path
+ * @return the uri
+ */
+ protected URI getPlatformURI(IPath path) {
+ return URI.createPlatformResourceURI(path.toString(), true);
+ }
+
+ @Override
+ public void loadModel(URI uri) {
+ List<Resource> resources = getResources();
+ for (Resource resource : resources) {
+ try {
+ if (!resource.isLoaded()) {
+ resource.load(null);
+ }
+ EcoreUtil.resolveAll(resource); // Ensure that models applying the profiles are loaded
+ configureResource(resource);
+ } catch (IOException e) {
+ Activator.log.error(e);
+ }
+ }
+ // call registered snippets
+ snippets.performStart(this);
+ }
+
+ /**
+ * Returns the dynamically computed list of resources that are loaded decorator models.
+ *
+ * @return the loaded decorator models
+ */
+ protected List<Resource> getResources() {
+ List<Resource> result = Lists.newArrayListWithExpectedSize(0);
+
+ for (Resource next : ImmutableList.copyOf(getModelManager().getResources())) {
+ if (isDecoratorModelResource(next)) {
+ URI trimmed = next.getURI().trimFileExtension();
+ if (trimmed.equals(getModelManager().getURIWithoutExtension())) {
+ // This is one of ours
+ result.add(next);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public boolean isDecoratorModelResource(Resource resource) {
+ return isDecoratorModel(resource) || resource.getURI().equals(creatingDecoratorModelURI);
+ }
+
+ protected void configureResource(Resource resource) {
+ if (resource instanceof XMIResource) {
+ ((XMIResource) resource).getDefaultSaveOptions().putAll(getSaveOptions());
+ ((XMIResource) resource).setEncoding(AbstractBaseModel.ENCODING);
+ }
+ }
+
+ public Map<Object, Object> getSaveOptions() {
+ return AbstractBaseModel.getDefaultSaveOptions();
+ }
+
+ @Override
+ public void saveModel() throws IOException {
+ List<Resource> resources = getResources();
+ for (Resource resource : resources) {
+ if (!getModelManager().getTransactionalEditingDomain().isReadOnly(resource) && !ModelUtils.resourceFailedOnLoad(resource)) {
+ resource.save(getSaveOptions());
+ }
+ }
+ }
+
+ @Override
+ public void unload() {
+ // call registered snippets
+ snippets.performDispose(this);
+ List<Resource> resources = getResources();
+ for (Resource resource : resources) {
+ resource.unload();
+ }
+ }
+
+ @Override
+ public void addModelSnippet(IModelSnippet snippet) {
+ snippets.add(snippet);
+ }
+
+ @Override
+ public Set<URI> getModifiedURIs() {
+ Set<URI> result = Sets.newHashSet();
+
+ for (Resource resource : getResources()) {
+ if (!getModelManager().isTrackingModification() || resource.isModified()) {
+ result.add(resource.getURI());
+ }
+ }
+
+ return result;
+ }
+
+ public Resource loadDecoratorModel(URI uri) {
+ final ResourceSet resourceSet = getModelManager();
+
+ Resource result = resourceSet.getResource(uri, false);
+ if (result == null) {
+ // Use the UML resource implementation to ensure consistent handling of the UML metamodel and profiles
+ creatingDecoratorModelURI = uri;
+ try {
+ result = resourceSet.createResource(uri, UMLPackage.eCONTENT_TYPE);
+ } finally {
+ creatingDecoratorModelURI = null;
+ }
+ }
+
+ if (!result.isLoaded()) {
+ try {
+ result.load(resourceSet.getLoadOptions());
+
+ // Ensure that references to base elements resolve so that the diagrams
+ // and property sheets etc. may all update
+ EcoreUtil.resolveAll(result);
+ } catch (Exception e) {
+ // Fine, we couldn't load it all. Will recover whatever we did manage to load
+ }
+ }
+
+ return result;
+ }
+
+ public static boolean isDecoratorModel(Resource resource) {
+ boolean result = false;
+
+ if (resource.isLoaded()) {
+ Package root = (Package) EcoreUtil.getObjectByType(resource.getContents(), UMLPackage.Literals.PACKAGE);
+ if (root != null) {
+ result = DecoratorModelUtils.hasExternalizationProfile(root);
+ }
+ }
+
+ return result;
+ }
+
+ public static DecoratorModel getInstance(ModelSet modelSet) {
+ return (DecoratorModel) modelSet.getModel(ID);
+ }
+
+ //
+ // No-ops. I am like the AdditionalResourcesModel: I don't manage an aspect of the model being edited, rather, other models
+ //
+
+ @Override
+ public void createModel(IPath fullPath) {
+ // Pass
+ }
+
+ @Override
+ public void createModel(URI uri) {
+ // Pass
+ }
+
+ @Override
+ public void importModel(IPath path) {
+ // Pass
+ }
+
+ @Override
+ public void importModel(URI uri) {
+ // Pass
+ }
+
+ @Override
+ public void changeModelPath(IPath fullPath) {
+ // Pass
+ }
+
+ @Override
+ public void setModelURI(URI uri) {
+ // Pass
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/UMLSnippet.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/UMLSnippet.java
new file mode 100644
index 00000000000..7ef9e77de1d
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/model/UMLSnippet.java
@@ -0,0 +1,118 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.model;
+
+import java.util.Set;
+
+import org.eclipse.emf.common.notify.Adapter;
+import org.eclipse.emf.common.notify.Notifier;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.listenerservice.ModelListenerManager;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.IModelSnippet;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.ResourceAdapter;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Sets;
+
+/**
+ * A model snippet that ensures propagation of the {@link UmlModel}'s {@link ModelListenerManager} to all
+ * loaded profile-application resources.
+ */
+public class UMLSnippet implements IModelSnippet {
+ private DecoratorModel model;
+ private Adapter resourceAdapter;
+ private ModelListenerManager modelListenerManager;
+
+ public UMLSnippet() {
+ super();
+ }
+
+ @Override
+ public void start(IModel startingModel) {
+ model = (DecoratorModel) startingModel;
+
+ ModelSet modelSet = model.getModelManager();
+ UmlModel uml = (UmlModel) modelSet.getModel(UmlModel.MODEL_ID);
+ if (uml != null) {
+ modelListenerManager = getModelListenerManager(uml);
+ if (modelListenerManager != null) {
+ modelSet.eAdapters().add(getResourceAdapter());
+ }
+ }
+ }
+
+ @Override
+ public void dispose(IModel stoppingModel) {
+ if (stoppingModel == model) {
+ if (modelListenerManager != null) {
+ ModelSet modelSet = ((DecoratorModel) stoppingModel).getModelManager();
+ modelSet.eAdapters().remove(getResourceAdapter());
+ }
+
+ resourceAdapter = null;
+ modelListenerManager = null;
+ model = null;
+ }
+ }
+
+ private ModelListenerManager getModelListenerManager(UmlModel uml) {
+ ModelListenerManager result = null;
+
+ Resource resource = uml.getResource();
+ if (resource != null) {
+ result = Iterables.getFirst(Iterables.filter(resource.eAdapters(), ModelListenerManager.class), null);
+ }
+
+ return result;
+ }
+
+ private Adapter getResourceAdapter() {
+ if (resourceAdapter == null) {
+ resourceAdapter = new ResourceAdapter() {
+ private Set<Resource> managedResources = Sets.newHashSet();
+
+ @Override
+ protected void handleResourceAdded(Resource resource) {
+ if (model.isDecoratorModelResource(resource) || DecoratorModelUtils.isDecoratorModel(resource.getURI())) {
+ managedResources.add(resource);
+ resource.eAdapters().add(modelListenerManager);
+ }
+ }
+
+ @Override
+ protected void handleResourceRemoved(Resource resource) {
+ if (managedResources.remove(resource)) {
+ resource.eAdapters().remove(modelListenerManager);
+ }
+ }
+
+ @Override
+ public void unsetTarget(Notifier oldTarget) {
+ super.unsetTarget(oldTarget);
+
+ if (managedResources.remove(oldTarget)) {
+ // unmanage the resource
+ oldTarget.eAdapters().remove(modelListenerManager);
+ }
+ }
+ };
+ }
+
+ return resourceAdapter;
+ }
+}
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java
new file mode 100644
index 00000000000..5a63e8b4289
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ApplyProfiles.java
@@ -0,0 +1,92 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization;
+
+import org.eclipse.emf.common.util.EList;
+
+import org.eclipse.emf.ecore.EObject;
+
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * <!-- begin-user-doc -->
+ * A representation of the model object '<em><b>Apply Profiles</b></em>'.
+ * <!-- end-user-doc -->
+ *
+ * <!-- begin-model-doc -->
+ * base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))
+ * base_Dependency.client->forAll(oclIsKindOf(uml::Package))
+ * <!-- end-model-doc -->
+ *
+ * <p>
+ * The following features are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getBase_Dependency <em>Base Dependency</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage#getApplyProfiles()
+ * @model annotation="http://www.eclipse.org/emf/2002/Ecore constraints='suppliers_are_packages clients_are_packages'"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore/OCL suppliers_are_packages='base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))' clients_are_packages='base_Dependency.client->forAll(oclIsKindOf(uml::Package))'"
+ * @generated
+ */
+public interface ApplyProfiles extends EObject
+{
+ /**
+ * Returns the value of the '<em><b>Base Dependency</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of the '<em>Base Dependency</em>' reference isn't clear, there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ *
+ * @return the value of the '<em>Base Dependency</em>' reference.
+ * @see #setBase_Dependency(Dependency)
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage#getApplyProfiles_Base_Dependency()
+ * @model required="true" ordered="false"
+ * annotation="http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName body='extension_ApplyProfiles'"
+ * @generated
+ */
+ Dependency getBase_Dependency();
+
+ /**
+ * Sets the value of the '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getBase_Dependency <em>Base Dependency</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param value
+ * the new value of the '<em>Base Dependency</em>' reference.
+ * @see #getBase_Dependency()
+ * @generated
+ */
+ void setBase_Dependency(Dependency value);
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @model kind="operation" ordered="false"
+ * @generated
+ */
+ EList<Profile> getAppliedProfiles();
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @model kind="operation" ordered="false"
+ * @generated
+ */
+ EList<org.eclipse.uml2.uml.Package> getExternalizedAppliedProfilePackages();
+
+} // ApplyProfiles
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java
new file mode 100644
index 00000000000..617ffa15eb7
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationFactory.java
@@ -0,0 +1,56 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization;
+
+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.decoratormodel.profileExternalization.ProfileExternalizationPackage
+ * @generated
+ */
+public interface ProfileExternalizationFactory extends EFactory
+{
+ /**
+ * The singleton instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ ProfileExternalizationFactory eINSTANCE = org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ProfileExternalizationFactoryImpl.init();
+
+ /**
+ * Returns a new object of class '<em>Apply Profiles</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return a new object of class '<em>Apply Profiles</em>'.
+ * @generated
+ */
+ ApplyProfiles createApplyProfiles();
+
+ /**
+ * Returns the package supported by this factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the package supported by this factory.
+ * @generated
+ */
+ ProfileExternalizationPackage getProfileExternalizationPackage();
+
+} // ProfileExternalizationFactory
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java
new file mode 100644
index 00000000000..9c0dfe93a37
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/ProfileExternalizationPackage.java
@@ -0,0 +1,249 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Package</b> for the model.
+ * It contains accessors for the meta objects to represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationFactory
+ * @model kind="package"
+ * annotation="http://www.eclipse.org/emf/2002/Ecore validationDelegates='http://www.eclipse.org/emf/2002/Ecore/OCL'"
+ * annotation="http://www.eclipse.org/uml2/2.0.0/UML originalName='ProfileExternalization'"
+ * @generated
+ */
+public interface ProfileExternalizationPackage extends EPackage
+{
+ /**
+ * The package name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNAME = "profileExternalization"; //$NON-NLS-1$
+
+ /**
+ * The package namespace URI.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_URI = "http://www.eclipse.org/Papyrus/2014/profile/profileExternalization"; //$NON-NLS-1$
+
+ /**
+ * The package namespace name.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ String eNS_PREFIX = "profileext"; //$NON-NLS-1$
+
+ /**
+ * The singleton instance of the package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ ProfileExternalizationPackage eINSTANCE = org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ProfileExternalizationPackageImpl.init();
+
+ /**
+ * The meta object id for the '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl <em>Apply Profiles</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ProfileExternalizationPackageImpl#getApplyProfiles()
+ * @generated
+ */
+ int APPLY_PROFILES = 0;
+
+ /**
+ * The feature id for the '<em><b>Base Dependency</b></em>' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int APPLY_PROFILES__BASE_DEPENDENCY = 0;
+
+ /**
+ * The number of structural features of the '<em>Apply Profiles</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int APPLY_PROFILES_FEATURE_COUNT = 1;
+
+ /**
+ * The operation id for the '<em>Get Applied Profiles</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int APPLY_PROFILES___GET_APPLIED_PROFILES = 0;
+
+ /**
+ * The operation id for the '<em>Get Externalized Applied Profile Packages</em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int APPLY_PROFILES___GET_EXTERNALIZED_APPLIED_PROFILE_PACKAGES = 1;
+
+ /**
+ * The number of operations of the '<em>Apply Profiles</em>' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ * @ordered
+ */
+ int APPLY_PROFILES_OPERATION_COUNT = 2;
+
+
+ /**
+ * Returns the meta object for class '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles <em>Apply Profiles</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for class '<em>Apply Profiles</em>'.
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles
+ * @generated
+ */
+ EClass getApplyProfiles();
+
+ /**
+ * Returns the meta object for the reference '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getBase_Dependency <em>Base Dependency</em>}'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the reference '<em>Base Dependency</em>'.
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getBase_Dependency()
+ * @see #getApplyProfiles()
+ * @generated
+ */
+ EReference getApplyProfiles_Base_Dependency();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getAppliedProfiles() <em>Get Applied Profiles</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the '<em>Get Applied Profiles</em>' operation.
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getAppliedProfiles()
+ * @generated
+ */
+ EOperation getApplyProfiles__GetAppliedProfiles();
+
+ /**
+ * Returns the meta object for the '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getExternalizedAppliedProfilePackages() <em>Get Externalized Applied Profile Packages</em>}' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return the meta object for the '<em>Get Externalized Applied Profile Packages</em>' operation.
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getExternalizedAppliedProfilePackages()
+ * @generated
+ */
+ EOperation getApplyProfiles__GetExternalizedAppliedProfilePackages();
+
+ /**
+ * 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
+ */
+ ProfileExternalizationFactory getProfileExternalizationFactory();
+
+ /**
+ * <!-- begin-user-doc -->
+ * Defines literals for the meta objects that represent
+ * <ul>
+ * <li>each class,</li>
+ * <li>each feature of each class,</li>
+ * <li>each operation of each class,</li>
+ * <li>each enum,</li>
+ * <li>and each data type</li>
+ * </ul>
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ interface Literals
+ {
+ /**
+ * The meta object literal for the '{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl <em>Apply Profiles</em>}' class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ProfileExternalizationPackageImpl#getApplyProfiles()
+ * @generated
+ */
+ EClass APPLY_PROFILES = eINSTANCE.getApplyProfiles();
+
+ /**
+ * The meta object literal for the '<em><b>Base Dependency</b></em>' reference feature.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EReference APPLY_PROFILES__BASE_DEPENDENCY = eINSTANCE.getApplyProfiles_Base_Dependency();
+
+ /**
+ * The meta object literal for the '<em><b>Get Applied Profiles</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation APPLY_PROFILES___GET_APPLIED_PROFILES = eINSTANCE.getApplyProfiles__GetAppliedProfiles();
+
+ /**
+ * The meta object literal for the '<em><b>Get Externalized Applied Profile Packages</b></em>' operation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ EOperation APPLY_PROFILES___GET_EXTERNALIZED_APPLIED_PROFILE_PACKAGES = eINSTANCE.getApplyProfiles__GetExternalizedAppliedProfilePackages();
+
+ }
+
+} // ProfileExternalizationPackage
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java
new file mode 100644
index 00000000000..1531744f06a
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ApplyProfilesImpl.java
@@ -0,0 +1,274 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl;
+
+import java.lang.reflect.InvocationTargetException;
+
+import org.eclipse.emf.common.notify.Notification;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.InternalEObject;
+import org.eclipse.emf.ecore.impl.ENotificationImpl;
+import org.eclipse.emf.ecore.impl.MinimalEObjectImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.internal.operations.ApplyProfilesOperations;
+import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model object '<em><b>Apply Profiles</b></em>'.
+ * <!-- end-user-doc -->
+ * <p>
+ * The following features are implemented:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl.ApplyProfilesImpl#getBase_Dependency <em>Base Dependency</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ApplyProfilesImpl extends MinimalEObjectImpl.Container implements ApplyProfiles
+{
+ /**
+ * The cached value of the '{@link #getBase_Dependency() <em>Base Dependency</em>}' reference.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see #getBase_Dependency()
+ * @generated
+ * @ordered
+ */
+ protected Dependency base_Dependency;
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ApplyProfilesImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EClass eStaticClass()
+ {
+ return ProfileExternalizationPackage.Literals.APPLY_PROFILES;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Dependency getBase_Dependency()
+ {
+ if (base_Dependency != null && base_Dependency.eIsProxy())
+ {
+ InternalEObject oldBase_Dependency = (InternalEObject) base_Dependency;
+ base_Dependency = (Dependency) eResolveProxy(oldBase_Dependency);
+ if (base_Dependency != oldBase_Dependency)
+ {
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.RESOLVE, ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency));
+ }
+ }
+ }
+ return base_Dependency;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public Dependency basicGetBase_Dependency()
+ {
+ return base_Dependency;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void setBase_Dependency(Dependency newBase_Dependency)
+ {
+ Dependency oldBase_Dependency = base_Dependency;
+ base_Dependency = newBase_Dependency;
+ if (eNotificationRequired()) {
+ eNotify(new ENotificationImpl(this, Notification.SET, ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY, oldBase_Dependency, base_Dependency));
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<Profile> getAppliedProfiles()
+ {
+ return ApplyProfilesOperations.getAppliedProfiles(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EList<org.eclipse.uml2.uml.Package> getExternalizedAppliedProfilePackages()
+ {
+ return ApplyProfilesOperations.getExternalizedAppliedProfilePackages(this);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eGet(int featureID, boolean resolve, boolean coreType)
+ {
+ switch (featureID)
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY:
+ if (resolve) {
+ return getBase_Dependency();
+ }
+ return basicGetBase_Dependency();
+ }
+ return super.eGet(featureID, resolve, coreType);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eSet(int featureID, Object newValue)
+ {
+ switch (featureID)
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY:
+ setBase_Dependency((Dependency) newValue);
+ return;
+ }
+ super.eSet(featureID, newValue);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public void eUnset(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY:
+ setBase_Dependency((Dependency) null);
+ return;
+ }
+ super.eUnset(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public boolean eIsSet(int featureID)
+ {
+ switch (featureID)
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES__BASE_DEPENDENCY:
+ return base_Dependency != null;
+ }
+ return super.eIsSet(featureID);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public Object eInvoke(int operationID, EList<?> arguments) throws InvocationTargetException
+ {
+ switch (operationID)
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES___GET_APPLIED_PROFILES:
+ return getAppliedProfiles();
+ case ProfileExternalizationPackage.APPLY_PROFILES___GET_EXTERNALIZED_APPLIED_PROFILE_PACKAGES:
+ return getExternalizedAppliedProfilePackages();
+ }
+ return super.eInvoke(operationID, arguments);
+ }
+
+ /**
+ * Creates a new instance of the specified Ecore class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @param eClass
+ * The Ecore class of the instance to create.
+ * @return The new instance.
+ * @generated
+ */
+ protected EObject create(EClass eClass)
+ {
+ return EcoreUtil.create(eClass);
+ }
+
+ /**
+ * Retrieves the cache adapter for this '<em><b>Apply Profiles</b></em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @return The cache adapter for this '<em><b>Apply Profiles</b></em>'.
+ * @generated
+ */
+ protected CacheAdapter getCacheAdapter()
+ {
+ return CacheAdapter.getCacheAdapter(this);
+ }
+
+} // ApplyProfilesImpl
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java
new file mode 100644
index 00000000000..28798b87f31
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationFactoryImpl.java
@@ -0,0 +1,121 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.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.decoratormodel.profileExternalization.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Factory</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ProfileExternalizationFactoryImpl extends EFactoryImpl implements ProfileExternalizationFactory
+{
+ /**
+ * Creates the default factory implementation.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static ProfileExternalizationFactory init()
+ {
+ try
+ {
+ ProfileExternalizationFactory theProfileExternalizationFactory = (ProfileExternalizationFactory) EPackage.Registry.INSTANCE.getEFactory(ProfileExternalizationPackage.eNS_URI);
+ if (theProfileExternalizationFactory != null)
+ {
+ return theProfileExternalizationFactory;
+ }
+ } catch (Exception exception)
+ {
+ EcorePlugin.INSTANCE.log(exception);
+ }
+ return new ProfileExternalizationFactoryImpl();
+ }
+
+ /**
+ * Creates an instance of the factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProfileExternalizationFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EObject create(EClass eClass)
+ {
+ switch (eClass.getClassifierID())
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES:
+ return createApplyProfiles();
+ 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
+ */
+ @Override
+ public ApplyProfiles createApplyProfiles()
+ {
+ ApplyProfilesImpl applyProfiles = new ApplyProfilesImpl();
+ return applyProfiles;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ProfileExternalizationPackage getProfileExternalizationPackage()
+ {
+ return (ProfileExternalizationPackage) getEPackage();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @deprecated
+ * @generated
+ */
+ @Deprecated
+ public static ProfileExternalizationPackage getPackage()
+ {
+ return ProfileExternalizationPackage.eINSTANCE;
+ }
+
+} // ProfileExternalizationFactoryImpl
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java
new file mode 100644
index 00000000000..34b3cee8235
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/impl/ProfileExternalizationPackageImpl.java
@@ -0,0 +1,345 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.impl;
+
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EOperation;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.emf.ecore.EValidator;
+import org.eclipse.emf.ecore.impl.EPackageImpl;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationFactory;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.util.ProfileExternalizationValidator;
+import org.eclipse.uml2.uml.UMLPackage;
+
+/**
+ * <!-- begin-user-doc -->
+ * An implementation of the model <b>Package</b>.
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+public class ProfileExternalizationPackageImpl extends EPackageImpl implements ProfileExternalizationPackage
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private EClass applyProfilesEClass = 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.decoratormodel.profileExternalization.ProfileExternalizationPackage#eNS_URI
+ * @see #init()
+ * @generated
+ */
+ private ProfileExternalizationPackageImpl()
+ {
+ super(eNS_URI, ProfileExternalizationFactory.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 ProfileExternalizationPackage#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 ProfileExternalizationPackage init()
+ {
+ if (isInited) {
+ return (ProfileExternalizationPackage) EPackage.Registry.INSTANCE.getEPackage(ProfileExternalizationPackage.eNS_URI);
+ }
+
+ // Obtain or create and register package
+ ProfileExternalizationPackageImpl theProfileExternalizationPackage = (ProfileExternalizationPackageImpl) (EPackage.Registry.INSTANCE.get(eNS_URI) instanceof ProfileExternalizationPackageImpl ? EPackage.Registry.INSTANCE.get(eNS_URI)
+ : new ProfileExternalizationPackageImpl());
+
+ isInited = true;
+
+ // Initialize simple dependencies
+ UMLPackage.eINSTANCE.eClass();
+
+ // Create package meta-data objects
+ theProfileExternalizationPackage.createPackageContents();
+
+ // Initialize created meta-data
+ theProfileExternalizationPackage.initializePackageContents();
+
+ // Register package validator
+ EValidator.Registry.INSTANCE.put
+ (theProfileExternalizationPackage,
+ new EValidator.Descriptor()
+ {
+ @Override
+ public EValidator getEValidator()
+ {
+ return ProfileExternalizationValidator.INSTANCE;
+ }
+ });
+
+ // Mark meta-data to indicate it can't be changed
+ theProfileExternalizationPackage.freeze();
+
+
+ // Update the registry and return the package
+ EPackage.Registry.INSTANCE.put(ProfileExternalizationPackage.eNS_URI, theProfileExternalizationPackage);
+ return theProfileExternalizationPackage;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EClass getApplyProfiles()
+ {
+ return applyProfilesEClass;
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EReference getApplyProfiles_Base_Dependency()
+ {
+ return (EReference) applyProfilesEClass.getEStructuralFeatures().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getApplyProfiles__GetAppliedProfiles()
+ {
+ return applyProfilesEClass.getEOperations().get(0);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public EOperation getApplyProfiles__GetExternalizedAppliedProfilePackages()
+ {
+ return applyProfilesEClass.getEOperations().get(1);
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ProfileExternalizationFactory getProfileExternalizationFactory()
+ {
+ return (ProfileExternalizationFactory) 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
+ applyProfilesEClass = createEClass(APPLY_PROFILES);
+ createEReference(applyProfilesEClass, APPLY_PROFILES__BASE_DEPENDENCY);
+ createEOperation(applyProfilesEClass, APPLY_PROFILES___GET_APPLIED_PROFILES);
+ createEOperation(applyProfilesEClass, APPLY_PROFILES___GET_EXTERNALIZED_APPLIED_PROFILE_PACKAGES);
+ }
+
+ /**
+ * <!-- 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
+ UMLPackage theUMLPackage = (UMLPackage) EPackage.Registry.INSTANCE.getEPackage(UMLPackage.eNS_URI);
+
+ // Create type parameters
+
+ // Set bounds for type parameters
+
+ // Add supertypes to classes
+
+ // Initialize classes, features, and operations; add parameters
+ initEClass(applyProfilesEClass, ApplyProfiles.class, "ApplyProfiles", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS); //$NON-NLS-1$
+ initEReference(getApplyProfiles_Base_Dependency(), theUMLPackage.getDependency(), null,
+ "base_Dependency", null, 1, 1, ApplyProfiles.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED); //$NON-NLS-1$
+
+ initEOperation(getApplyProfiles__GetAppliedProfiles(), theUMLPackage.getProfile(), "getAppliedProfiles", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$
+
+ initEOperation(getApplyProfiles__GetExternalizedAppliedProfilePackages(), theUMLPackage.getPackage(), "getExternalizedAppliedProfilePackages", 0, -1, IS_UNIQUE, !IS_ORDERED); //$NON-NLS-1$
+
+ // Create resource
+ createResource(eNS_URI);
+
+ // Create annotations
+ // http://www.eclipse.org/emf/2002/Ecore
+ createEcoreAnnotations();
+ // http://www.eclipse.org/uml2/2.0.0/UML
+ createUMLAnnotations();
+ // http://www.eclipse.org/emf/2002/Ecore/OCL
+ createOCLAnnotations();
+ // http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName
+ createEmofAnnotations();
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createEcoreAnnotations()
+ {
+ String source = "http://www.eclipse.org/emf/2002/Ecore"; //$NON-NLS-1$
+ addAnnotation(this,
+ source,
+ new String[]
+ { "validationDelegates", "http://www.eclipse.org/emf/2002/Ecore/OCL" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ addAnnotation(applyProfilesEClass,
+ source,
+ new String[]
+ { "constraints", "suppliers_are_packages clients_are_packages" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/uml2/2.0.0/UML</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createUMLAnnotations()
+ {
+ String source = "http://www.eclipse.org/uml2/2.0.0/UML"; //$NON-NLS-1$
+ addAnnotation(this,
+ source,
+ new String[]
+ { "originalName", "ProfileExternalization" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://www.eclipse.org/emf/2002/Ecore/OCL</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createOCLAnnotations()
+ {
+ String source = "http://www.eclipse.org/emf/2002/Ecore/OCL"; //$NON-NLS-1$
+ addAnnotation(applyProfilesEClass,
+ source,
+ new String[]
+ { "suppliers_are_packages", "base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))", //$NON-NLS-1$ //$NON-NLS-2$
+ "clients_are_packages", "base_Dependency.client->forAll(oclIsKindOf(uml::Package))" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+ /**
+ * Initializes the annotations for <b>http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName</b>.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected void createEmofAnnotations()
+ {
+ String source = "http://schema.omg.org/spec/MOF/2.0/emof.xml#Property.oppositeRoleName"; //$NON-NLS-1$
+ addAnnotation(getApplyProfiles_Base_Dependency(),
+ source,
+ new String[]
+ { "body", "extension_ApplyProfiles" //$NON-NLS-1$ //$NON-NLS-2$
+ });
+ }
+
+} // ProfileExternalizationPackageImpl
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java
new file mode 100644
index 00000000000..8fe6e059688
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/internal/operations/ApplyProfilesOperations.java
@@ -0,0 +1,88 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.internal.operations;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import org.eclipse.emf.common.util.BasicEList;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.NamedElement;
+import org.eclipse.uml2.uml.Profile;
+
+/**
+ * <!-- begin-user-doc -->
+ * A static utility class that provides operations related to '<em><b>Apply Profiles</b></em>' model objects.
+ * <!-- end-user-doc -->
+ *
+ * <p>
+ * The following operations are supported:
+ * <ul>
+ * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getAppliedProfiles() <em>Get Applied Profiles</em>}</li>
+ * <li>{@link org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ApplyProfiles#getExternalizedAppliedProfilePackages() <em>Get Externalized Applied Profile Packages</em>}</li>
+ * </ul>
+ * </p>
+ *
+ * @generated
+ */
+public class ApplyProfilesOperations
+{
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected ApplyProfilesOperations() {
+ super();
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public static EList<Profile> getAppliedProfiles(ApplyProfiles applyProfiles) {
+ Set<Profile> result = new HashSet<Profile>();
+
+ for (org.eclipse.uml2.uml.Package package_ : applyProfiles.getExternalizedAppliedProfilePackages()) {
+ result.addAll(package_.getAppliedProfiles());
+ }
+
+ return new BasicEList.UnmodifiableEList<Profile>(result.size(), result.toArray());
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated NOT
+ */
+ public static EList<org.eclipse.uml2.uml.Package> getExternalizedAppliedProfilePackages(ApplyProfiles applyProfiles) {
+ Set<org.eclipse.uml2.uml.Package> result = new HashSet<org.eclipse.uml2.uml.Package>();
+
+ Dependency base = applyProfiles.getBase_Dependency();
+ if (base != null) {
+ for (NamedElement next : base.getSuppliers()) {
+ if (next instanceof org.eclipse.uml2.uml.Package) {
+ result.add((org.eclipse.uml2.uml.Package) next);
+ }
+ }
+ }
+
+ return new BasicEList.UnmodifiableEList<org.eclipse.uml2.uml.Package>(result.size(), result.toArray());
+ }
+
+} // ApplyProfilesOperations \ No newline at end of file
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java
new file mode 100644
index 00000000000..123f70ccfec
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationAdapterFactory.java
@@ -0,0 +1,148 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.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.EObject;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*;
+
+/**
+ * <!-- 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.decoratormodel.profileExternalization.ProfileExternalizationPackage
+ * @generated
+ */
+public class ProfileExternalizationAdapterFactory extends AdapterFactoryImpl
+{
+ /**
+ * The cached model package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ProfileExternalizationPackage modelPackage;
+
+ /**
+ * Creates an instance of the adapter factory.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProfileExternalizationAdapterFactory()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = ProfileExternalizationPackage.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 ProfileExternalizationSwitch<Adapter> modelSwitch =
+ new ProfileExternalizationSwitch<Adapter>()
+ {
+ @Override
+ public Adapter caseApplyProfiles(ApplyProfiles object)
+ {
+ return createApplyProfilesAdapter();
+ }
+
+ @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.decoratormodel.profileExternalization.ApplyProfiles <em>Apply Profiles</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.decoratormodel.profileExternalization.ApplyProfiles
+ * @generated
+ */
+ public Adapter createApplyProfilesAdapter()
+ {
+ 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;
+ }
+
+} // ProfileExternalizationAdapterFactory
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java
new file mode 100644
index 00000000000..49bbe45d06e
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationSwitch.java
@@ -0,0 +1,136 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.util;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.Switch;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*;
+
+/**
+ * <!-- 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.decoratormodel.profileExternalization.ProfileExternalizationPackage
+ * @generated
+ */
+public class ProfileExternalizationSwitch<T> extends Switch<T>
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static ProfileExternalizationPackage modelPackage;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProfileExternalizationSwitch()
+ {
+ if (modelPackage == null)
+ {
+ modelPackage = ProfileExternalizationPackage.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 ProfileExternalizationPackage.APPLY_PROFILES: {
+ ApplyProfiles applyProfiles = (ApplyProfiles) theEObject;
+ T result = caseApplyProfiles(applyProfiles);
+ if (result == null) {
+ result = defaultCase(theEObject);
+ }
+ return result;
+ }
+ default:
+ return defaultCase(theEObject);
+ }
+ }
+
+ /**
+ * Returns the result of interpreting the object as an instance of '<em>Apply Profiles</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>Apply Profiles</em>'.
+ * @see #doSwitch(org.eclipse.emf.ecore.EObject) doSwitch(EObject)
+ * @generated
+ */
+ public T caseApplyProfiles(ApplyProfiles 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;
+ }
+
+} // ProfileExternalizationSwitch
diff --git a/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java
new file mode 100644
index 00000000000..7ea7a9e80bf
--- /dev/null
+++ b/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel/src/org/eclipse/papyrus/uml/decoratormodel/profileExternalization/util/ProfileExternalizationValidator.java
@@ -0,0 +1,231 @@
+/**
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ */
+package org.eclipse.papyrus.uml.decoratormodel.profileExternalization.util;
+
+import java.util.Map;
+
+import org.eclipse.emf.common.util.Diagnostic;
+import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.ResourceLocator;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.util.EObjectValidator;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.*;
+
+/**
+ * <!-- begin-user-doc -->
+ * The <b>Validator</b> for the model.
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage
+ * @generated
+ */
+public class ProfileExternalizationValidator extends EObjectValidator
+{
+ /**
+ * The cached model package
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public static final ProfileExternalizationValidator INSTANCE = new ProfileExternalizationValidator();
+
+ /**
+ * A constant for the {@link org.eclipse.emf.common.util.Diagnostic#getSource() source} of diagnostic {@link org.eclipse.emf.common.util.Diagnostic#getCode() codes} from this package.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @see org.eclipse.emf.common.util.Diagnostic#getSource()
+ * @see org.eclipse.emf.common.util.Diagnostic#getCode()
+ * @generated
+ */
+ public static final String DIAGNOSTIC_SOURCE = "org.eclipse.papyrus.uml.decoratormodel.profileExternalization"; //$NON-NLS-1$
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ private static final int GENERATED_DIAGNOSTIC_CODE_COUNT = 0;
+
+ /**
+ * A constant with a fixed name that can be used as the base value for additional hand written constants in a derived class.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final int DIAGNOSTIC_CODE_COUNT = GENERATED_DIAGNOSTIC_CODE_COUNT;
+
+ /**
+ * Creates an instance of the switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public ProfileExternalizationValidator()
+ {
+ super();
+ }
+
+ /**
+ * Returns the package of this validator switch.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected EPackage getEPackage()
+ {
+ return ProfileExternalizationPackage.eINSTANCE;
+ }
+
+ /**
+ * Calls <code>validateXXX</code> for the corresponding classifier of the model.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ protected boolean validate(int classifierID, Object value, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ switch (classifierID)
+ {
+ case ProfileExternalizationPackage.APPLY_PROFILES:
+ return validateApplyProfiles((ApplyProfiles) value, diagnostics, context);
+ default:
+ return true;
+ }
+ }
+
+ /**
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateApplyProfiles(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ if (!validate_NoCircularContainment(applyProfiles, diagnostics, context)) {
+ return false;
+ }
+ boolean result = validate_EveryMultiplicityConforms(applyProfiles, diagnostics, context);
+ if (result || diagnostics != null) {
+ result &= validate_EveryDataValueConforms(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryReferenceIsContained(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryBidirectionalReferenceIsPaired(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryProxyResolves(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_UniqueID(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryKeyUnique(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validate_EveryMapEntryUnique(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validateApplyProfiles_suppliers_are_packages(applyProfiles, diagnostics, context);
+ }
+ if (result || diagnostics != null) {
+ result &= validateApplyProfiles_clients_are_packages(applyProfiles, diagnostics, context);
+ }
+ return result;
+ }
+
+ /**
+ * The cached validation expression for the suppliers_are_packages constraint of '<em>Apply Profiles</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final String APPLY_PROFILES__SUPPLIERS_ARE_PACKAGES__EEXPRESSION = "base_Dependency.supplier->forAll(oclIsKindOf(uml::Package))"; //$NON-NLS-1$
+
+ /**
+ * Validates the suppliers_are_packages constraint of '<em>Apply Profiles</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateApplyProfiles_suppliers_are_packages(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ return validate(ProfileExternalizationPackage.Literals.APPLY_PROFILES,
+ applyProfiles,
+ diagnostics,
+ context, "http://www.eclipse.org/emf/2002/Ecore/OCL", //$NON-NLS-1$
+ "suppliers_are_packages", //$NON-NLS-1$
+ APPLY_PROFILES__SUPPLIERS_ARE_PACKAGES__EEXPRESSION,
+ Diagnostic.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0);
+ }
+
+ /**
+ * The cached validation expression for the clients_are_packages constraint of '<em>Apply Profiles</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ protected static final String APPLY_PROFILES__CLIENTS_ARE_PACKAGES__EEXPRESSION = "base_Dependency.client->forAll(oclIsKindOf(uml::Package))"; //$NON-NLS-1$
+
+ /**
+ * Validates the clients_are_packages constraint of '<em>Apply Profiles</em>'.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ public boolean validateApplyProfiles_clients_are_packages(ApplyProfiles applyProfiles, DiagnosticChain diagnostics, Map<Object, Object> context)
+ {
+ return validate(ProfileExternalizationPackage.Literals.APPLY_PROFILES,
+ applyProfiles,
+ diagnostics,
+ context, "http://www.eclipse.org/emf/2002/Ecore/OCL", //$NON-NLS-1$
+ "clients_are_packages", //$NON-NLS-1$
+ APPLY_PROFILES__CLIENTS_ARE_PACKAGES__EEXPRESSION,
+ Diagnostic.ERROR,
+ DIAGNOSTIC_SOURCE,
+ 0);
+ }
+
+ /**
+ * Returns the resource locator that will be used to fetch messages for this validator's diagnostics.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ *
+ * @generated
+ */
+ @Override
+ public ResourceLocator getResourceLocator()
+ {
+ // TODO
+ // Specialize this to return a resource locator for messages specific to this validator.
+ // Ensure that you remove @generated or mark it @generated NOT
+ return super.getResourceLocator();
+ }
+
+} // ProfileExternalizationValidator
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java
index a5919a61837..f744e9af9fd 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveProfileApplicationCommand.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 Atos.
- *
+ * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.controlmode.profile.commands;
@@ -44,11 +44,12 @@ public class MoveProfileApplicationCommand extends AbstractControlCommand {
@Override
protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
Package packageUncontroled = (Package) getRequest().getTargetObject();
+ Resource sourceResource = packageUncontroled.eContainer().eResource();
Resource targetResource = getRequest().getTargetResource(getRequest().getNewURI().fileExtension());
if (targetResource == null) {
return CommandResult.newErrorCommandResult("Unable to retreive target resource");
}
- ProfileApplicationHelper.nestedRelocateStereotypeApplications(packageUncontroled, targetResource);
+ ProfileApplicationHelper.nestedRelocateStereotypeApplications(packageUncontroled, sourceResource, targetResource);
return CommandResult.newOKCommandResult();
}
} \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveStereotypeApplicationToControlResource.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveStereotypeApplicationToControlResource.java
index ec8a4f0fcd8..d1973f4df83 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveStereotypeApplicationToControlResource.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/commands/MoveStereotypeApplicationToControlResource.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 Atos.
- *
+ * Copyright (c) 2013, 2014 Atos, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Arthur Daussy (Atos) arthur.daussy@atos.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.controlmode.profile.commands;
@@ -19,7 +19,6 @@ import java.util.Set;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.TreeIterator;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
@@ -27,6 +26,7 @@ import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.gmf.runtime.common.core.command.CommandResult;
import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
import org.eclipse.papyrus.infra.services.controlmode.commands.AbstractControlCommand;
+import org.eclipse.papyrus.uml.controlmode.profile.helpers.ProfileApplicationHelper;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.uml2.uml.Element;
@@ -58,13 +58,13 @@ public final class MoveStereotypeApplicationToControlResource extends AbstractCo
}
}
+ Resource sourceResource = elem.eContainer().eResource();
Resource targetResource = getRequest().getTargetResource(UmlModel.UML_FILE_EXTENSION);
if (targetResource == null) {
return createNewControlCommandError("No uml resource created");//
}
for (Element e : elements) {
- EList<EObject> stereotypeApplications = e.getStereotypeApplications();
- targetResource.getContents().addAll(stereotypeApplications);
+ ProfileApplicationHelper.relocateStereotypeApplications(e, sourceResource, targetResource);
}
return CommandResult.newOKCommandResult();
diff --git a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java
index 4d215c1ee5f..6e6242a86ce 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.controlmode.profile/src/org/eclipse/papyrus/uml/controlmode/profile/helpers/ProfileApplicationHelper.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 Atos Origin.
- *
+ * Copyright (c) 2011, 2014 Atos Origin, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Atos Origin - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.controlmode.profile.helpers;
@@ -36,7 +36,8 @@ public class ProfileApplicationHelper {
public static final String DUPLICATED_PROFILE = "duplicatedProfile";
/**
- * Duplicate a profile application on a child package.
+ * Duplicate a profile application on a child package if that profile application is
+ * intrinsic to the model (not owned by a different model).
*
* @param _package
* package to duplicate profile application on
@@ -45,7 +46,9 @@ public class ProfileApplicationHelper {
*/
public static void duplicateProfileApplication(Package _package, Profile profile) {
if (profile != null && profile.getDefinition() != null) {
- if (!isSameProfileApplied(_package, profile)) {
+ ProfileApplication toCopy = _package.getProfileApplication(profile, true);
+ // Is it inherited from a parent package and intrinsic to the model?
+ if (_package.allOwningPackages().contains(toCopy.getApplyingPackage())) {
_package.applyProfile(profile);
ProfileApplication profileAppl = _package.getProfileApplication(profile);
if (profileAppl != null) {
@@ -107,34 +110,45 @@ public class ProfileApplicationHelper {
}
/**
- * Relocate stereotype applications for the nested elements of the selection in the controlled resource
+ * Relocate stereotype applications for the nested elements of the selection in the controlled resource.
+ * Stereotype applications are moved to the {@code target} resource only if they are currently in the {@code source} resource, to account for possibly externalized profile applications.
*
* @param pack
* the package for which stereotype application must be relocated
+ * @param source
+ * the source resource
* @param target
* the target controlled resource
*/
- public static void nestedRelocateStereotypeApplications(Package pack, Resource target) {
- relocateStereotypeApplications(pack, target);
+ public static void nestedRelocateStereotypeApplications(Package pack, Resource source, Resource target) {
+ relocateStereotypeApplications(pack, source, target);
for (Iterator<EObject> i = EcoreUtil.getAllProperContents(pack, true); i.hasNext();) {
EObject current = i.next();
if (current instanceof Element) {
- relocateStereotypeApplications((Element) current, target);
+ relocateStereotypeApplications((Element) current, source, target);
}
}
}
/**
- * Relocate stereotype applications for the an element in the controlled resource
+ * Relocate stereotype applications for the an element in the controlled resource.
+ * Stereotype applications are moved to the {@code target} resource only if they are currently in the {@code source} resource, to account for possibly externalized profile applications.
*
* @param element
* the element for which stereotype application must be relocated
+ * @param source
+ * the source resource
* @param target
* the target controlled resource
*/
- public static void relocateStereotypeApplications(Element element, Resource targetResource) {
+ public static void relocateStereotypeApplications(Element element, Resource source, Resource target) {
EList<EObject> stereotypeApplications = element.getStereotypeApplications();
- targetResource.getContents().addAll(stereotypeApplications);
+ EList<EObject> targetList = target.getContents();
+ for (EObject next : stereotypeApplications) {
+ if (next.eResource() == source) {
+ targetList.add(next);
+ }
+ }
}
/**
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
index 80d2bd42644..7e690138567 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/participants/StereotypeApplicationRepairParticipant.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.uml.modelrepair.internal.participants;
@@ -39,8 +40,10 @@ import org.eclipse.emf.ecore.EReference;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.ecore.EStructuralFeature.Setting;
import org.eclipse.emf.ecore.EcorePackage;
+import org.eclipse.emf.ecore.InternalEObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.xmi.XMLResource;
@@ -50,7 +53,6 @@ import org.eclipse.papyrus.infra.emf.resource.IDependencyReplacementParticipant;
import org.eclipse.papyrus.infra.emf.resource.Replacement;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.uml.modelrepair.Activator;
-import org.eclipse.uml2.common.util.UML2Util;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Namespace;
@@ -218,6 +220,18 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
public void migrate(Collection<? extends EObject> stereotypeApplications, IProgressMonitor monitor) {
SubMonitor sub = SubMonitor.convert(monitor, (2 * stereotypeApplications.size()) + 2);
+ // Capture object IDs for later transfer to new stereotype applications
+ final Map<EObject, String> objectIDs = Maps.newHashMap();
+ for (EObject next : stereotypeApplications) {
+ Resource res = next.eResource();
+ if (res instanceof XMLResource) {
+ String id = ((XMLResource) res).getID(next);
+ if (id != null) {
+ objectIDs.put(next, id);
+ }
+ }
+ }
+
for (EObject next : stereotypeApplications) {
EObject newInstance = copier.copy(next);
if ((newInstance != null) && (newInstance != next)) {
@@ -244,26 +258,28 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
if (copy != null) {
// Update the ID, if the old ID is known
- Resource res = original.eResource();
- if (res instanceof XMLResource) {
- XMLResource xml = (XMLResource) res;
- String id = xml.getID(original);
- if (id != null) {
- xml.setID(copy, id);
+ String id = objectIDs.get(original);
+ if (id != null) {
+ Resource res = copy.eResource();
+ if (res instanceof XMLResource) {
+ ((XMLResource) res).setID(copy, id);
}
}
// Replace incoming references to the old stereotypes with references to the new stereotypes
for (Setting setting : ImmutableList.copyOf(getNonNavigableInverseReferences(original))) {
- EStructuralFeature ref = setting.getEStructuralFeature();
-
- if ((ref != null) && ref.isChangeable()) {
- if (ref.isMany()) {
- @SuppressWarnings("unchecked")
- EList<EObject> list = ((EList<EObject>) setting.getEObject().eGet(ref));
- list.set(list.indexOf(original), copy);
- } else {
- setting.set(copy);
+ // Don't update cross-references between the old stereotype applications!
+ if (!copier.containsKey(setting.getEObject())) {
+ EStructuralFeature ref = setting.getEStructuralFeature();
+
+ if ((ref != null) && ref.isChangeable()) {
+ if (ref.isMany()) {
+ @SuppressWarnings("unchecked")
+ EList<EObject> list = ((EList<EObject>) setting.getEObject().eGet(ref));
+ list.set(list.indexOf(original), copy);
+ } else {
+ setting.set(copy);
+ }
}
}
}
@@ -273,11 +289,44 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
}
sub2.done();
- UML2Util.destroyAll(stereotypeApplications);
+ // Delete all trace of the old stereotype applications
+ for (EObject root : stereotypeApplications) {
+ removeCrossReferences(root);
+
+ for (TreeIterator<EObject> iter = root.eAllContents(); iter.hasNext();) {
+ EObject next = iter.next();
+
+ // The 'mixed' feature-map of an AnyType typically includes EReferences that think they are containments but aren't,
+ // where there are cross-document references (which are represented in the XMI as nested elements)
+ if (next.eIsProxy() || !EcoreUtil.isAncestor(root, next)) {
+ // Don't mess with objects contained elsewhere; they are referenced, not actually contained
+ iter.prune();
+ } else {
+ removeCrossReferences(next);
+ }
+ }
+
+ // And detach it from wherever it may be (if anywhere)
+ EcoreUtil.remove(root);
+ }
+
sub.worked(1);
copier.clear();
}
+
+ private void removeCrossReferences(EObject object) {
+ ECrossReferenceAdapter xrefAdapter = ECrossReferenceAdapter.getCrossReferenceAdapter(object);
+ if (xrefAdapter != null) { // It should not be null because we have the UML CacheAdapter!
+ for (EStructuralFeature.Setting next : ImmutableList.copyOf(xrefAdapter.getInverseReferences(object))) {
+ EReference reference = (EReference) next.getEStructuralFeature();
+
+ if (reference.isChangeable() && !reference.isContainment() && !reference.isContainer() && !reference.isDerived()) {
+ EcoreUtil.remove(next, object);
+ }
+ }
+ }
+ }
}
protected static class StereotypeApplicationRepairCopier extends StereotypeApplicationCopier {
@@ -409,11 +458,25 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
if (referenced == null) {
String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
handleException(new IllegalStateException(String.format("Unresolved reference in stereotype property %s: %s", propertyName, ref))); //$NON-NLS-1$
- } else if (!copyFeature.getEType().isInstance(referenced)) {
- String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
- handleException(new IllegalStateException(String.format("Attempt to reference object of type %s in stereotype property %s", UML2EcoreConverter.getOriginalName(referenced.eClass()), propertyName))); //$NON-NLS-1$
} else {
- eAdd(copyEObject, copyFeature, referenced);
+ // Is it an AnyType? If so, perhaps we have already converted it
+ if (referenced instanceof AnyType) {
+ // Look for copy
+ EObject referencedCopy = get(referenced);
+ if (referencedCopy != null) {
+ referenced = referencedCopy;
+ } else {
+ // Create a new proxy for it
+ referenced = createProxy((EReference) copyFeature, (AnyType) referenced);
+ }
+ }
+
+ if (!copyFeature.getEType().isInstance(referenced)) {
+ String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
+ handleException(new IllegalStateException(String.format("Attempt to reference object of type %s in stereotype property %s", UML2EcoreConverter.getOriginalName(referenced.eClass()), propertyName))); //$NON-NLS-1$
+ } else {
+ eAdd(copyEObject, copyFeature, referenced);
+ }
}
}
} else if (copyFeature instanceof EAttribute) {
@@ -462,6 +525,24 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
return baseResource.getResourceSet().getEObject(uri, true);
}
+ protected EObject createProxy(EReference reference, AnyType original) {
+ EObject result = original; // As a fall-back, we would just return the original and report a problem
+
+ EClass type = reference.getEReferenceType();
+ if (type.isAbstract()) {
+ // The original should have had type information, then, in the reference
+ type = getTarget(original);
+ }
+
+ if ((type != null) && !type.isAbstract()) {
+ result = EcoreUtil.create(type);
+ Resource resource = original.eResource();
+ ((InternalEObject) result).eSetProxyURI(resource.getURI().appendFragment(resource.getURIFragment(original)));
+ }
+
+ return result;
+ }
+
protected void copyUnrecognizedContentMixed(EAttribute mixed, EObject eObject, EObject copyEObject) {
FeatureMap featureMap = (FeatureMap) eObject.eGet(mixed);
for (FeatureMap.Entry next : featureMap) {
@@ -488,19 +569,29 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
} else if (copyFeature instanceof EReference) {
EReference reference = (EReference) copyFeature;
if (!reference.isContainment()) {
- // Get the HREF/IDREF from the element, resolve the referenced object, and set it into the reference
- String refs = getTextContent(anyType);
- if (refs != null) {
- for (String ref : whitespace.split(refs)) {
- EObject referenced = resolveRef(eObject, ref);
- if (referenced == null) {
- String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
- handleException(new IllegalStateException(String.format("Unresolved reference in stereotype property %s: %s", propertyName, ref))); //$NON-NLS-1$
- } else if (!copyFeature.getEType().isInstance(referenced)) {
- String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
- handleException(new IllegalStateException(String.format("Attempt to reference object of type %s in stereotype property %s", UML2EcoreConverter.getOriginalName(referenced.eClass()), propertyName))); //$NON-NLS-1$
- } else {
- eAdd(copyEObject, reference, referenced);
+ if (anyType.eClass() != XMLTypePackage.Literals.ANY_TYPE) {
+ // We got a real proxy, somehow. Just use it
+ if (!copyFeature.getEType().isInstance(anyType)) {
+ String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
+ handleException(new IllegalStateException(String.format("Attempt to reference object of type %s in stereotype property %s", UML2EcoreConverter.getOriginalName(anyType.eClass()), propertyName))); //$NON-NLS-1$
+ } else {
+ eAdd(copyEObject, reference, anyType);
+ }
+ } else {
+ // Get the HREF/IDREF from the element, resolve the referenced object, and set it into the reference
+ String refs = getTextContent(anyType);
+ if (refs != null) {
+ for (String ref : whitespace.split(refs)) {
+ EObject referenced = resolveRef(eObject, ref);
+ if (referenced == null) {
+ String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
+ handleException(new IllegalStateException(String.format("Unresolved reference in stereotype property %s: %s", propertyName, ref))); //$NON-NLS-1$
+ } else if (!copyFeature.getEType().isInstance(referenced)) {
+ String propertyName = getQualifiedName(UMLUtil.getNamedElement(copyFeature, eObject));
+ handleException(new IllegalStateException(String.format("Attempt to reference object of type %s in stereotype property %s", UML2EcoreConverter.getOriginalName(referenced.eClass()), propertyName))); //$NON-NLS-1$
+ } else {
+ eAdd(copyEObject, reference, referenced);
+ }
}
}
}
@@ -653,7 +744,8 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
// The base_Xyz extension end is always at most one, so it should be serialized as an IDREF
for (FeatureMap.Entry next : (FeatureMap) anyType.eGet(XMLTypePackage.Literals.ANY_TYPE__ANY_ATTRIBUTE)) {
if (next.getEStructuralFeature().getName().startsWith("base_")) {
- EObject referenced = resolveRef(anyType, String.valueOf(next.getValue()));
+ Object value = next.getValue();
+ EObject referenced = (value instanceof EObject) ? (EObject) value : resolveRef(anyType, String.valueOf(next.getValue()));
if (referenced instanceof Element) {
result = (Element) referenced;
break;
@@ -665,7 +757,8 @@ public class StereotypeApplicationRepairParticipant extends PackageOperations im
if (result == null) {
for (FeatureMap.Entry next : (FeatureMap) anyType.eGet(XMLTypePackage.Literals.ANY_TYPE__MIXED)) {
if ((next.getEStructuralFeature() instanceof EReference) && next.getEStructuralFeature().getName().startsWith("base_")) {
- EObject referenced = resolveRef(anyType, getTextContent((EObject) next.getValue()));
+ EObject value = (EObject) next.getValue();
+ EObject referenced = (value.eClass() != XMLTypePackage.Literals.ANY_TYPE) ? (EObject) value : resolveRef(anyType, getTextContent(value));
if (referenced instanceof Element) {
result = (Element) referenced;
break;
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ApplyProfileAction.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ApplyProfileAction.java
index 82ce8181436..91b7d9a5656 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ApplyProfileAction.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ApplyProfileAction.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.uml.modelrepair.internal.stereotypes;
@@ -24,8 +25,11 @@ import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.osgi.util.NLS;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.uml.modelrepair.internal.participants.StereotypeApplicationRepairParticipant;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
import com.google.common.base.Supplier;
import com.google.common.base.Suppliers;
@@ -84,7 +88,7 @@ public class ApplyProfileAction extends AbstractRepairAction {
// Apply the profile
StereotypeApplicationRepairParticipant.createStereotypeApplicationMigrator(profile, diagnostics).migrate(stereotypeApplications, sub.newChild(stereotypeApplications.size()));
for (Package next : packages) {
- next.applyProfile(profile);
+ applyProfile(next, profile);
}
result = true;
@@ -94,4 +98,23 @@ public class ApplyProfileAction extends AbstractRepairAction {
return result;
}
+
+ protected ProfileApplication applyProfile(Package package_, Profile profile) {
+ ProfileApplication result;
+
+ IProfileApplicationDelegate delegate = ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(package_);
+
+ // Is this a re-application?
+ ProfileApplication existing = delegate.getProfileApplication(package_, profile);
+ if (existing != null) {
+ delegate = ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(existing);
+ delegate.reapplyProfile(package_, profile);
+ result = existing;
+ } else {
+ package_.applyProfile(profile);
+ result = delegate.getProfileApplication(package_, profile);
+ }
+
+ return result;
+ }
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ZombieStereotypesDescriptor.java b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ZombieStereotypesDescriptor.java
index 73199c701f3..6c30a71318c 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ZombieStereotypesDescriptor.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.modelrepair/src/org/eclipse/papyrus/uml/modelrepair/internal/stereotypes/ZombieStereotypesDescriptor.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.uml.modelrepair.internal.stereotypes;
@@ -22,6 +23,7 @@ import java.util.regex.Pattern;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.emf.common.util.DiagnosticChain;
+import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
@@ -35,6 +37,8 @@ import org.eclipse.emf.ecore.util.FeatureMap;
import org.eclipse.emf.ecore.util.FeatureMapUtil;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
import org.eclipse.papyrus.uml.modelrepair.internal.participants.StereotypesUtil;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.Package;
@@ -286,11 +290,12 @@ public class ZombieStereotypesDescriptor {
} else {
// Find the profile application
result = null;
- for (Package pkg = base.getNearestPackage(); pkg != null; pkg = (pkg.getOwner() == null) ? null : pkg.getOwner().getNearestPackage()) {
- for (ProfileApplication next : pkg.getProfileApplications()) {
+ out: for (Package pkg = base.getNearestPackage(); pkg != null; pkg = (pkg.getOwner() == null) ? null : pkg.getOwner().getNearestPackage()) {
+ IProfileApplicationDelegate delegate = ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(pkg);
+ for (ProfileApplication next : delegate.getProfileApplications(pkg)) {
if (equal(next.getAppliedDefinition(), schema, root)) {
result = new ProfileContext(schema, next);
- break;
+ break out;
}
}
}
@@ -318,9 +323,23 @@ public class ZombieStereotypesDescriptor {
}
} else if (FeatureMapUtil.isFeatureMap(next)) {
// Handle unknown schema
- for (FeatureMap.Entry entry : (FeatureMap) stereotypeApplication.eGet(next)) {
- if (entry.getEStructuralFeature().getName().startsWith(Extension.METACLASS_ROLE_PREFIX)) {
- Object value = entry.getValue();
+ FeatureMap.Internal fmap = (FeatureMap.Internal) stereotypeApplication.eGet(next);
+ int entryIndex = -1;
+ for (FeatureMap.Entry entry : fmap) {
+ entryIndex++;
+ EStructuralFeature feature = entry.getEStructuralFeature();
+ if (feature.getName().startsWith(Extension.METACLASS_ROLE_PREFIX)) {
+ // In case it's a reference, ensure that we try to resolve it
+ Object value = fmap.get(feature, true);
+ if (value instanceof EList<?>) {
+ // As a member of the 'mixed' feature-map, it is assumed to have multiplicity
+ value = ((EList<?>) value).get(0);
+
+ // The feature-map list doesn't resolve proxies despite that we asked for resolving
+ if (feature instanceof EReference) {
+ value = fmap.resolveProxy(feature, entryIndex, 0, value);
+ }
+ }
if (value instanceof String) {
// Try it as an IDREF
@@ -358,11 +377,26 @@ public class ZombieStereotypesDescriptor {
result = schema1 == schema2;
if (!result && (schema1 != null)) { // Implies that schema2 != null, also
result = Objects.equal(schema1.getNsURI(), schema2.getNsURI());
+
if (!result) {
// Maybe one is a proxy whose URI is the schema-location of the other (being a demand-created package)
URI uri1 = guessURI(schema1);
URI uri2 = guessURI(schema2);
result = Objects.equal(uri1, uri2);
+
+ if (!result) {
+ // One more try: If both URIs match the auto-generated dynamic Ecore definition pattern, then we
+ // can try to normalize and compare them
+ Matcher m = AUTO_NSURI_PATTERN.matcher(uri1.toString());
+ if (m.matches()) {
+ String normalized1 = uri1.toString().substring(0, m.start(1));
+ m.reset(uri2.toString());
+ if (m.matches()) {
+ String normalized2 = uri2.toString().substring(0, m.start(1));
+ result = normalized1.equals(normalized2);
+ }
+ }
+ }
}
}
@@ -412,9 +446,7 @@ public class ZombieStereotypesDescriptor {
}
ProfileContext(EPackage schema, ProfileApplication profileApplication) {
- this.applyingPackage = profileApplication.getApplyingPackage();
- this.schema = schema;
- init();
+ this(profileApplication.getApplyingPackage(), schema);
}
private void init() {
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF
index e236cd836eb..5d05a683864 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/META-INF/MANIFEST.MF
@@ -4,6 +4,7 @@ Export-Package: org.eclipse.papyrus.uml.profile,
org.eclipse.papyrus.uml.profile.definition,
org.eclipse.papyrus.uml.profile.preference,
org.eclipse.papyrus.uml.profile.providers,
+ org.eclipse.papyrus.uml.profile.service,
org.eclipse.papyrus.uml.profile.structure,
org.eclipse.papyrus.uml.profile.tree,
org.eclipse.papyrus.uml.profile.tree.objects,
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileApplicationContentProvider.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileApplicationContentProvider.java
index 06ae1a7d489..213cdb282fc 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileApplicationContentProvider.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/providers/ProfileApplicationContentProvider.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,8 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.profile.providers;
@@ -17,9 +19,10 @@ import java.util.List;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.papyrus.infra.widgets.providers.AbstractStaticContentProvider;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.papyrus.uml.tools.utils.ProfileUtil;
import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.ProfileApplication;
@@ -41,6 +44,8 @@ public class ProfileApplicationContentProvider extends AbstractStaticContentProv
* the root package
*/
public ProfileApplicationContentProvider(Package rootPackage) {
+ super();
+
this.rootPackage = rootPackage;
}
@@ -73,10 +78,9 @@ public class ProfileApplicationContentProvider extends AbstractStaticContentProv
// Parse applied profiles of parent to find dirty ones and get profile application
- List<Profile> appliedProfiles = new LinkedList<Profile>(parentPackage.getAppliedProfiles());
- for (Profile profile : appliedProfiles) {
- if (ProfileUtil.isDirty(parentPackage, profile)) {
- childrenList.add(parentPackage.getProfileApplication(profile));
+ for (ProfileApplication profileApplication : getDelegate(parentPackage).getProfileApplications(parentPackage)) {
+ if ((profileApplication != null) && ProfileUtil.isDirty(parentPackage, profileApplication.getAppliedProfile())) {
+ childrenList.add(profileApplication);
}
}
@@ -89,10 +93,13 @@ public class ProfileApplicationContentProvider extends AbstractStaticContentProv
children = new Object[0];
}
-
return children;
}
+ protected IProfileApplicationDelegate getDelegate(Package package_) {
+ return ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(package_);
+ }
+
/**
* @see org.eclipse.jface.viewers.ITreeContentProvider#getParent(java.lang.Object)
*
@@ -121,5 +128,4 @@ public class ProfileApplicationContentProvider extends AbstractStaticContentProv
return getChildren(element).length > 0;
}
-
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java
index 69bd34952b0..a5be822ad2f 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ReapplyProfilesService.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST and others.
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,6 +10,8 @@
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 434302
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 435995
+ * Christian W. Damus - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.profile.service;
@@ -19,8 +21,8 @@ import java.util.Map;
import org.eclipse.emf.common.command.CompoundCommand;
import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.transaction.util.TransactionUtil;
import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
@@ -29,17 +31,19 @@ import org.eclipse.papyrus.infra.core.services.EditorLifecycleManager;
import org.eclipse.papyrus.infra.core.services.IService;
import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.uml.modelrepair.service.IStereotypeRepairService;
import org.eclipse.papyrus.uml.profile.Activator;
import org.eclipse.papyrus.uml.profile.service.ui.RefreshProfileDialog;
import org.eclipse.papyrus.uml.profile.validation.ProfileValidationHelper;
import org.eclipse.papyrus.uml.tools.commands.ApplyProfileCommand;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.papyrus.uml.tools.utils.ProfileUtil;
import org.eclipse.swt.widgets.Display;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
/**
* If a local profile is applied on this model, and this profile has been
@@ -58,6 +62,8 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
private IStereotypeRepairService stereotypeRepairService;
+ private IMultiDiagramEditor editor;
+
/**
* {@inheritDoc}
*/
@@ -83,6 +89,27 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
}
}
+ public void checkProfiles() {
+ if (editor != null) {
+ checkProfilesAfterRepair(editor);
+ }
+ }
+
+ private void checkProfilesAfterRepair(final IMultiDiagramEditor editor) {
+ if (stereotypeRepairService == null) {
+ // Just check profiles, now
+ checkProfiles(editor);
+ } else {
+ // Ensure that we only kick in the profile migration after any pending repair has completed
+ stereotypeRepairService.getPostRepairExecutor().execute(new Runnable() {
+
+ public void run() {
+ checkProfiles(editor);
+ }
+ });
+ }
+ }
+
protected void checkProfiles(IMultiDiagramEditor editor) {
ModelSet modelSet;
try {
@@ -124,8 +151,9 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
return false;
}
- for (Profile profile : currentPackage.getAppliedProfiles()) {
- if (ProfileUtil.isDirty(currentPackage, profile)) {
+ IProfileApplicationDelegate delegate = ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(currentPackage);
+ for (ProfileApplication profileApplication : delegate.getProfileApplications(currentPackage)) {
+ if (ProfileUtil.isDirty(currentPackage, delegate.getAppliedProfile(profileApplication))) {
RefreshProfileDialog dialog = new RefreshProfileDialog(editor.getSite().getShell(), this.rootPackage);
dialog.setCallback(getCallback(dialog));
dialog.open();
@@ -147,9 +175,9 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
public void run() {
Map<Package, Collection<Profile>> profilesToReapply = dialog.getProfilesToReapply();
- EditingDomain domain = EMFHelper.resolveEditingDomain(rootPackage);
+ TransactionalEditingDomain domain = TransactionUtil.getEditingDomain(rootPackage);
- if (domain instanceof TransactionalEditingDomain) {
+ if (domain != null) {
// Create a flat list of profiles, for validation
Collection<Profile> allProfiles = new LinkedList<Profile>();
@@ -161,7 +189,7 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
if (ProfileValidationHelper.checkApplicableProfiles(Display.getCurrent().getActiveShell(), allProfiles)) {
CompoundCommand command = new CompoundCommand();
for (Map.Entry<Package, Collection<Profile>> profiles : profilesToReapply.entrySet()) {
- command.append(new ApplyProfileCommand(profiles.getKey(), profiles.getValue(), (TransactionalEditingDomain) domain));
+ command.append(new ApplyProfileCommand(profiles.getKey(), profiles.getValue(), domain));
}
domain.getCommandStack().execute(command);
@@ -176,36 +204,27 @@ public class ReapplyProfilesService implements IService, EditorLifecycleEventLis
};
}
- /**
- * {@inheritDoc}
- */
public void disposeService() throws ServiceException {
this.rootPackage = null;
this.stereotypeRepairService = null;
this.servicesRegistry = null;
+ this.editor = null;
}
public void postInit(IMultiDiagramEditor editor) {
- // Nothing
+ if (this.editor == null) {
+ this.editor = editor;
+ }
}
- public void postDisplay(final IMultiDiagramEditor editor) {
- if (stereotypeRepairService == null) {
- // Just check profiles, now
- checkProfiles(editor);
- } else {
- // Ensure that we only kick in the profile migration after any pending repair has completed
- stereotypeRepairService.getPostRepairExecutor().execute(new Runnable() {
-
- public void run() {
- checkProfiles(editor);
- }
- });
- }
+ public void postDisplay(IMultiDiagramEditor editor) {
+ checkProfilesAfterRepair(editor);
}
public void beforeClose(IMultiDiagramEditor editor) {
- // Nothing
+ if (editor == this.editor) {
+ this.editor = null;
+ }
}
}
diff --git a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ui/RefreshProfileDialog.java b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ui/RefreshProfileDialog.java
index dd864d8b2ab..89a82e0637e 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ui/RefreshProfileDialog.java
+++ b/plugins/uml/org.eclipse.papyrus.uml.profile/src/org/eclipse/papyrus/uml/profile/service/ui/RefreshProfileDialog.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,8 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.profile.service.ui;
@@ -22,6 +24,8 @@ import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.papyrus.uml.profile.providers.ProfileApplicationContentProvider;
import org.eclipse.papyrus.uml.profile.providers.ProfileApplicationLabelProvider;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.TreeEditor;
import org.eclipse.swt.events.SelectionEvent;
@@ -119,7 +123,7 @@ public class RefreshProfileDialog extends SelectionDialog {
Object currentDataItem = treeItem.getData();
if (currentDataItem instanceof ProfileApplication) {
- final ProfileApplication profileApplication = (ProfileApplication) currentDataItem;
+ ProfileApplication profileApplication = (ProfileApplication) currentDataItem;
Tree tree = treeItem.getParent();
@@ -127,15 +131,18 @@ public class RefreshProfileDialog extends SelectionDialog {
checkbox.setSelection(true);
- getProfilesToReapply((Package) profileApplication.getOwner()).add(profileApplication.getAppliedProfile());
+ IProfileApplicationDelegate delegate = getDelegate(profileApplication);
+ final Package applyingPackage = delegate.getApplyingPackage(profileApplication);
+ final Profile appliedProfile = delegate.getAppliedProfile(profileApplication);
+ getProfilesToReapply(applyingPackage).add(appliedProfile);
checkbox.addSelectionListener(new SelectionListener() {
public void widgetSelected(SelectionEvent e) {
if (checkbox.getSelection()) {
- getProfilesToReapply((Package) profileApplication.getOwner()).add(profileApplication.getAppliedProfile());
+ getProfilesToReapply(applyingPackage).add(appliedProfile);
} else {
- getProfilesToReapply((Package) profileApplication.getOwner()).remove(profileApplication.getAppliedProfile());
+ getProfilesToReapply(applyingPackage).remove(appliedProfile);
}
}
@@ -158,6 +165,10 @@ public class RefreshProfileDialog extends SelectionDialog {
}
}
+ protected IProfileApplicationDelegate getDelegate(ProfileApplication profileApplication) {
+ return ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(profileApplication);
+ }
+
@Override
protected Composite getDialogArea() {
return (Composite) super.getDialogArea();
@@ -183,5 +194,4 @@ public class RefreshProfileDialog extends SelectionDialog {
public Map<Package, Collection<Profile>> getProfilesToReapply() {
return profilesToReapply;
}
-
}
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationEditor.java
index 84c0e7f3cbe..97470770b1c 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationEditor.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2013 CEA LIST.
+ * Copyright (c) 2011, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - Refactoring package/profile import/apply UI for CDO
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.properties.widgets;
@@ -24,13 +25,16 @@ import java.util.Map;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.jface.viewers.ColumnLabelProvider;
import org.eclipse.jface.viewers.ColumnWeightData;
+import org.eclipse.jface.viewers.DelegatingStyledCellLabelProvider.IStyledLabelProvider;
+import org.eclipse.jface.viewers.IBaseLabelProvider;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.SelectionChangedEvent;
+import org.eclipse.jface.viewers.StyledCellLabelProvider;
+import org.eclipse.jface.viewers.StyledString;
import org.eclipse.jface.viewers.TableLayout;
import org.eclipse.jface.viewers.ViewerCell;
import org.eclipse.jface.window.Window;
@@ -49,6 +53,7 @@ import org.eclipse.papyrus.uml.tools.profile.definition.Version;
import org.eclipse.papyrus.uml.tools.utils.ProfileUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionEvent;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
@@ -117,16 +122,26 @@ public class ProfileApplicationEditor extends MultipleReferenceEditor {
}
@Override
- public void setLabelProvider(ILabelProvider labelProvider) {
- super.setLabelProvider(new ProfileColumnsLabelProvider(labelProvider));
+ public void setLabelProvider(IBaseLabelProvider labelProvider) {
+ super.setLabelProvider(createProfileColumnsLabelProvider(labelProvider));
}
- protected class ProfileColumnsLabelProvider extends ColumnLabelProvider {
+ protected ProfileColumnsLabelProvider createProfileColumnsLabelProvider(IBaseLabelProvider labelProvider) {
+ return new ProfileColumnsLabelProvider(labelProvider);
+ }
+
+ protected class ProfileColumnsLabelProvider extends StyledCellLabelProvider {
private ILabelProvider defaultLabelProvider;
+ private IStyledLabelProvider styledLabelProvider;
- public ProfileColumnsLabelProvider(ILabelProvider defaultLabelProvider) {
- this.defaultLabelProvider = defaultLabelProvider;
+ public ProfileColumnsLabelProvider(IBaseLabelProvider defaultLabelProvider) {
+ if (defaultLabelProvider instanceof ILabelProvider) {
+ this.defaultLabelProvider = (ILabelProvider) defaultLabelProvider;
+ }
+ if (defaultLabelProvider instanceof IStyledLabelProvider) {
+ this.styledLabelProvider = (IStyledLabelProvider) defaultLabelProvider;
+ }
}
@Override
@@ -158,8 +173,11 @@ public class ProfileApplicationEditor extends MultipleReferenceEditor {
}
public void updateName(ViewerCell cell) {
- cell.setImage(defaultLabelProvider.getImage(cell.getElement()));
- cell.setText(defaultLabelProvider.getText(cell.getElement()));
+ cell.setImage(getImage(cell.getElement()));
+
+ StyledString styledText = getStyledText(cell.getElement());
+ cell.setText(styledText.getString());
+ cell.setStyleRanges(styledText.getStyleRanges());
}
public void updateLocation(ViewerCell cell, Profile profile) {
@@ -185,15 +203,28 @@ public class ProfileApplicationEditor extends MultipleReferenceEditor {
cell.setText(versionText);
}
+
+ public Image getImage(Object element) {
+ return (defaultLabelProvider != null) ? defaultLabelProvider.getImage(element) : null;
+ }
+
+ public StyledString getStyledText(Object element) {
+ return (styledLabelProvider != null) ? styledLabelProvider.getStyledText(element) : new StyledString((defaultLabelProvider != null) ? defaultLabelProvider.getText(element) : ""); //$NON-NLS-1$
+ }
}
@Override
protected void createListControls() {
super.createListControls();
+
up.dispose();
+ up = null;
+
down.dispose();
+ down = null;
+
edit.dispose();
- up = down = edit = null;
+ edit = null;
add.setToolTipText(Messages.ProfileApplicationEditor_ApplyProfile);
addRegisteredProfile = createButton(Activator.getDefault().getImage("/icons/AddReg.gif"), Messages.ProfileApplicationEditor_ApplyRegisteredProfile); //$NON-NLS-1$
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationPropertyEditor.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationPropertyEditor.java
index 19de5a47301..879580fbb9b 100644
--- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationPropertyEditor.java
+++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/widgets/ProfileApplicationPropertyEditor.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,8 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.properties.widgets;
@@ -37,10 +39,14 @@ public class ProfileApplicationPropertyEditor extends AbstractPropertyEditor {
* @param style
*/
public ProfileApplicationPropertyEditor(Composite parent, int style) {
- editor = new ProfileApplicationEditor(parent, style);
+ editor = createProfileApplicationEditor(parent, style);
super.setEditor(editor);
}
+ protected ProfileApplicationEditor createProfileApplicationEditor(Composite parent, int style) {
+ return new ProfileApplicationEditor(parent, style);
+ }
+
@Override
public void doBinding() {
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CustomUMLUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CustomUMLUtil.java
index f60baf1a1a8..5c7684aa8bb 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CustomUMLUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/CustomUMLUtil.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
*
*
* All rights reserved. This program and the accompanying materials
@@ -9,10 +9,13 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.utils;
+import java.util.Collection;
+
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.EStructuralFeature;
@@ -23,6 +26,8 @@ import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Extension;
import org.eclipse.uml2.uml.util.UMLUtil;
+import com.google.common.collect.ImmutableList;
+
/**
* Provides methods for stereotypes application outside of a resource
*
@@ -31,6 +36,15 @@ import org.eclipse.uml2.uml.util.UMLUtil;
*/
public class CustomUMLUtil extends UMLUtil {
+ public static void destroy(EObject eObject) {
+ UML2Util.destroy(eObject);
+ }
+
+ public static void destroyAll(Collection<? extends EObject> eObjects) {
+ // Iterate a copy of the list to avoid concurrent modification
+ UML2Util.destroyAll(ImmutableList.copyOf(eObjects));
+ }
+
/**
* The StereotypeApplicationHelper can be overridden to change the default
* location of applied stereotypes.
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ProfileUtil.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ProfileUtil.java
index 9c4502715e5..dbc33ae288a 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ProfileUtil.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils/src/org/eclipse/papyrus/uml/tools/utils/ProfileUtil.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012, 2013 CEA LIST.
+ * Copyright (c) 2012, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - Handle dynamic profile applications in CDO
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.utils;
@@ -30,8 +31,11 @@ import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.uml2.common.util.UML2Util;
import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.NamedElement;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
import org.eclipse.uml2.uml.Property;
import org.eclipse.uml2.uml.Stereotype;
import org.eclipse.uml2.uml.UMLPackage;
@@ -42,7 +46,7 @@ import org.eclipse.uml2.uml.UMLPackage;
* @author Camille Letavernier
*
*/
-public class ProfileUtil {
+public class ProfileUtil extends org.eclipse.uml2.uml.util.UMLUtil {
/**
@@ -73,9 +77,9 @@ public class ProfileUtil {
// ckeck applied profile application definition vs profile definition referenced in file
Profile profileInFile = (Profile) (modelResource.getContents().get(0));
-
- if (_package.getProfileApplication(_profile) != null) {
- EPackage appliedProfileDefinition = _package.getProfileApplication(_profile).getAppliedDefinition();
+ ProfileApplication profileApplication = _package.getProfileApplication(_profile, true);
+ if (profileApplication != null) {
+ EPackage appliedProfileDefinition = profileApplication.getAppliedDefinition();
EPackage fileProfileDefinition = null;
// Check profiles qualified names to ensure the correct profiles are compared
@@ -231,4 +235,53 @@ public class ProfileUtil {
return null;
}
+
+ /**
+ * Finds the profile application, if any, in the context of an {@code element} that supplies the given
+ * stereotype Ecore definition.
+ *
+ * @param element
+ * a model element
+ * @param stereotypeDefinition
+ * the Ecore definition of a stereotype
+ *
+ * @return the providing profile application, or {@code null} if none can be determined
+ */
+ public static ProfileApplication getProfileApplication(Element element, EClass stereotypeDefinition) {
+ ProfileApplication result = null;
+
+ NamedElement umlDefinition = getNamedElement(stereotypeDefinition, element);
+ if (umlDefinition != null) {
+ Profile profile = getContainingProfile(umlDefinition);
+ if (profile != null) {
+ result = getApplicationOf(profile, element);
+ }
+ }
+
+ return result;
+ }
+
+ static Profile getContainingProfile(NamedElement umlDefinition) {
+ Profile result = null;
+
+ for (Package package_ = umlDefinition.getNearestPackage(); package_ != null; package_ = package_.getNestingPackage()) {
+ if (package_ instanceof Profile) {
+ result = (Profile) package_;
+ break;
+ }
+ }
+
+ return result;
+ }
+
+ static ProfileApplication getApplicationOf(Profile profile, Element context) {
+ ProfileApplication result = null;
+
+ Package package_ = context.getNearestPackage();
+ if (package_ != null) {
+ result = package_.getProfileApplication(profile, true);
+ }
+
+ return result;
+ }
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml
index 39f408d93b2..9bc98abc8ae 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml
@@ -2,6 +2,7 @@
<?eclipse version="3.4"?>
<plugin>
<extension-point id="importSources" name="Package Import Sources" schema="/schema/importSources.exsd"/>
+ <extension-point id="profileApplicationDelegates" name="Profile Application Delegates" schema="schema/profileApplicationDelegates.exsd"/>
<!-- Register the UML delegating constraint provider -->
<extension
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/schema/profileApplicationDelegates.exsd b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/schema/profileApplicationDelegates.exsd
new file mode 100644
index 00000000000..240e80d3505
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/schema/profileApplicationDelegates.exsd
@@ -0,0 +1,125 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<!-- Schema file written by PDE -->
+<schema targetNamespace="org.eclipse.papyrus.uml.tools" xmlns="http://www.w3.org/2001/XMLSchema">
+<annotation>
+ <appinfo>
+ <meta.schema plugin="org.eclipse.papyrus.uml.tools" id="profileApplicationDelegates" name="Profile Application Delegates"/>
+ </appinfo>
+ <documentation>
+ Pluggable providers of Papyrus markers for EMF resources.
+ </documentation>
+ </annotation>
+
+ <element name="extension">
+ <annotation>
+ <appinfo>
+ <meta.element />
+ </appinfo>
+ <documentation>
+ Registry of profile-application delegates.
+ </documentation>
+ </annotation>
+ <complexType>
+ <sequence minOccurs="0" maxOccurs="unbounded">
+ <element ref="delegate"/>
+ </sequence>
+ <attribute name="point" type="string" use="required">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="id" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ </annotation>
+ </attribute>
+ <attribute name="name" type="string">
+ <annotation>
+ <documentation>
+
+ </documentation>
+ <appinfo>
+ <meta.attribute translatable="true"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <element name="delegate">
+ <annotation>
+ <documentation>
+ The optional enablement expression is evaluated on a profile application to determine whether the delegate applies to it.
+
+The expression context defines two variables: &lt;tt&gt;selection&lt;/tt&gt; (the default variable) provides the profile application and &lt;tt&gt;resource&lt;/tt&gt; provides the EMF resource that contains it.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="class" type="string" use="required">
+ <annotation>
+ <documentation>
+ The class implementing the profile-application delegate protocol.
+ </documentation>
+ <appinfo>
+ <meta.attribute kind="java" basedOn=":org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate"/>
+ </appinfo>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="since"/>
+ </appinfo>
+ <documentation>
+ Papyrus 1.1.0.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="examples"/>
+ </appinfo>
+ <documentation>
+ [Enter documentation]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="apiinfo"/>
+ </appinfo>
+ <documentation>
+ [Enter API information here.]
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="implementation"/>
+ </appinfo>
+ <documentation>
+ The &lt;tt&gt;org.eclipse.papyrus.uml.decoratormodel.internal.providers.ExternalizedProfileApplicationDelegate&lt;/tt&gt; class implements the delegate for externally applied profile applications.
+ </documentation>
+ </annotation>
+
+ <annotation>
+ <appinfo>
+ <meta.section type="copyright"/>
+ </appinfo>
+ <documentation>
+ Copyright (c) 2014 Christian W. Damus and others.
+
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </documentation>
+ </annotation>
+
+</schema>
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java
index 3eda2012dcd..cdeb557d6df 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/commands/ApplyProfileCommand.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,8 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.commands;
@@ -19,7 +21,10 @@ import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.emf.ecore.util.EcoreUtil;
import org.eclipse.emf.transaction.RecordingCommand;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.papyrus.uml.tools.profile.definition.IPapyrusVersionConstants;
+import org.eclipse.papyrus.uml.tools.utils.CustomUMLUtil;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
import org.eclipse.uml2.uml.ProfileApplication;
@@ -108,27 +113,56 @@ public class ApplyProfileCommand extends RecordingCommand {
this(umlPackage, Collections.singletonList(profile), editingDomain, saveProfileApplicationVersion);
}
- /**
- * @see org.eclipse.emf.transaction.RecordingCommand#doExecute()
- *
- */
+ protected final Package getPackage() {
+ return umlPackage;
+ }
+
+ protected final Collection<Profile> getProfiles() {
+ return profiles;
+ }
+
@Override
protected void doExecute() {
- for (Profile profile : profiles) {
- // Apply profile
- umlPackage.applyProfile(profile);
+ Package umlPackage = getPackage();
+ for (Profile profile : getProfiles()) {
+ ProfileApplication profileApplication = applyProfile(umlPackage, profile);
// Save version of applied profile if necessary
if (saveProfileApplicationVersion) {
- ProfileApplication profileApplication = umlPackage.getProfileApplication(profile);
-
// Get version annotation in case it is a Papyrus profile
EAnnotation versionAnnotation = profile.getDefinition().getEAnnotation(IPapyrusVersionConstants.PAPYRUS_EANNOTATION_SOURCE);
if (versionAnnotation != null) {
- profileApplication.getEAnnotations().add(0, EcoreUtil.copy(versionAnnotation));
+ EAnnotation existing = profileApplication.getEAnnotation(IPapyrusVersionConstants.PAPYRUS_EANNOTATION_SOURCE);
+ int index = 0;
+
+ if (existing != null) {
+ // Replace this; don't just add to the existing ones
+ index = profileApplication.getEAnnotations().indexOf(existing);
+ CustomUMLUtil.destroy(existing);
+ }
+
+ profileApplication.getEAnnotations().add(index, EcoreUtil.copy(versionAnnotation));
}
}
}
}
+ protected ProfileApplication applyProfile(Package package_, Profile profile) {
+ ProfileApplication result;
+
+ IProfileApplicationDelegate delegate = ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(package_);
+
+ // Is this a re-application?
+ ProfileApplication existing = delegate.getProfileApplication(package_, profile);
+ if (existing != null) {
+ delegate = ProfileApplicationDelegateRegistry.INSTANCE.getDelegate(existing);
+ delegate.reapplyProfile(package_, profile);
+ result = existing;
+ } else {
+ package_.applyProfile(profile);
+ result = delegate.getProfileApplication(package_, profile);
+ }
+
+ return result;
+ }
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProfileApplicationObservableList.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProfileApplicationObservableList.java
index 649ad39bd21..ce6deff945c 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProfileApplicationObservableList.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/databinding/ProfileApplicationObservableList.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2014 CEA LIST and others.
+ * Copyright (c) 2011, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,10 +9,12 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - 402525
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.uml.tools.databinding;
+import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
@@ -31,8 +33,10 @@ import org.eclipse.papyrus.infra.widgets.editors.AbstractEditor;
import org.eclipse.papyrus.infra.widgets.editors.ICommitListener;
import org.eclipse.papyrus.uml.tools.commands.ApplyProfileCommand;
import org.eclipse.papyrus.uml.tools.commands.UnapplyProfileCommand;
+import org.eclipse.papyrus.uml.tools.helper.ProfileApplicationDelegateRegistry;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
/**
*
@@ -52,8 +56,7 @@ public class ProfileApplicationObservableList extends WritableList implements IC
private AbstractStereotypeListener listener;
/**
- *
- * Constructor.
+ * Initializes me with the default applied profiles provider.
*
* @param umlSource
* The Package on which the profiles are applied or unapplied
@@ -61,9 +64,11 @@ public class ProfileApplicationObservableList extends WritableList implements IC
* The editing domain on which the commands are executed
*/
public ProfileApplicationObservableList(Package umlSource, EditingDomain domain) {
- super(new LinkedList<Object>(umlSource.getAppliedProfiles()), Profile.class);
+ super(getAppliedProfiles(umlSource), Profile.class);
+
this.umlSource = umlSource;
this.domain = domain;
+
commands = new LinkedList<Command>();
listener = new AbstractStereotypeListener(umlSource) {
@@ -194,12 +199,26 @@ public class ProfileApplicationObservableList extends WritableList implements IC
commands.clear();
}
- private void refreshCacheList() {
+ protected final void refreshCacheList() {
wrappedList.clear();
- wrappedList.addAll(umlSource.getAppliedProfiles());
+ wrappedList.addAll(getAppliedProfiles(umlSource));
fireListChange(null);
}
+ static Collection<Profile> getAppliedProfiles(Package package_) {
+ final ProfileApplicationDelegateRegistry reg = ProfileApplicationDelegateRegistry.INSTANCE;
+
+ List<Profile> result = new ArrayList<Profile>();
+ for (ProfileApplication next : reg.getDelegate(package_).getProfileApplications(package_)) {
+ Profile profile = reg.getDelegate(next).getAppliedProfile(next);
+ if (profile != null) {
+ result.add(profile);
+ }
+ }
+
+ return result;
+ }
+
/**
* {@inheritDoc}
*/
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/IProfileApplicationDelegate.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/IProfileApplicationDelegate.java
new file mode 100644
index 00000000000..07a983b0c27
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/IProfileApplicationDelegate.java
@@ -0,0 +1,135 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.tools.helper;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * Protocol for a delegate that assists any UI elements dealing with profile applications in the manipulation of those profile applications.
+ * Many UI components may just want to use the {@linkplain Default default implementation}.
+ *
+ * @see Default
+ */
+public interface IProfileApplicationDelegate {
+ /**
+ * Queries whether I am applicable to (support introspection/manipulation of) profile applications of the given package.
+ *
+ * @param package_
+ * a package
+ * @return whether I am the delegate that should be used to introspect/manipulate profile applications of the given package
+ */
+ boolean appliesTo(Package package_);
+
+ /**
+ * Queries the profile applications of a package to manage in the UI.
+ *
+ * @param package_
+ * a package presented in the UI
+ * @return its profile applications
+ */
+ Iterable<ProfileApplication> getProfileApplications(Package package_);
+
+ /**
+ * Queries the existing application, if any, of the given {@code profile} directly to a package (not an inherited profile application).
+ *
+ * @param package_
+ * a package
+ * @param profile
+ * a profile that may or may not be directly applied
+ *
+ * @return the application of the {@code profile} specifically to the given package, or {@code null} if either the package does not have the profile applied or the profile application is inherited
+ */
+ ProfileApplication getProfileApplication(Package package_, Profile profile);
+
+ /**
+ * Queries whether I am applicable to (support introspection/manipulation of) a given profile application.
+ *
+ * @param profileApplication
+ * a profile application
+ * @return whether I am the delegate that should be used to introspect/manipulate the profile application
+ */
+ boolean appliesTo(ProfileApplication profileApplication);
+
+ /**
+ * Queries the package that applies a profile via the specific application.
+ *
+ * @param profileApplication
+ * a profile application
+ * @return that package to which it applies a profile
+ */
+ Package getApplyingPackage(ProfileApplication profileApplication);
+
+ /**
+ * Queries the profile applied by the specified application.
+ *
+ * @param profileApplication
+ * a profile application
+ * @return the profile that it applies
+ */
+ Profile getAppliedProfile(ProfileApplication profileApplication);
+
+ /**
+ * Re-applies the specified {@code profile} to a package.
+ *
+ * @param package_
+ * the package to which to re-apply the {@code profile}. The profile must already be applied
+ * @param profile
+ * the profile to re-apply
+ *
+ * @return any new stereotype applications created as a consequence of required metaclass extensions
+ */
+ EList<EObject> reapplyProfile(Package package_, Profile profile);
+
+ //
+ // Nested types
+ //
+
+ /**
+ * A simple implementation of the profile-application delegate protocol that just provides the UML standard
+ * properties of a profile application.
+ */
+ class Default implements IProfileApplicationDelegate {
+ public boolean appliesTo(Package package_) {
+ return true;
+ }
+
+ public Iterable<ProfileApplication> getProfileApplications(Package package_) {
+ return package_.getProfileApplications();
+ }
+
+ public ProfileApplication getProfileApplication(Package package_, Profile profile) {
+ return package_.getProfileApplication(profile);
+ }
+
+ public boolean appliesTo(ProfileApplication profileApplication) {
+ return true;
+ }
+
+ public Package getApplyingPackage(ProfileApplication profileApplication) {
+ return profileApplication.getApplyingPackage();
+ }
+
+ public Profile getAppliedProfile(ProfileApplication profileApplication) {
+ return profileApplication.getAppliedProfile();
+ }
+
+ public EList<EObject> reapplyProfile(Package package_, Profile profile) {
+ return package_.applyProfile(profile);
+ }
+ }
+}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/ProfileApplicationDelegateRegistry.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/ProfileApplicationDelegateRegistry.java
new file mode 100644
index 00000000000..7603d8cf68d
--- /dev/null
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/helper/ProfileApplicationDelegateRegistry.java
@@ -0,0 +1,245 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.tools.helper;
+
+import java.util.Iterator;
+import java.util.List;
+import java.util.ListIterator;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.plugin.RegistryReader;
+import org.eclipse.papyrus.uml.tools.Activator;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+
+/**
+ * A registry of {@link IProfileApplicationDelegate} plugged in on my extension point.
+ */
+public class ProfileApplicationDelegateRegistry {
+
+ private static final String EXT_POINT = "profileApplicationDelegates"; //$NON-NLS-1$
+
+ private static final IProfileApplicationDelegate NULL_DELEGATE = new IProfileApplicationDelegate.Default() {
+ @Override
+ public boolean appliesTo(ProfileApplication profileApplication) {
+ return false;
+ }
+ };
+
+ public static final ProfileApplicationDelegateRegistry INSTANCE = new ProfileApplicationDelegateRegistry();
+
+ private final List<IProfileApplicationDelegate> delegates = new java.util.ArrayList<IProfileApplicationDelegate>(2);
+
+ private boolean needPrune;
+
+ private ProfileApplicationDelegateRegistry() {
+ super();
+
+ new MyRegistryReader().readRegistry();
+
+ // And the default delegate to backstop the plug-ins
+ delegates.add(new IProfileApplicationDelegate.Default());
+ }
+
+ /**
+ * Prune out any null providers (failed to initialize) and replace
+ * descriptors that have been instantiated by their instances, to avoid
+ * delegation.
+ */
+ private void prune() {
+ if (needPrune) {
+ needPrune = false;
+ for (ListIterator<IProfileApplicationDelegate> iter = delegates.listIterator(); iter.hasNext();) {
+
+ IProfileApplicationDelegate next = iter.next();
+ if (next == NULL_DELEGATE) {
+ iter.remove();
+ } else if (next instanceof MyRegistryReader.Descriptor) {
+ MyRegistryReader.Descriptor desc = (MyRegistryReader.Descriptor) next;
+ if (desc.instance != null) {
+ iter.set(desc.instance);
+ }
+ }
+ }
+ }
+ }
+
+ public IProfileApplicationDelegate getDelegate(Package package_) {
+ IProfileApplicationDelegate result = NULL_DELEGATE;
+
+ synchronized (delegates) {
+ prune();
+
+ for (IProfileApplicationDelegate next : delegates) {
+ if (next.appliesTo(package_)) {
+ result = next;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ public IProfileApplicationDelegate getDelegate(ProfileApplication profileApplication) {
+ IProfileApplicationDelegate result = NULL_DELEGATE;
+
+ synchronized (delegates) {
+ prune();
+
+ for (IProfileApplicationDelegate next : delegates) {
+ if (next.appliesTo(profileApplication)) {
+ result = next;
+ break;
+ }
+ }
+ }
+
+ return result;
+ }
+
+ private void removeProvider(String className) {
+ synchronized (delegates) {
+ for (Iterator<IProfileApplicationDelegate> iter = delegates.iterator(); iter.hasNext();) {
+
+ IProfileApplicationDelegate next = iter.next();
+ if (next instanceof MyRegistryReader.Descriptor) {
+ MyRegistryReader.Descriptor desc = (MyRegistryReader.Descriptor) next;
+ if (className.equals(desc.getClassName())) {
+ iter.remove();
+ break;
+ }
+ } else if (className.equals(next.getClass().getName())) {
+ iter.remove();
+ break;
+ }
+ }
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private class MyRegistryReader extends RegistryReader {
+
+ private static final String A_CLASS = "class"; //$NON-NLS-1$
+
+ private static final String E_DELEGATE = "delegate"; //$NON-NLS-1$
+
+ private Descriptor currentDescriptor;
+
+ MyRegistryReader() {
+ super(Platform.getExtensionRegistry(), Activator.PLUGIN_ID, EXT_POINT);
+ }
+
+ @Override
+ protected boolean readElement(IConfigurationElement element, boolean add) {
+ return add ? handleAdd(element) : handleRemove(element);
+ }
+
+ private boolean handleAdd(IConfigurationElement element) {
+ boolean result = false;
+
+ if (E_DELEGATE.equals(element.getName())) {
+ if (element.getAttribute(A_CLASS) == null) {
+ logMissingAttribute(element, A_CLASS);
+ } else {
+ currentDescriptor = new Descriptor(element, A_CLASS);
+ delegates.add(currentDescriptor);
+ }
+
+ result = true;
+ }
+
+ return result;
+ }
+
+ private boolean handleRemove(IConfigurationElement element) {
+ boolean result = true;
+
+ if (E_DELEGATE.equals(element.getName())) {
+ String className = element.getAttribute(A_CLASS);
+ if (className == null) {
+ logMissingAttribute(element, A_CLASS);
+ result = false;
+ } else {
+ removeProvider(className);
+ }
+ }
+
+ return result;
+ }
+
+ private class Descriptor extends PluginClassDescriptor implements IProfileApplicationDelegate {
+
+ private IProfileApplicationDelegate instance;
+
+ Descriptor(IConfigurationElement element, String attributeName) {
+ super(element, attributeName);
+ }
+
+ String getClassName() {
+ return element.getAttribute(attributeName);
+ }
+
+ IProfileApplicationDelegate getInstance() {
+ if (instance == null) {
+ try {
+ instance = (IProfileApplicationDelegate) createInstance();
+ } catch (Exception e) {
+ Activator.log.error("Failed to instantiate profile-application delegate extension.", e);
+ instance = NULL_DELEGATE;
+ }
+
+ needPrune = true;
+ }
+
+ return instance;
+ }
+
+ public boolean appliesTo(Package package_) {
+ return getInstance().appliesTo(package_);
+ }
+
+ public boolean appliesTo(ProfileApplication profileApplication) {
+ return getInstance().appliesTo(profileApplication);
+ }
+
+ public Iterable<ProfileApplication> getProfileApplications(Package package_) {
+ return getInstance().getProfileApplications(package_);
+ }
+
+ public ProfileApplication getProfileApplication(Package package_, Profile profile) {
+ return getInstance().getProfileApplication(package_, profile);
+ }
+
+ public Package getApplyingPackage(ProfileApplication profileApplication) {
+ return getInstance().getApplyingPackage(profileApplication);
+ }
+
+ public Profile getAppliedProfile(ProfileApplication profileApplication) {
+ return getInstance().getAppliedProfile(profileApplication);
+ }
+
+ public EList<EObject> reapplyProfile(Package package_, Profile profile) {
+ return getInstance().reapplyProfile(package_, profile);
+ }
+ }
+ }
+}
diff --git a/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup b/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup
index 94617fa949f..5f91badf767 100644
--- a/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup
+++ b/releng/org.eclipse.papyrus.oomph/setups/papyrus.setup
@@ -331,7 +331,7 @@
</annotation>
</repository>
<repository
- url="http://download.eclipse.org/modeling/mdt/uml2/updates/5.0">
+ url="http://download.eclipse.org/modeling/mdt/uml2/updates/5.1-I-builds">
<annotation
source="http://www.eclipse.org/Papyrus/2014/releng/dependencytools">
<detail
diff --git a/releng/top-pom-extra-tests.xml b/releng/top-pom-extra-tests.xml
index 7c6a5198e56..a2ad74b6e6e 100644
--- a/releng/top-pom-extra-tests.xml
+++ b/releng/top-pom-extra-tests.xml
@@ -1,297 +1,297 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <!-- Shared modules with main tests -->
- <module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
- <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework</module>
- <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils</module>
- <!-- Extra-tests modules -->
- <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests</module>
- <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests</module>
- <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests</module>
- <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests</module>
- <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests</module>
- <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests</module>
- <module>../tests/junit/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.tests</module>
- <module>../tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests</module>
- <module>../tests/junit/extraplugins/org.eclipse.papyrus.tests.extra</module>
- <module>../tests/junit/extraplugins/migration/org.eclipse.papyrus.migration.rsa.tests</module>
- <!-- Tests for umlrt -->
- <module>../tests/junit/extraplugins/umlrt/org.eclipse.papyrus.umlrt.validation.tests</module>
- </modules>
- <properties>
- <tycho-version>0.20.0</tycho-version>
- <tychoExtrasVersion>0.20.0</tychoExtrasVersion>
- </properties>
- <repositories>
- <repository>
- <id>papyrus-main</id>
- <layout>p2</layout>
- <url>${papyrus.repo.main}</url>
- </repository>
- <repository>
- <id>papyrus-extra</id>
- <layout>p2</layout>
- <url>${papyrus.repo.extra}</url>
- </repository>
- <repository>
- <id>birt</id>
- <layout>p2</layout>
- <!-- updateFrom("BIRT",0) -->
- <url>http://download.eclipse.org/birt/update-site/4.4/</url>
- </repository>
- <repository>
- <id>cdt</id>
- <layout>p2</layout>
- <!-- updateFrom("CDT",0) -->
- <url>http://download.eclipse.org/tools/cdt/builds/mars/milestones</url>
- </repository>
- <repository>
- <id>emft-emffacet</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF Facet",0) -->
- <url>http://download.eclipse.org/facet/updates/integration/0.5.0/I201408050748/</url>
- </repository>
- <repository>
- <id>emf-cdo</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF CDO",0) -->
- <url>http://download.eclipse.org/modeling/emf/cdo/drops/R20140610-0212</url>
- </repository>
- <repository>
- <id>emf-compare</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF COMPARE",0) -->
- <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201408190703</url>
- </repository>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-query</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF Query",0) -->
- <url>http://download.eclipse.org/modeling/emf/query/updates/milestones/S201409241406/</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
- </repository>
- <repository>
- <id>m2t-acceleo</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T ACCELEO",0) -->
- <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201408190816</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 5.1",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
- </repository>
- <repository>
- <id>subversive</id>
- <layout>p2</layout>
- <!-- updateFrom("Subversive",0) -->
- <url>http://download.eclipse.org/technology/subversive/2.0/luna-site/</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <optimize>true</optimize>
- <showWarnings>true</showWarnings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.papyrus.tests.extra</testSuite>
- <testClass>org.eclipse.papyrus.tests.extra.AllTests</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <testFailureIgnore>true</testFailureIgnore>
- <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=512M</argLine>
- <product>org.eclipse.sdk.ide</product>
-
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.sdk.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.papyrus.sdk.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.papyrus.extra.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <!-- Shared modules with main tests -->
+ <module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
+ <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework</module>
+ <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils</module>
+ <!-- Extra-tests modules -->
+ <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.core.tests</module>
+ <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.tests</module>
+ <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.ui.tests</module>
+ <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui.tests</module>
+ <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui.tests</module>
+ <module>../tests/junit/extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.tests</module>
+ <module>../tests/junit/extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.tests</module>
+ <module>../tests/junit/extraplugins/moka/org.eclipse.papyrus.moka.tests</module>
+ <module>../tests/junit/extraplugins/org.eclipse.papyrus.tests.extra</module>
+ <module>../tests/junit/extraplugins/migration/org.eclipse.papyrus.migration.rsa.tests</module>
+ <!-- Tests for umlrt -->
+ <module>../tests/junit/extraplugins/umlrt/org.eclipse.papyrus.umlrt.validation.tests</module>
+ </modules>
+ <properties>
+ <tycho-version>0.20.0</tycho-version>
+ <tychoExtrasVersion>0.20.0</tychoExtrasVersion>
+ </properties>
+ <repositories>
+ <repository>
+ <id>papyrus-main</id>
+ <layout>p2</layout>
+ <url>${papyrus.repo.main}</url>
+ </repository>
+ <repository>
+ <id>papyrus-extra</id>
+ <layout>p2</layout>
+ <url>${papyrus.repo.extra}</url>
+ </repository>
+ <repository>
+ <id>birt</id>
+ <layout>p2</layout>
+ <!-- updateFrom("BIRT",0) -->
+ <url>http://download.eclipse.org/birt/update-site/4.4/</url>
+ </repository>
+ <repository>
+ <id>cdt</id>
+ <layout>p2</layout>
+ <!-- updateFrom("CDT",0) -->
+ <url>http://download.eclipse.org/tools/cdt/builds/mars/milestones</url>
+ </repository>
+ <repository>
+ <id>emft-emffacet</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF Facet",0) -->
+ <url>http://download.eclipse.org/facet/updates/integration/0.5.0/I201408050748/</url>
+ </repository>
+ <repository>
+ <id>emf-cdo</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF CDO",0) -->
+ <url>http://download.eclipse.org/modeling/emf/cdo/drops/R20140610-0212</url>
+ </repository>
+ <repository>
+ <id>emf-compare</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF COMPARE",0) -->
+ <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201408190703</url>
+ </repository>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-query</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF Query",0) -->
+ <url>http://download.eclipse.org/modeling/emf/query/updates/milestones/S201409241406/</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
+ </repository>
+ <repository>
+ <id>m2t-acceleo</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T ACCELEO",0) -->
+ <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201408190816</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 5.1",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1-I-builds</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
+ </repository>
+ <repository>
+ <id>subversive</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Subversive",0) -->
+ <url>http://download.eclipse.org/technology/subversive/2.0/luna-site/</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.papyrus.tests.extra</testSuite>
+ <testClass>org.eclipse.papyrus.tests.extra.AllTests</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <testFailureIgnore>true</testFailureIgnore>
+ <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=512M</argLine>
+ <product>org.eclipse.sdk.ide</product>
+
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.sdk.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.papyrus.sdk.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.papyrus.extra.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/releng/top-pom-extras.xml b/releng/top-pom-extras.xml
index 25a1c6b52c2..9d68b9415ff 100755
--- a/releng/top-pom-extras.xml
+++ b/releng/top-pom-extras.xml
@@ -1,564 +1,564 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.cdo.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.cpp.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.diagramtemplate.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.eastadl.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.marte.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.marte.properties.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.marte.textedit.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.migration.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.moka.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.qompass.designer.basic.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.qompass.designer.tracing.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.uml.compare.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.umlrt.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.java.generator.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.java.profile.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.java.reverse.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.layers.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.robotml.generators.intempora.rtmaps.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.tablemigration.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.uml.export.feature</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.migration.rsa.feature</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.acceleo</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.acceleo.debug</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.acceleo.ui</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.core</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.ui</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.ui.hyperlink</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems</module>
- <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.edit</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.codegen.extensionpoints</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.cdtproject</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.codegen</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.ui</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.examples</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.profile</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization</module>
- <module>../extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate</module>
- <module>../extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit</module>
- <module>../extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor</module>
- <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation</module>
- <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator</module>
- <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model</module>
- <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui</module>
- <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties</module>
- <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard</module>
- <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl</module>
- <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable</module>
- <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable.allocation</module>
- <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable.allocation.config</module>
- <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable.menu</module>
- <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types</module>
- <module>../plugins/infra/org.eclipse.papyrus.eclipse.project.editors</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile</module>
- <module>../extraplugins/tablemigration/org.eclipse.papyrus.infra.emf.nattable.converter</module>
- <module>../extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints</module>
- <module>../extraplugins/tablemigration/org.eclipse.papyrus.infra.table.instance</module>
- <module>../extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.generator.jdtsynchronizer</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.generator.metamodel.jdt</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.generator.metamodel.jdt.edit</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.generator.metamodel.jdt.editor</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.generator.transfo.umltojdt</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.generator.ui</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.profile</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.profile.edit</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.profile.editor</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.reverse</module>
- <module>../extraplugins/java/org.eclipse.papyrus.java.reverse.ui</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.notationmodel.edit</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.runtime</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.edit</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.editor</module>
- <module>../extraplugins/layers/org.eclipse.papyrus.layers.ui</module>
- <module>../extraplugins/marte/properties/org.eclipse.papyrus.marte.properties</module>
- <module>../extraplugins/marte/org.eclipse.papyrus.marte.static.profile</module>
- <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext</module>
- <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext.ui</module>
- <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext</module>
- <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext.ui</module>
- <module>../extraplugins/marte/org.eclipse.papyrus.marte.vsl</module>
- <module>../extraplugins/marte/org.eclipse.papyrus.marte.vsl.ui</module>
- <module>../extraplugins/migration/org.eclipse.papyrus.migration.properties.model</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.alf.resources</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.async.fuml</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.composites</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.composites.utils</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.activeobjectcontrollerlibrary</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.standardlibrary</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.validation</module>
- <module>../extraplugins/moka/org.eclipse.papyrus.moka.ui</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.doc</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.vsl</module>
- <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core</module>
- <module>../extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.deployment</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.doc</module>
- <module>../extraplugins/robotml/generators/org.eclipse.papyrus.robotml.generators.common</module>
- <module>../extraplugins/robotml/generators/rtmaps/org.eclipse.papyrus.robotml.generators.intempora.rtmaps</module>
- <module>../extraplugins/robotml/generators/rtmaps/org.eclipse.papyrus.robotml.generators.intempora.rtmaps.ui</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.modelexplorer</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.perspective</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.templaterepository</module>
- <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.validation</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.texteditor.model</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer</module>
- <module>../extraplugins/uml/compare/org.eclipse.papyrus.uml.compare</module>
- <module>../extraplugins/uml/org.eclipse.papyrus.uml.export</module>
- <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt</module>
- <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt.properties</module>
- <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt.validation</module>
- <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard</module>
- <module>../extraplugins/migration/org.eclipse.papyrus.m2m.qvto</module>
- <module>../extraplugins/migration/org.eclipse.papyrus.migration.rsa</module>
- <module>../extraplugins/codegen/org.eclipse.papyrus.views.cpp</module>
- <module>../extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints</module>
- <!-- Papyrus Uml Diagram Ecore -->
- <module>../extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore</module>
- <module>../features/papyrus-extra-features/org.eclipse.papyrus.uml.diagram.ecore.feature</module>
- <module>extras</module>
- </modules>
- <properties>
- <tycho-version>0.21.0</tycho-version>
- <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
- </properties>
- <repositories>
- <repository>
- <id>papyrus-main</id>
- <layout>p2</layout>
- <url>${papyrus.repo.main}</url>
- </repository>
- <repository>
- <id>cdt</id>
- <layout>p2</layout>
- <!-- updateFrom("CDT",0) -->
- <url>http://download.eclipse.org/tools/cdt/builds/mars/milestones</url>
- </repository>
- <repository>
- <id>emft-emffacet</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF Facet",0) -->
- <url>http://download.eclipse.org/facet/updates/integration/0.5.0/I201408050748/</url>
- </repository>
- <repository>
- <id>emf-cdo</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF CDO",0) -->
- <url>http://download.eclipse.org/modeling/emf/cdo/drops/R20140610-0212</url>
- </repository>
- <repository>
- <id>emf-compare</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF COMPARE",0) -->
- <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201408190703</url>
- </repository>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-query</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF Query",0) -->
- <url>http://download.eclipse.org/modeling/emf/query/updates/milestones/S201409241406/</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
- </repository>
- <repository>
- <id>m2t-acceleo</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T ACCELEO",0) -->
- <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201408190816</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 5.1",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
- </repository>
- <repository>
- <id>subversive</id>
- <layout>p2</layout>
- <!-- updateFrom("Subversive",0) -->
- <url>http://download.eclipse.org/technology/subversive/2.0/luna-site/</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>org.eclipse.cbi.maven.plugins</id>
- <name>Eclipse CBI</name>
- <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <optimize>true</optimize>
- <showWarnings>true</showWarnings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>plugin-source</id>
- <goals>
- <goal>plugin-source</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-dependency-plugin</artifactId>
- <version>2.9</version>
- <executions>
- <execution>
- <id>purge-local-dependencies</id>
- <phase>process-sources</phase>
- <goals>
- <goal>purge-local-repository</goal>
- </goals>
- <configuration>
- <includes>
- <include>org.eclipse.papyrus</include>
- </includes>
- <verbose>true</verbose>
- <resolutionFuzziness>groupId</resolutionFuzziness>
- </configuration>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
-
- <profiles>
-
- <profile>
- <id>defaultProfile</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
-
- <profile>
- <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
- <!-- Pack200 -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200a-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-normalize</id>
- <goals>
- <goal>normalize</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.cbi.maven.plugins</groupId>
- <artifactId>eclipse-jarsigner-plugin</artifactId>
- <version>1.0.5</version>
- <executions>
- <execution>
- <id>sign</id>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <activation>
- <property>
- <name>SIGN</name>
- <value>true</value>
- </property>
- </activation>
- </profile>
-
-
- <profile>
- <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
- <build>
- <plugins>
- <!-- Pack200 -->
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <activation>
- <property>
- <name>SIGN</name>
- <value>false</value>
- </property>
- </activation>
- </profile>
-
-
- </profiles>
-</project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.cdo.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.cpp.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.diagramtemplate.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.dsml.validation.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.eastadl.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.marte.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.marte.properties.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.marte.textedit.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.migration.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.moka.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.qompass.designer.basic.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.qompass.designer.tracing.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.robotml.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.uml.compare.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.extra.umlrt.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.java.generator.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.java.profile.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.java.reverse.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.layers.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.robotml.generators.intempora.rtmaps.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.tablemigration.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.uml.export.feature</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.migration.rsa.feature</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.acceleo</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.acceleo.debug</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.acceleo.ui</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.core</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.ui</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.ui.customization.properties</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.ui.hyperlink</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.uml.diagram.ui</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.uml.search.ui</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.uml.ui</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems</module>
+ <module>../extraplugins/cdo/org.eclipse.papyrus.cdo.validation.problems.edit</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.codegen.extensionpoints</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.cdtproject</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.codegen</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.codegen.ui</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.examples</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.cpp.profile</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization</module>
+ <module>../extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate</module>
+ <module>../extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.edit</module>
+ <module>../extraplugins/diagramtemplate/org.eclipse.papyrus.diagramtemplate.editor</module>
+ <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation</module>
+ <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.generator</module>
+ <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model</module>
+ <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.model.ui</module>
+ <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.properties</module>
+ <module>../extraplugins/dsml.validation/org.eclipse.papyrus.dsml.validation.wizard</module>
+ <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl</module>
+ <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable</module>
+ <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable.allocation</module>
+ <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable.allocation.config</module>
+ <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.nattable.menu</module>
+ <module>../extraplugins/eastadl/org.eclipse.papyrus.eastadl.service.types</module>
+ <module>../plugins/infra/org.eclipse.papyrus.eclipse.project.editors</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.fcm.profile</module>
+ <module>../extraplugins/tablemigration/org.eclipse.papyrus.infra.emf.nattable.converter</module>
+ <module>../extraplugins/qompass-designer/tracing/org.eclipse.papyrus.infra.services.tracepoints</module>
+ <module>../extraplugins/tablemigration/org.eclipse.papyrus.infra.table.instance</module>
+ <module>../extraplugins/tablemigration/org.eclipse.papyrus.infra.table.modelexplorer</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.generator.jdtsynchronizer</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.generator.metamodel.jdt</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.generator.metamodel.jdt.edit</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.generator.metamodel.jdt.editor</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.generator.transfo.umltojdt</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.generator.ui</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.profile</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.profile.edit</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.profile.editor</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.reverse</module>
+ <module>../extraplugins/java/org.eclipse.papyrus.java.reverse.ui</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.notationmodel.edit</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.runtime</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.edit</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.editor</module>
+ <module>../extraplugins/layers/org.eclipse.papyrus.layers.ui</module>
+ <module>../extraplugins/marte/properties/org.eclipse.papyrus.marte.properties</module>
+ <module>../extraplugins/marte/org.eclipse.papyrus.marte.static.profile</module>
+ <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext</module>
+ <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.constraintwithvsl.xtext.ui</module>
+ <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext</module>
+ <module>../extraplugins/marte/textedit/org.eclipse.papyrus.marte.textedit.stereotypeapplicationwithvsl.xtext.ui</module>
+ <module>../extraplugins/marte/org.eclipse.papyrus.marte.vsl</module>
+ <module>../extraplugins/marte/org.eclipse.papyrus.marte.vsl.ui</module>
+ <module>../extraplugins/migration/org.eclipse.papyrus.migration.properties.model</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.alf.resources</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.async.fuml</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.composites</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.composites.utils</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.activeobjectcontrollerlibrary</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.assertionlibrary</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.standardlibrary</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.fuml.validation</module>
+ <module>../extraplugins/moka/org.eclipse.papyrus.moka.ui</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.core</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.doc</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.ui</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.validation</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.designer.vsl</module>
+ <module>../extraplugins/qompass-designer/org.eclipse.papyrus.qompass.modellibs.core</module>
+ <module>../extraplugins/qompass-designer/tracing/org.eclipse.papyrus.qompass.modellibs.tracing</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.deployment</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.common</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.diagram.ui</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.doc</module>
+ <module>../extraplugins/robotml/generators/org.eclipse.papyrus.robotml.generators.common</module>
+ <module>../extraplugins/robotml/generators/rtmaps/org.eclipse.papyrus.robotml.generators.intempora.rtmaps</module>
+ <module>../extraplugins/robotml/generators/rtmaps/org.eclipse.papyrus.robotml.generators.intempora.rtmaps.ui</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.modelexplorer</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.perspective</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.templaterepository</module>
+ <module>../extraplugins/robotml/org.eclipse.papyrus.robotml.validation</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.texteditor.cdt</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.texteditor.model</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.texteditor.modelexplorer</module>
+ <module>../extraplugins/uml/compare/org.eclipse.papyrus.uml.compare</module>
+ <module>../extraplugins/uml/org.eclipse.papyrus.uml.export</module>
+ <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt</module>
+ <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt.properties</module>
+ <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt.validation</module>
+ <module>../extraplugins/umlrt/org.eclipse.papyrus.umlrt.wizard</module>
+ <module>../extraplugins/migration/org.eclipse.papyrus.m2m.qvto</module>
+ <module>../extraplugins/migration/org.eclipse.papyrus.migration.rsa</module>
+ <module>../extraplugins/codegen/org.eclipse.papyrus.views.cpp</module>
+ <module>../extraplugins/qompass-designer/tracing/org.eclipse.papyrus.views.tracepoints</module>
+ <!-- Papyrus Uml Diagram Ecore -->
+ <module>../extraplugins/papyrus4ecore/org.eclipse.papyrus.uml.diagram.ecore</module>
+ <module>../features/papyrus-extra-features/org.eclipse.papyrus.uml.diagram.ecore.feature</module>
+ <module>extras</module>
+ </modules>
+ <properties>
+ <tycho-version>0.21.0</tycho-version>
+ <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
+ </properties>
+ <repositories>
+ <repository>
+ <id>papyrus-main</id>
+ <layout>p2</layout>
+ <url>${papyrus.repo.main}</url>
+ </repository>
+ <repository>
+ <id>cdt</id>
+ <layout>p2</layout>
+ <!-- updateFrom("CDT",0) -->
+ <url>http://download.eclipse.org/tools/cdt/builds/mars/milestones</url>
+ </repository>
+ <repository>
+ <id>emft-emffacet</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF Facet",0) -->
+ <url>http://download.eclipse.org/facet/updates/integration/0.5.0/I201408050748/</url>
+ </repository>
+ <repository>
+ <id>emf-cdo</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF CDO",0) -->
+ <url>http://download.eclipse.org/modeling/emf/cdo/drops/R20140610-0212</url>
+ </repository>
+ <repository>
+ <id>emf-compare</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF COMPARE",0) -->
+ <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201408190703</url>
+ </repository>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-query</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF Query",0) -->
+ <url>http://download.eclipse.org/modeling/emf/query/updates/milestones/S201409241406/</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
+ </repository>
+ <repository>
+ <id>m2t-acceleo</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T ACCELEO",0) -->
+ <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201408190816</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 5.1",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1-I-builds</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
+ </repository>
+ <repository>
+ <id>subversive</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Subversive",0) -->
+ <url>http://download.eclipse.org/technology/subversive/2.0/luna-site/</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>org.eclipse.cbi.maven.plugins</id>
+ <name>Eclipse CBI</name>
+ <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-dependency-plugin</artifactId>
+ <version>2.9</version>
+ <executions>
+ <execution>
+ <id>purge-local-dependencies</id>
+ <phase>process-sources</phase>
+ <goals>
+ <goal>purge-local-repository</goal>
+ </goals>
+ <configuration>
+ <includes>
+ <include>org.eclipse.papyrus</include>
+ </includes>
+ <verbose>true</verbose>
+ <resolutionFuzziness>groupId</resolutionFuzziness>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
+
+ <profiles>
+
+ <profile>
+ <id>defaultProfile</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+
+ <profile>
+ <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
+ <!-- Pack200 -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>1.0.5</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>true</value>
+ </property>
+ </activation>
+ </profile>
+
+
+ <profile>
+ <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
+ <build>
+ <plugins>
+ <!-- Pack200 -->
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>false</value>
+ </property>
+ </activation>
+ </profile>
+
+
+ </profiles>
+</project>
diff --git a/releng/top-pom-main-tests.xml b/releng/top-pom-main-tests.xml
index 2a7e2ddb705..a0179793a29 100644
--- a/releng/top-pom-main-tests.xml
+++ b/releng/top-pom-main-tests.xml
@@ -1,323 +1,326 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.tests</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.core.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.nattable.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.diagram.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.nattable.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.nattable.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.tools.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.views.feature</module>
- <module>../features/papyrus-tests-features/org.eclipse.papyrus.uml.textedit.tests.feature</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests</module>
- <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests</module>
- <module>../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests</module>
- <module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
- <module>../tests/junit/plugins/infra/org.eclipse.papyrus.infra.tools.tests</module>
- <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests</module>
- <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests</module>
- <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests</module>
- <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests</module>
- <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework</module>
- <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests</module>
- <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests</module>
- <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests</module>
- <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests</module>
- <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests</module>
- <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.service.types.tests</module>
- <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests</module>
- <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests</module>
- <module>../tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests</module>
- <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.tests</module>
- <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.search.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests</module>
- <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests</module>
- <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests</module>
- <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests</module>
- <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests</module>
- <module>../tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.tests</module>
- <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.tests</module>
- </modules>
- <properties>
- <tycho-version>0.20.0</tycho-version>
- <tychoExtrasVersion>0.20.0</tychoExtrasVersion>
- <testConfig>CI_TESTS_CONFIG</testConfig> <!-- See org.eclipse.papyrus.junit.framework.classification.ClassificationConfig -->
- </properties>
- <repositories>
- <repository>
- <id>papyrus-main</id>
- <layout>p2</layout>
- <url>${papyrus.repo.main}</url>
- </repository>
- <repository>
- <id>emf-compare</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF COMPARE",0) -->
- <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201408190703</url>
- </repository>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
- </repository>
- <repository>
- <id>m2t-acceleo</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T ACCELEO",0) -->
- <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201408190816</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 5.1",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
- </repository>
- <repository>
- <id>subversive</id>
- <layout>p2</layout>
- <!-- updateFrom("Subversive",0) -->
- <url>http://download.eclipse.org/technology/subversive/2.0/luna-site/</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
- </repository>
- <repository>
- <id>swtbot</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/technology/swtbot/snapshots</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <optimize>true</optimize>
- <showWarnings>true</showWarnings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>macosx</os>
- <ws>cocoa</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-surefire-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <testSuite>org.eclipse.papyrus.tests</testSuite>
- <testClass>org.eclipse.papyrus.tests.AllTests</testClass>
- <useUIHarness>true</useUIHarness>
- <useUIThread>true</useUIThread>
- <testFailureIgnore>true</testFailureIgnore>
- <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=512M</argLine>
- <appArgLine>-testConfig=${testConfig}</appArgLine>
- <product>org.eclipse.sdk.ide</product>
-
- <dependencies>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.sdk.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- <dependency>
- <type>p2-installable-unit</type>
- <artifactId>org.eclipse.papyrus.sdk.feature.feature.group</artifactId>
- <version>0.0.0</version>
- </dependency>
- </dependencies>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.tests</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.core.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.nattable.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.diagram.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.sysml.nattable.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.decoratormodel.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.diagram.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.nattable.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.uml.tools.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.tests.views.feature</module>
+ <module>../features/papyrus-tests-features/org.eclipse.papyrus.uml.textedit.tests.feature</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.editor.integration.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests</module>
+ <module>../tests/junit/plugins/core/org.eclipse.papyrus.infra.extendedtypes.tests</module>
+ <module>../tests/junit/plugins/customization/org.eclipse.papyrus.customization.properties.tests</module>
+ <module>../tests/junit/plugins/developer/org.eclipse.papyrus.bundles.tests</module>
+ <module>../tests/junit/plugins/infra/org.eclipse.papyrus.infra.tools.tests</module>
+ <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly.tests</module>
+ <module>../tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common.tests</module>
+ <module>../tests/junit/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.tests</module>
+ <module>../tests/junit/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests</module>
+ <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.framework</module>
+ <module>../tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric.tests</module>
+ <module>../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement.tests</module>
+ <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.tests</module>
+ <module>../tests/junit/plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.tests</module>
+ <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.modelexplorer.tests</module>
+ <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.service.types.tests</module>
+ <module>../tests/junit/plugins/sysml/org.eclipse.papyrus.sysml.tests</module>
+ <module>../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests</module>
+ <module>../tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase.tests</module>
+ <module>../tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards.tests</module>
+ <module>../tests/junit/plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.tests</module>
+ <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.tests</module>
+ <module>../tests/junit/plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.search.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.modelrepair.tests</module>
+ <module>../tests/junit/plugins/uml/org.eclipse.papyrus.uml.service.types.tests</module>
+ <module>../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.tests</module>
+ <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.tests</module>
+ <module>../tests/junit/plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils.tests</module>
+ <module>../tests/junit/plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.tests</module>
+ <module>../tests/junit/plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.tests</module>
+ </modules>
+ <properties>
+ <tycho-version>0.20.0</tycho-version>
+ <tychoExtrasVersion>0.20.0</tychoExtrasVersion>
+ <testConfig>CI_TESTS_CONFIG</testConfig> <!-- See org.eclipse.papyrus.junit.framework.classification.ClassificationConfig -->
+ </properties>
+ <repositories>
+ <repository>
+ <id>papyrus-main</id>
+ <layout>p2</layout>
+ <url>${papyrus.repo.main}</url>
+ </repository>
+ <repository>
+ <id>emf-compare</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF COMPARE",0) -->
+ <url>http://download.eclipse.org/modeling/emf/compare/updates/milestones/3.1/S201408190703</url>
+ </repository>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
+ </repository>
+ <repository>
+ <id>m2t-acceleo</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T ACCELEO",0) -->
+ <url>http://download.eclipse.org/acceleo/updates/milestones/3.6/S201408190816</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 5.1",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1-I-builds</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
+ </repository>
+ <repository>
+ <id>subversive</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Subversive",0) -->
+ <url>http://download.eclipse.org/technology/subversive/2.0/luna-site/</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
+ </repository>
+ <repository>
+ <id>swtbot</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/technology/swtbot/snapshots</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>macosx</os>
+ <ws>cocoa</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-surefire-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <testSuite>org.eclipse.papyrus.tests</testSuite>
+ <testClass>org.eclipse.papyrus.tests.AllTests</testClass>
+ <useUIHarness>true</useUIHarness>
+ <useUIThread>true</useUIThread>
+ <testFailureIgnore>true</testFailureIgnore>
+ <argLine>-Xms512m -Xmx2048m -XX:MaxPermSize=512M</argLine>
+ <appArgLine>-testConfig=${testConfig}</appArgLine>
+ <product>org.eclipse.sdk.ide</product>
+
+ <dependencies>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.sdk.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ <dependency>
+ <type>p2-installable-unit</type>
+ <artifactId>org.eclipse.papyrus.sdk.feature.feature.group</artifactId>
+ <version>0.0.0</version>
+ </dependency>
+ </dependencies>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/releng/top-pom-main.xml b/releng/top-pom-main.xml
index bc67bd00514..870fa6b131e 100755
--- a/releng/top-pom-main.xml
+++ b/releng/top-pom-main.xml
@@ -1,700 +1,705 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.customization.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.doc.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.editor.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.emf.facet.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.discovery.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.emf.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.css.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.nattable.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.services.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sdk.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.diagram.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.modelexplorer.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.nattable.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.properties.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.alf.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.css.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.modelexplorer.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.nattable.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.properties.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.search.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.tools.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.xtext.integration.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.modelexplorer.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.properties.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.search.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.views.validation.feature</module>
- <module>../features/papyrus-main-features/org.eclipse.papyrus.xwt.feature</module>
- <module>../plugins/doc/org.eclipse.papyrus.cdo.ui.doc</module>
- <module>../plugins/doc/org.eclipse.papyrus.copypaste.ui.doc</module>
- <module>../plugins/doc/org.eclipse.papyrus.infra.services.controlmode.doc</module>
- <module>../plugins/doc/org.eclipse.papyrus.layers.documentation</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.palette</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.paletteconfiguration</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.properties</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.properties.generation</module>
- <module>../plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt</module>
- <module>../plugins/doc/org.eclipse.papyrus.dsml.validation.doc</module>
- <module>../plugins/editor/org.eclipse.papyrus.editor</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel.edit</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.catalog</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.editor</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.metamodel</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.sdk.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.jface.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.pde.core</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.swt</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.ui</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors</module>
- <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.constraints</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.editor</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.log</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor</module>
- <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di</module>
- <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery</module>
- <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui</module>
- <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.doc</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable</module>
- <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly</module>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.customization.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.doc.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.editor.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.emf.facet.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.core.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.discovery.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.emf.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.css.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.gmfdiag.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.nattable.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.services.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.viewpoints.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.infra.widget.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sdk.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.diagram.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.modelexplorer.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.nattable.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.sysml.properties.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.alf.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.decoratormodel.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.css.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.diagram.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.modelexplorer.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.nattable.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.properties.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.search.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.tools.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.uml.xtext.integration.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.modelexplorer.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.properties.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.search.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.views.validation.feature</module>
+ <module>../features/papyrus-main-features/org.eclipse.papyrus.xwt.feature</module>
+ <module>../plugins/doc/org.eclipse.papyrus.cdo.ui.doc</module>
+ <module>../plugins/doc/org.eclipse.papyrus.copypaste.ui.doc</module>
+ <module>../plugins/doc/org.eclipse.papyrus.infra.services.controlmode.doc</module>
+ <module>../plugins/doc/org.eclipse.papyrus.layers.documentation</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.palette</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.paletteconfiguration</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.properties</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.properties.generation</module>
+ <module>../plugins/customization/org.eclipse.papyrus.customization.properties.model.xwt</module>
+ <module>../plugins/doc/org.eclipse.papyrus.dsml.validation.doc</module>
+ <module>../plugins/editor/org.eclipse.papyrus.editor</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.sdk.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.common.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.metamodel.edit</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.custom.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.catalog</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.edit</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.editor</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.metamodel.edit</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.efacet.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.java.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.metamodel</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.query.ocl.sdk.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.catalog</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.emf.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.jface.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.pde.core</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.swt</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.util.ui</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors</module>
+ <module>../plugins/facet/org.eclipse.papyrus.emf.facet.widgets.celleditors.ecore</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.extensionpoints.editors</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.constraints</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.constraints.editor</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.log</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.pluginexplorer</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor</module>
+ <module>../plugins/infra/core/org.eclipse.papyrus.infra.core.sasheditor.di</module>
+ <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery</module>
+ <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui</module>
+ <module>../plugins/infra/discovery/org.eclipse.papyrus.infra.discovery.ui.menu</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.doc</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.appearance</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.diagram.common</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable</module>
+ <module>../plugins/infra/emf/org.eclipse.papyrus.infra.emf.readonly</module>
<module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.export</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common</module>
- <module>../plugins/doc/org.eclipse.papyrus.infra.gmfdiag.common.doc</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration</module>
- <module>../plugins/doc/org.eclipse.papyrus.infra.gmfdiag.css.doc</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext</module>
- <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher</module>
- <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.hyperlink</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config</module>
- <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.newchild</module>
- <module>../plugins/doc/org.eclipse.papyrus.infra.newchild.doc</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.newchild.edit</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.onefile</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.psf</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.history</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.decoration</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.edit</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.localizer</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.markerlistener</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.navigation</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.openelement</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.preferences</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.semantic</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.validation</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewersearch</module>
- <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewlabelprovider</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.tools</module>
- <module>../plugins/infra/org.eclipse.papyrus.infra.ui.resources</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor</module>
- <module>../plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy</module>
- <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences</module>
- <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets</module>
- <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets.toolbox</module>
- <module>../plugins/doc/org.eclipse.papyrus.moka.doc</module>
- <module>../plugins/sysml/org.eclipse.papyrus.sysml</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.css</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement</module>
- <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui</module>
- <module>../plugins/sysml/org.eclipse.papyrus.sysml.edit</module>
- <module>../plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement</module>
- <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config</module>
- <module>../plugins/sysml/properties/org.eclipse.papyrus.sysml.properties</module>
- <module>../plugins/sysml/org.eclipse.papyrus.sysml.service.types</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common.ui</module>
- <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.appearance</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.commands</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.controlmode.profile</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common</module>
- <module>../plugins/doc/org.eclipse.papyrus.uml.diagram.common.doc</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.groups</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.palette.customaction</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.icons</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile</module>
- <module>../plugins/doc/org.eclipse.papyrus.uml.diagram.profile.doc</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase</module>
- <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards</module>
- <module>../plugins/doc/org.eclipse.papyrus.uml.doc</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.documentation.profile</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.extensionpoints</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.icons</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.import</module>
- <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer</module>
- <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.modelrepair</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu</module>
- <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.navigation</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.oclconstraintevaluation</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.perspective</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.profile</module>
- <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties</module>
- <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.resourceloading.profile</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.search.ui</module>
- <module>../plugins/doc/org.eclipse.papyrus.uml.search.ui.doc</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.service.types</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.service.validation</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.services.decoration</module>
- <module>../plugins/uml/org.eclipse.papyrus.uml.templaterepository</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.javaconstraint</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext</module>
- <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext.ui</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes</module>
- <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils</module>
- <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.core</module>
- <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui</module>
- <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.resourceloading</module>
- <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.widgets</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties</module>
- <module>../plugins/doc/org.eclipse.papyrus.views.properties.doc</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.edit</module>
- <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.editor</module>
- <module>../plugins/views/org.eclipse.papyrus.views.search</module>
- <module>../plugins/views/validation/org.eclipse.papyrus.views.validation</module>
- <module>../plugins/xwt/org.eclipse.papyrus.xwt</module>
- <module>main</module>
- </modules>
- <properties>
- <tycho-version>0.21.0</tycho-version>
- <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
- <findbugs.version>2.5.3</findbugs.version>
- </properties>
- <repositories>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 5.1",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
- </repository>
- </repositories>
- <pluginRepositories>
- <pluginRepository>
- <id>org.eclipse.cbi.maven.plugins</id>
- <name>Eclipse CBI</name>
- <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-compiler-plugin</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <source>1.6</source>
- <target>1.6</target>
- <optimize>true</optimize>
- <showWarnings>true</showWarnings>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-repository-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <!-- Sources -->
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>plugin-source</id>
- <goals>
- <goal>plugin-source</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-source-feature-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>source-feature</id>
- <phase>package</phase>
- <goals>
- <goal>source-feature</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-
+ <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.extendedtypes.emf</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.commands</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common</module>
+ <module>../plugins/doc/org.eclipse.papyrus.infra.gmfdiag.common.doc</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.controlmode</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.configuration</module>
+ <module>../plugins/doc/org.eclipse.papyrus.infra.gmfdiag.css.doc</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.model</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.css.palette</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.properties</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.theme</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext</module>
+ <module>../plugins/infra/gmfdiag/css/org.eclipse.papyrus.infra.gmfdiag.css.xtext.ui</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.dnd</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gmfmenu.filter</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.hyperlink</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.menu</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.modelexplorer</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.navigation</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.outline</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.preferences</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.properties</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.viewersearcher</module>
+ <module>../plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.widgets</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.hyperlink</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.edit</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.model.editor</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.properties</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config</module>
+ <module>../plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.editor</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.newchild</module>
+ <module>../plugins/doc/org.eclipse.papyrus.infra.newchild.doc</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.newchild.edit</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.onefile</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.psf</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.controlmode.history</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.decoration</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.edit</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.localizer</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.markerlistener</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.navigation</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.openelement</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.preferences</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.semantic</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.validation</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewersearch</module>
+ <module>../plugins/infra/services/org.eclipse.papyrus.infra.services.viewlabelprovider</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.tools</module>
+ <module>../plugins/infra/org.eclipse.papyrus.infra.ui.resources</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.edit</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.editor</module>
+ <module>../plugins/doc/org.eclipse.papyrus.infra.viewpoints.doc</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.iso42010.edit</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy</module>
+ <module>../plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.preferences</module>
+ <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets</module>
+ <module>../plugins/infra/widget/org.eclipse.papyrus.infra.widgets.toolbox</module>
+ <module>../plugins/doc/org.eclipse.papyrus.moka.doc</module>
+ <module>../plugins/sysml/org.eclipse.papyrus.sysml</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.css</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.parametric</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement</module>
+ <module>../plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.ui</module>
+ <module>../plugins/sysml/org.eclipse.papyrus.sysml.edit</module>
+ <module>../plugins/sysml/modelexplorer/org.eclipse.papyrus.sysml.modelexplorer</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.allocation.config</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.menu</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement</module>
+ <module>../plugins/sysml/nattable/org.eclipse.papyrus.sysml.nattable.requirement.config</module>
+ <module>../plugins/sysml/properties/org.eclipse.papyrus.sysml.properties</module>
+ <module>../plugins/sysml/org.eclipse.papyrus.sysml.service.types</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.common.ui</module>
+ <module>../plugins/uml/alf/org.eclipse.papyrus.uml.alf.ui</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.appearance</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.commands</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.controlmode.profile</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.properties</module>
+ <module>../plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.ui</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.activity</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common</module>
+ <module>../plugins/doc/org.eclipse.papyrus.uml.diagram.common.doc</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.groups</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common.palette.customaction</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.communication</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.component</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.composite</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.css</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.deployment</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.dnd</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.icons</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.interactionoverview</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.modelexplorer</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.navigation</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.paletteconfiguration.edit</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile</module>
+ <module>../plugins/doc/org.eclipse.papyrus.uml.diagram.profile.doc</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.sequence</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.statemachine</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.symbols.properties</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.synchronizeview</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.timing</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase</module>
+ <module>../plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.wizards</module>
+ <module>../plugins/doc/org.eclipse.papyrus.uml.doc</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.documentation.profile</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.extensionpoints</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.icons</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.import</module>
+ <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer</module>
+ <module>../plugins/uml/modelexplorer/org.eclipse.papyrus.uml.modelexplorer.widgets</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.modelrepair</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.generic.config</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.menu</module>
+ <module>../plugins/uml/nattable/org.eclipse.papyrus.uml.nattable.xtext.integration</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.navigation</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.oclconstraintevaluation</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.perspective</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.profile</module>
+ <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties</module>
+ <module>../plugins/uml/properties/org.eclipse.papyrus.uml.properties.xtext</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.resourceloading.profile</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.search.ui</module>
+ <module>../plugins/doc/org.eclipse.papyrus.uml.search.ui.doc</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.service.types</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.service.validation</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.services.decoration</module>
+ <module>../plugins/uml/org.eclipse.papyrus.uml.templaterepository</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.connectionpointreference.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.constraintwithessentialocl.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.javaconstraint</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.message.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.parameter.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.port.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.property.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.state.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.stereotypeproperty.xtext.ui</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext</module>
+ <module>../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.transition.xtext.ui</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.extendedtypes</module>
+ <module>../plugins/uml/tools/org.eclipse.papyrus.uml.tools.utils</module>
+ <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.core</module>
+ <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.ui</module>
+ <module>../plugins/uml/xtext/org.eclipse.papyrus.uml.xtext.integration.validation</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.newchild</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.resourceloading</module>
+ <module>../plugins/views/modelexplorer/org.eclipse.papyrus.views.modelexplorer.widgets</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties</module>
+ <module>../plugins/doc/org.eclipse.papyrus.views.properties.doc</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.edit</module>
+ <module>../plugins/views/properties/org.eclipse.papyrus.views.properties.model.editor</module>
+ <module>../plugins/views/org.eclipse.papyrus.views.search</module>
+ <module>../plugins/views/validation/org.eclipse.papyrus.views.validation</module>
+ <module>../plugins/xwt/org.eclipse.papyrus.xwt</module>
+ <module>main</module>
+ </modules>
+ <properties>
+ <tycho-version>0.21.0</tycho-version>
+ <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
+ <findbugs.version>2.5.3</findbugs.version>
+ </properties>
+ <repositories>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 5.1",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1-I-builds</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>org.eclipse.cbi.maven.plugins</id>
+ <name>Eclipse CBI</name>
+ <url>https://repo.eclipse.org/content/repositories/cbi-releases/</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-compiler-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <source>1.6</source>
+ <target>1.6</target>
+ <optimize>true</optimize>
+ <showWarnings>true</showWarnings>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-repository-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <!-- Sources -->
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-source-feature-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>source-feature</id>
+ <phase>package</phase>
+ <goals>
+ <goal>source-feature</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+
<!--
No profile: Don't produce any artifact (update site). Used by Gerrit
findBugs: produce analysis reports. Activation: explicit ("Profiles")
packAndSign: produce a stable update site (Packed & signed). Used for releases (+ milestones) only. Activation: SIGN=true
pack: produce a simple update site (Packed). Used for nightly or feature branch builds. Activation: SIGN=false
- -->
- <profiles>
-
- <profile>
- <id>defaultProfile</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
-
- <profile>
- <id>findBugs</id> <!-- Analysis profile. Takes +1h -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>findbugs-maven-plugin</artifactId>
- <version>${findbugs.version}</version>
- <configuration>
- <findbugsXmlOutput>true</findbugsXmlOutput>
- <failOnError>false</failOnError>
- </configuration>
- <executions>
- <execution>
- <goals>
- <goal>check</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile>
-
-
- <profile>
- <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
- <!-- Pack200 -->
- <build>
- <plugins>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200a-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-normalize</id>
- <goals>
- <goal>normalize</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.cbi.maven.plugins</groupId>
- <artifactId>eclipse-jarsigner-plugin</artifactId>
- <version>1.0.5</version>
- <executions>
- <execution>
- <id>sign</id>
- <goals>
- <goal>sign</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <activation>
- <property>
- <name>SIGN</name>
- <value>true</value>
- </property>
- </activation>
- </profile>
-
-
- <profile>
- <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
- <build>
- <plugins>
- <!-- Pack200 -->
- <plugin>
- <groupId>org.eclipse.tycho.extras</groupId>
- <artifactId>tycho-pack200b-plugin</artifactId>
- <version>${tychoExtrasVersion}</version>
- <executions>
- <execution>
- <id>pack200-pack</id>
- <goals>
- <goal>pack</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-p2-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>attach-p2-metadata</id>
- <phase>package</phase>
- <goals>
- <goal>p2-metadata</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <defaultP2Metadata>false</defaultP2Metadata>
- </configuration>
- </plugin>
- </plugins>
- </build>
- <activation>
- <property>
- <name>SIGN</name>
- <value>false</value>
- </property>
- </activation>
- </profile>
-
-
- </profiles>
-</project>
+ -->
+ <profiles>
+
+ <profile>
+ <id>defaultProfile</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+
+ <profile>
+ <id>findBugs</id> <!-- Analysis profile. Takes +1h -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>findbugs-maven-plugin</artifactId>
+ <version>${findbugs.version}</version>
+ <configuration>
+ <findbugsXmlOutput>true</findbugsXmlOutput>
+ <failOnError>false</failOnError>
+ </configuration>
+ <executions>
+ <execution>
+ <goals>
+ <goal>check</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+
+
+ <profile>
+ <id>packAndSign</id> <!-- Stable release profile. Takes +30min. Eclipse servers only -->
+ <!-- Pack200 -->
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200a-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-normalize</id>
+ <goals>
+ <goal>normalize</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.cbi.maven.plugins</groupId>
+ <artifactId>eclipse-jarsigner-plugin</artifactId>
+ <version>1.0.5</version>
+ <executions>
+ <execution>
+ <id>sign</id>
+ <goals>
+ <goal>sign</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>true</value>
+ </property>
+ </activation>
+ </profile>
+
+
+ <profile>
+ <id>pack</id> <!-- Nightly profile. Artifacts can be consumed, but are not signed -->
+ <build>
+ <plugins>
+ <!-- Pack200 -->
+ <plugin>
+ <groupId>org.eclipse.tycho.extras</groupId>
+ <artifactId>tycho-pack200b-plugin</artifactId>
+ <version>${tychoExtrasVersion}</version>
+ <executions>
+ <execution>
+ <id>pack200-pack</id>
+ <goals>
+ <goal>pack</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-p2-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>attach-p2-metadata</id>
+ <phase>package</phase>
+ <goals>
+ <goal>p2-metadata</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <defaultP2Metadata>false</defaultP2Metadata>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <activation>
+ <property>
+ <name>SIGN</name>
+ <value>false</value>
+ </property>
+ </activation>
+ </profile>
+
+
+ </profiles>
+</project>
diff --git a/releng/top-pom-rcp.xml b/releng/top-pom-rcp.xml
index 8fb65ab095a..3e629ce1d61 100755
--- a/releng/top-pom-rcp.xml
+++ b/releng/top-pom-rcp.xml
@@ -1,192 +1,192 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<project>
- <modelVersion>4.0.0</modelVersion>
- <groupId>org.eclipse.papyrus</groupId>
- <artifactId>org.eclipse.papyrus</artifactId>
- <version>1.1.0-SNAPSHOT</version>
- <packaging>pom</packaging>
- <modules>
- <module>rcp/org.eclipse.papyrus.rcp</module>
- <module>rcp/org.eclipse.papyrus.rcp.feature</module>
- <module>rcp/org.eclipse.papyrus.rcp.product</module>
- </modules>
- <properties>
- <tycho-version>0.21.0</tycho-version>
- <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
- </properties>
- <repositories>
- <repository>
- <id>emf-emf</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF (Core)",0) -->
- <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
- </repository>
- <repository>
- <id>emft-mwe[0]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",0) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
- </repository>
- <repository>
- <id>emft-mwe[1]</id>
- <layout>p2</layout>
- <!-- updateFrom("EMFT MWE",1) -->
- <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
- </repository>
- <repository>
- <id>emf-transaction</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF TRANSACTION",0) -->
- <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
- </repository>
- <repository>
- <id>emf-validation</id>
- <layout>p2</layout>
- <!-- updateFrom("EMF VALIDATION",0) -->
- <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
- </repository>
- <repository>
- <id>ep</id>
- <layout>p2</layout>
- <!-- updateFrom("Eclipse",0) -->
- <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
- </repository>
- <repository>
- <id>gef</id>
- <layout>p2</layout>
- <!-- updateFrom("GEF",0) -->
- <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
- </repository>
- <repository>
- <id>gmp-gmf-notation</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Notation",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
- </repository>
- <repository>
- <id>gmp-gmf-runtime</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Runtime",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
- </repository>
- <repository>
- <id>gmf-tooling</id>
- <layout>p2</layout>
- <!-- updateFrom("GMF Tooling",0) -->
- <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
- </repository>
- <repository>
- <id>m2t-xpand</id>
- <layout>p2</layout>
- <!-- updateFrom("M2T XPAND",0) -->
- <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
- </repository>
- <repository>
- <id>mdt-ocl</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT OCL 5.1",0) -->
- <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
- </repository>
- <repository>
- <id>mdt-uml2</id>
- <layout>p2</layout>
- <!-- updateFrom("MDT UML2",0) -->
- <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.0</url>
- </repository>
- <repository>
- <id>mmt-qvto</id>
- <layout>p2</layout>
- <!-- updateFrom("QVT Operational",0) -->
- <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
- </repository>
- <repository>
- <id>nattable</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
- </repository>
- <repository>
- <id>orbit</id>
- <layout>p2</layout>
- <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
- </repository>
- <repository>
- <id>tmf-xtext</id>
- <layout>p2</layout>
- <!-- updateFrom("Xtext, Xtend",0) -->
- <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
- </repository>
- <repository>
- <id>webtools</id>
- <layout>p2</layout>
- <!-- updateFrom("WebTools",0) -->
- <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
- </repository>
- </repositories>
- <build>
- <plugins>
- <plugin>
- <!-- enable tycho build extension -->
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-maven-plugin</artifactId>
- <version>${tycho-version}</version>
- <extensions>true</extensions>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-versions-plugin</artifactId>
- <version>${tycho-version}</version>
- </plugin>
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>target-platform-configuration</artifactId>
- <version>${tycho-version}</version>
- <configuration>
- <environments>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>linux</os>
- <ws>gtk</ws>
- <arch>x86</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86_64</arch>
- </environment>
- <environment>
- <os>win32</os>
- <ws>win32</ws>
- <arch>x86</arch>
- </environment>
- </environments>
- </configuration>
- </plugin>
- <!-- enable source bundle generation -->
- <plugin>
- <groupId>org.eclipse.tycho</groupId>
- <artifactId>tycho-source-plugin</artifactId>
- <version>${tycho-version}</version>
- <executions>
- <execution>
- <id>plugin-source</id>
- <goals>
- <goal>plugin-source</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.5</version>
- <configuration>
- <encoding>UTF-8</encoding>
- </configuration>
- </plugin>
- </plugins>
- </build>
-</project>
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>pom</packaging>
+ <modules>
+ <module>rcp/org.eclipse.papyrus.rcp</module>
+ <module>rcp/org.eclipse.papyrus.rcp.feature</module>
+ <module>rcp/org.eclipse.papyrus.rcp.product</module>
+ </modules>
+ <properties>
+ <tycho-version>0.21.0</tycho-version>
+ <tychoExtrasVersion>0.21.0</tychoExtrasVersion>
+ </properties>
+ <repositories>
+ <repository>
+ <id>emf-emf</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF (Core)",0) -->
+ <url>http://download.eclipse.org/modeling/emf/emf/updates/2.11milestones/</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[0]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",0) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300336/mwe</url>
+ </repository>
+ <repository>
+ <id>emft-mwe[1]</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMFT MWE",1) -->
+ <url>http://download.eclipse.org/modeling/emft/mwe/updates/milestones/S201409300856/mwe2lang</url>
+ </repository>
+ <repository>
+ <id>emf-transaction</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF TRANSACTION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/transaction/updates/milestones/S201409241440</url>
+ </repository>
+ <repository>
+ <id>emf-validation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("EMF VALIDATION",0) -->
+ <url>http://download.eclipse.org/modeling/emf/validation/updates/milestones/S201409241438</url>
+ </repository>
+ <repository>
+ <id>ep</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Eclipse",0) -->
+ <url>http://download.eclipse.org/eclipse/updates/4.5milestones/S-4.5M3-201410292000/</url>
+ </repository>
+ <repository>
+ <id>gef</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GEF",0) -->
+ <url>http://download.eclipse.org/tools/gef/updates/milestones</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-notation</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Notation",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-notation/updates/milestones/S201409241407</url>
+ </repository>
+ <repository>
+ <id>gmp-gmf-runtime</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Runtime",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-runtime/updates/milestones/S201409241816</url>
+ </repository>
+ <repository>
+ <id>gmf-tooling</id>
+ <layout>p2</layout>
+ <!-- updateFrom("GMF Tooling",0) -->
+ <url>http://download.eclipse.org/modeling/gmp/gmf-tooling/updates/milestones-3.2.RC4a</url>
+ </repository>
+ <repository>
+ <id>m2t-xpand</id>
+ <layout>p2</layout>
+ <!-- updateFrom("M2T XPAND",0) -->
+ <url>http://download.eclipse.org/modeling/m2t/xpand/updates/milestones/S201409300343/</url>
+ </repository>
+ <repository>
+ <id>mdt-ocl</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT OCL 5.1",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/ocl/updates/interim/5.1.0</url>
+ </repository>
+ <repository>
+ <id>mdt-uml2</id>
+ <layout>p2</layout>
+ <!-- updateFrom("MDT UML2",0) -->
+ <url>http://download.eclipse.org/modeling/mdt/uml2/updates/5.1-I-builds</url>
+ </repository>
+ <repository>
+ <id>mmt-qvto</id>
+ <layout>p2</layout>
+ <!-- updateFrom("QVT Operational",0) -->
+ <url>http://download.eclipse.org/mmt/qvto/updates/milestones/3.4.0/S201406101621</url>
+ </repository>
+ <repository>
+ <id>nattable</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/nattable/releases/1.1.0/repository/</url>
+ </repository>
+ <repository>
+ <id>orbit</id>
+ <layout>p2</layout>
+ <url>http://download.eclipse.org/tools/orbit/downloads/drops/R20140525021250/repository</url>
+ </repository>
+ <repository>
+ <id>tmf-xtext</id>
+ <layout>p2</layout>
+ <!-- updateFrom("Xtext, Xtend",0) -->
+ <url>http://download.eclipse.org/modeling/tmf/xtext/updates/milestones/head/S201409300608/</url>
+ </repository>
+ <repository>
+ <id>webtools</id>
+ <layout>p2</layout>
+ <!-- updateFrom("WebTools",0) -->
+ <url>http://download.eclipse.org/webtools/downloads/drops/R3.7.0/S-3.7.0M2-20140925000031/repository/</url>
+ </repository>
+ </repositories>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- enable tycho build extension -->
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-maven-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-versions-plugin</artifactId>
+ <version>${tycho-version}</version>
+ </plugin>
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>target-platform-configuration</artifactId>
+ <version>${tycho-version}</version>
+ <configuration>
+ <environments>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>linux</os>
+ <ws>gtk</ws>
+ <arch>x86</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86_64</arch>
+ </environment>
+ <environment>
+ <os>win32</os>
+ <ws>win32</ws>
+ <arch>x86</arch>
+ </environment>
+ </environments>
+ </configuration>
+ </plugin>
+ <!-- enable source bundle generation -->
+ <plugin>
+ <groupId>org.eclipse.tycho</groupId>
+ <artifactId>tycho-source-plugin</artifactId>
+ <version>${tycho-version}</version>
+ <executions>
+ <execution>
+ <id>plugin-source</id>
+ <goals>
+ <goal>plugin-source</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.5</version>
+ <configuration>
+ <encoding>UTF-8</encoding>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.settings/org.eclipse.jdt.core.prefs b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index af0f20f97a5..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-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/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/META-INF/MANIFEST.MF b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/META-INF/MANIFEST.MF
deleted file mode 100644
index 6f6eecc640a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,18 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: %Bundle-Name
-Bundle-SymbolicName: org.eclipse.papyrus.uml.profile.externalresource.properties;singleton:=true
-Bundle-Version: 0.10.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.profile.externalresource.properties.Activator
-Bundle-Vendor: %Bundle-Vendor
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.views.properties;bundle-version="0.10.1",
- org.eclipse.uml2.uml;bundle-version="4.1.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.widgets;bundle-version="0.10.1",
- org.eclipse.papyrus.uml.properties;bundle-version="0.10.1",
- org.eclipse.core.databinding.observable;bundle-version="1.4.1",
- org.eclipse.core.databinding;bundle-version="1.4.1"
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-Bundle-ActivationPolicy: lazy
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/OSGI-INF/l10n/bundle.properties b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index 41a869673c4..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.papyrus.uml.profile.externalresource.properties
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = Property view for External Stereotype applications Plugin (Incubation) \ No newline at end of file
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResource.ctx b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResource.ctx
deleted file mode 100644
index cff6449b453..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResource.ctx
+++ /dev/null
@@ -1,1078 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<contexts:Context xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:constraints="http://www.eclipse.org/papyrus/constraints/0.9" xmlns:contexts="http://www.eclipse.org/papyrus/properties/contexts/0.9" name="UMLStereotypeApplicationExternalResource">
- <dependencies href="ppe:/context/org.eclipse.papyrus.uml.properties/Model/UML/UML.ctx#/"/>
- <tabs label="Profile" id="profile" category="org.eclipse.papyrus" priority="50">
- <sections name="SinglePackageProfile" sectionFile="ui/SinglePackageProfile.xwt">
- <widget href="ui/SinglePackageProfile.xwt#/"/>
- </sections>
- <sections name="SingleElement" sectionFile="ui/SingleElement.xwt">
- <widget href="ui/SingleElement.xwt#/"/>
- </sections>
- </tabs>
- <views name="SinglePackageProfile" sections="//@tabs.0/@sections.0" automaticContext="true">
- <constraints xsi:type="constraints:SimpleConstraint" name="isSinglePackage" overrideable="false">
- <constraintType href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@constraintTypes.0"/>
- <properties xsi:type="constraints:ValueProperty" name="umlClassName" value="Package"/>
- </constraints>
- </views>
- <dataContexts name="UML" label="UML">
- <elements name="Comment" supertypes="//@dataContexts.0/@elements.1">
- <properties name="body" description="Specifies a string that is the comment."/>
- <properties name="annotatedElement" type="Reference" description="References the Element(s) being commented."/>
- </elements>
- <elements name="Element" supertypes="//@dataContexts.0/@elements.241">
- <properties name="ownedElement" type="Reference" description="The Elements owned by this element."/>
- <properties name="owner" type="Reference" description="The Element that owns this element."/>
- <properties name="ownedComment" type="Reference" description="The Comments owned by this element."/>
- </elements>
- <elements name="Package" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.3 //@dataContexts.0/@elements.18">
- <properties name="ownedType" type="Reference" description="References the packaged elements that are Types."/>
- <properties name="packageMerge" type="Reference" description="References the PackageMerges that are owned by this Package."/>
- <properties name="packagedElement" type="Reference" description="Specifies the packageable elements that are owned by this Package."/>
- <properties name="nestedPackage" type="Reference" description="References the packaged elements that are Packages."/>
- <properties name="nestingPackage" type="Reference" description="References the Package that owns this Package."/>
- <properties name="profileApplication" type="Reference" description="References the ProfileApplications that indicate which profiles have been applied to the Package."/>
- <properties name="ownedStereotype" type="Reference" multiplicity="-1" description=""/>
- <properties name="URI" description="Provides an identifier for the package that can be used for many purposes. A URI is the universally unique identification of the package following the IETF URI specification, RFC 2396 http://www.ietf.org/rfc/rfc2396.txt and it must comply with those syntax rules."/>
- </elements>
- <elements name="PackageableElement" supertypes="//@dataContexts.0/@elements.4 //@dataContexts.0/@elements.22"/>
- <elements name="NamedElement" supertypes="//@dataContexts.0/@elements.1">
- <properties name="name" description="The name of the NamedElement."/>
- <properties name="visibility" type="Enumeration" description="Determines where the NamedElement appears within different Namespaces within the overall model, and its accessibility."/>
- <properties name="qualifiedName" description="A name which allows the NamedElement to be identified within a hierarchy of nested Namespaces. It is constructed from the names of the containing namespaces starting at the root of the hierarchy and ending with the name of the NamedElement itself."/>
- <properties name="clientDependency" type="Reference" description="Indicates the dependencies that reference the client."/>
- <properties name="namespace" type="Reference" description="Specifies the namespace that owns the NamedElement."/>
- <properties name="nameExpression" type="Reference" description="The string expression used to define the name of this named element."/>
- </elements>
- <elements name="Dependency" supertypes="//@dataContexts.0/@elements.3 //@dataContexts.0/@elements.6">
- <properties name="supplier" type="Reference" description="The element(s) independent of the client element(s), in the same respect and the same dependency relationship. In some directed dependency relationships (such as Refinement Abstractions), a common convention in the domain of class-based OO software is to put the more abstract element in this role. Despite this convention, users of UML may stipulate a sense of dependency suitable for their domain, which makes a more abstract element dependent on that which is more specific."/>
- <properties name="client" type="Reference" description="The element(s) dependent on the supplier element(s). In some cases (such as a Trace Abstraction) the assignment of direction (that is, the designation of the client element) is at the discretion of the modeler, and is a stipulation."/>
- </elements>
- <elements name="DirectedRelationship" supertypes="//@dataContexts.0/@elements.7">
- <properties name="source" type="Reference" description="Specifies the sources of the DirectedRelationship."/>
- <properties name="target" type="Reference" description="Specifies the targets of the DirectedRelationship."/>
- </elements>
- <elements name="Relationship" supertypes="//@dataContexts.0/@elements.1">
- <properties name="relatedElement" type="Reference" description="Specifies the elements related by the Relationship."/>
- </elements>
- <elements name="Namespace" supertypes="//@dataContexts.0/@elements.4">
- <properties name="elementImport" type="Reference" description="References the ElementImports owned by the Namespace."/>
- <properties name="packageImport" type="Reference" description="References the PackageImports owned by the Namespace."/>
- <properties name="ownedRule" type="Reference" description="Specifies a set of Constraints owned by this Namespace."/>
- <properties name="member" type="Reference" description="A collection of NamedElements identifiable within the Namespace, either by being owned or by being introduced by importing or inheritance."/>
- <properties name="importedMember" type="Reference" description="References the PackageableElements that are members of this Namespace as a result of either PackageImports or ElementImports."/>
- <properties name="ownedMember" type="Reference" description="A collection of NamedElements owned by the Namespace."/>
- </elements>
- <elements name="ElementImport" supertypes="//@dataContexts.0/@elements.6">
- <properties name="visibility" type="Enumeration" description="Specifies the visibility of the imported PackageableElement within the importing Package. The default visibility is the same as that of the imported element. If the imported element does not have a visibility, it is possible to add visibility to the element import."/>
- <properties name="alias" description="Specifies the name that should be added to the namespace of the importing package in lieu of the name of the imported packagable element. The aliased name must not clash with any other member name in the importing package. By default, no alias is used."/>
- <properties name="importedElement" type="Reference" description="Specifies the PackageableElement whose name is to be added to a Namespace."/>
- <properties name="importingNamespace" type="Reference" description="Specifies the Namespace that imports a PackageableElement from another Package."/>
- </elements>
- <elements name="PackageImport" supertypes="//@dataContexts.0/@elements.6">
- <properties name="visibility" type="Enumeration" description="Specifies the visibility of the imported PackageableElements within the importing Namespace, i.e., whether imported elements will in turn be visible to other packages that use that importingPackage as an importedPackage. If the PackageImport is public, the imported elements will be visible outside the package, while if it is private they will not."/>
- <properties name="importedPackage" type="Reference" description="Specifies the Package whose members are imported into a Namespace."/>
- <properties name="importingNamespace" type="Reference" description="Specifies the Namespace that imports the members from a Package."/>
- </elements>
- <elements name="Constraint" supertypes="//@dataContexts.0/@elements.3">
- <properties name="constrainedElement" type="Reference" description="The ordered set of Elements referenced by this Constraint."/>
- <properties name="specification" type="Reference" description="A condition that must be true when evaluated in order for the constraint to be satisfied."/>
- <properties name="context" type="Reference" description="Specifies the namespace that owns the NamedElement."/>
- </elements>
- <elements name="ValueSpecification" supertypes="//@dataContexts.0/@elements.3 //@dataContexts.0/@elements.13"/>
- <elements name="TypedElement" supertypes="//@dataContexts.0/@elements.4">
- <properties name="type" type="Reference" description="This information is derived from the return result for this Operation.&#xD;&#xA;The type of the TypedElement."/>
- </elements>
- <elements name="Type" supertypes="//@dataContexts.0/@elements.3">
- <properties name="package" type="Reference" description="Specifies the owning package of this classifier, if any."/>
- </elements>
- <elements name="Association" supertypes="//@dataContexts.0/@elements.16 //@dataContexts.0/@elements.7">
- <properties name="ownedEnd" type="Reference" description="The ends that are owned by the association itself."/>
- <properties name="memberEnd" type="Reference" description="Each end represents participation of instances of the classifier connected to the end in links of the association."/>
- <properties name="isDerived" description="Specifies whether the association is derived from other model elements such as other associations or constraints."/>
- <properties name="endType" type="Reference" description="References the classifiers that are used as types of the ends of the association."/>
- <properties name="navigableOwnedEnd" type="Reference" description="The navigable ends that are owned by the association itself."/>
- </elements>
- <elements name="Classifier" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.17 //@dataContexts.0/@elements.14 //@dataContexts.0/@elements.18">
- <properties name="isAbstract" type="Boolean" description="If true, the Classifier does not provide a complete declaration and can typically not be instantiated. An abstract classifier is intended to be used by other classifiers e.g. as the target of general metarelationships or generalization relationships.&#xD;&#xA;"/>
- <properties name="generalization" type="Reference" description="Specifies the Generalization relationships for this Classifier. These Generalizations navigaten to more general classifiers in the generalization hierarchy."/>
- <properties name="powertypeExtent" type="Reference" description="Designates the GeneralizationSet of which the associated Classifier is a power type."/>
- <properties name="feature" type="Reference" description="Note that there may be members of the Classifier that are of the type Feature but are not included in this association, e.g. inherited features.&#xD;&#xA;Specifies each feature defined in the classifier."/>
- <properties name="inheritedMember" type="Reference" description="Specifies all elements inherited by this classifier from the general classifiers."/>
- <properties name="redefinedClassifier" type="Reference" description="References the Classifiers that are redefined by this Classifier."/>
- <properties name="general" type="Reference" description="References the general classifier in the Generalization relationship.&#xD;&#xA;Specifies the general Classifiers for this Classifier."/>
- <properties name="substitution" type="Reference" description="References the substitutions that are owned by this Classifier."/>
- <properties name="attribute" type="Reference" description="Refers to all of the Properties that are direct (i.e. not inherited or imported) attributes of the classifier."/>
- <properties name="representation" type="Reference" description="References a collaboration use which indicates the collaboration that represents this classifier."/>
- <properties name="collaborationUse" type="Reference" description="References the collaboration uses owned by the classifier."/>
- <properties name="ownedUseCase" type="Reference" description="References the use cases owned by this classifier."/>
- <properties name="useCase" type="Reference" description="The set of use cases for which this Classifier is the subject."/>
- <properties name="isFinalSpecialization" type="Boolean" description="If true, the Classifier cannot be specialized by generalization. Note that this property is preserved through package merge operations; that is, the capability to specialize a Classifier (i.e., isFinalSpecialization =false) must be preserved in the resulting Classifier of a package merge operation where a Classifier with isFinalSpecialization =false is merged with a matching Classifier with isFinalSpecialization =true: the resulting Classifier will have isFinalSpecialization=false. Default is false."/>
- </elements>
- <elements name="RedefinableElement" supertypes="//@dataContexts.0/@elements.4">
- <properties name="isLeaf" description="Indicates whether it is possible to further specialize a RedefinableElement. If the value is true, then it is not possible to further specialize the RedefinableElement."/>
- <properties name="redefinedElement" type="Reference" description="The redefinable element that is being redefined by this element."/>
- <properties name="redefinitionContext" type="Reference" description="References the contexts that this element may be redefined from."/>
- </elements>
- <elements name="TemplateableElement" supertypes="//@dataContexts.0/@elements.1">
- <properties name="templateBinding" type="Reference" description="The optional bindings from this element to templates."/>
- <properties name="ownedTemplateSignature" type="Reference" description="The optional template signature specifying the formal template parameters."/>
- </elements>
- <elements name="TemplateBinding" supertypes="//@dataContexts.0/@elements.6">
- <properties name="signature" type="Reference" description="The template signature for the template that is the target of the binding."/>
- <properties name="parameterSubstitution" type="Reference" description="The parameter substitutions owned by this template binding."/>
- <properties name="boundElement" type="Reference" description="The element that is bound by this binding."/>
- </elements>
- <elements name="TemplateSignature" supertypes="//@dataContexts.0/@elements.1">
- <properties name="parameter" type="Reference" description="The ordered set of all formal template parameters for this template signature."/>
- <properties name="ownedParameter" type="Reference" description="The formal template parameters that are owned by this template signature."/>
- <properties name="template" type="Reference" description="The element that owns this template signature."/>
- </elements>
- <elements name="TemplateParameter" supertypes="//@dataContexts.0/@elements.1">
- <properties name="signature" type="Reference" description="The template signature that owns this template parameter."/>
- <properties name="parameteredElement" type="Reference" description="The element exposed by this template parameter."/>
- <properties name="ownedParameteredElement" type="Reference" description="The element that is owned by this template parameter."/>
- <properties name="default" type="Reference" description="The element that is the default for this formal template parameter."/>
- <properties name="ownedDefault" type="Reference" description="The element that is owned by this template parameter for the purpose of providing a default."/>
- </elements>
- <elements name="ParameterableElement" supertypes="//@dataContexts.0/@elements.1">
- <properties name="owningTemplateParameter" type="Reference" description="The formal template parameter that owns this element."/>
- <properties name="templateParameter" type="Reference" description="The template parameter that exposes this element as a formal parameter."/>
- </elements>
- <elements name="TemplateParameterSubstitution" supertypes="//@dataContexts.0/@elements.1">
- <properties name="formal" type="Reference" description="The formal template parameter that is associated with this substitution."/>
- <properties name="actual" type="Reference" description="The element that is the actual parameter for this substitution."/>
- <properties name="ownedActual" type="Reference" description="The actual parameter that is owned by this substitution."/>
- <properties name="templateBinding" type="Reference" description="The optional bindings from this element to templates."/>
- </elements>
- <elements name="Generalization" supertypes="//@dataContexts.0/@elements.6">
- <properties name="isSubstitutable" description="Indicates whether the specific classifier can be used wherever the general classifier can be used. If true, the execution traces of the specific classifier will be a superset of the execution traces of the general classifier."/>
- <properties name="general" type="Reference" description="References the general classifier in the Generalization relationship."/>
- <properties name="generalizationSet" type="Reference" description="Designates a set in which instances of Generalization is considered members."/>
- <properties name="specific" type="Reference" description="References the specializing classifier in the Generalization relationship."/>
- </elements>
- <elements name="GeneralizationSet" supertypes="//@dataContexts.0/@elements.3">
- <properties name="isCovering" description="Indicates (via the associated Generalizations) whether or not the set of specific Classifiers are covering for a particular general classifier. When isCovering is true, every instance of a particular general Classifier is also an instance of at least one of its specific Classifiers for the GeneralizationSet. When isCovering is false, there are one or more instances of the particular general Classifier that are not instances of at least one of its specific Classifiers defined for the GeneralizationSet."/>
- <properties name="isDisjoint" description="Indicates whether or not the set of specific Classifiers in a Generalization relationship have instance in common. If isDisjoint is true, the specific Classifiers for a particular GeneralizationSet have no members in common; that is, their intersection is empty. If isDisjoint is false, the specific Classifiers in a particular GeneralizationSet have one or more members in common; that is, their intersection is not empty. For example, Person could have two Generalization relationships, each with the different specific Classifier: Manager or Staff. This would be disjoint because every instance of Person must either be a Manager or Staff. In contrast, Person could have two Generalization relationships involving two specific (and non-covering) Classifiers: Sales Person and Manager. This GeneralizationSet would not be disjoint because there are instances of Person which can be a Sales Person and a Manager."/>
- <properties name="powertype" type="Reference" description="Designates the Classifier that is defined as the power type for the associated GeneralizationSet."/>
- <properties name="generalization" type="Reference" description="Designates the instances of Generalization which are members of a given GeneralizationSet."/>
- </elements>
- <elements name="Feature" supertypes="//@dataContexts.0/@elements.17">
- <properties name="isStatic" description="Specifies whether this feature characterizes individual instances classified by the classifier (false) or the classifier itself (true)."/>
- <properties name="featuringClassifier" type="Reference" description="The Classifiers that have this Feature as a feature."/>
- </elements>
- <elements name="Substitution" supertypes="//@dataContexts.0/@elements.28">
- <properties name="contract" type="Reference" description="The contract with which the substituting classifier complies."/>
- <properties name="substitutingClassifier" type="Reference" description="Instances of the substituting classifier are runtime substitutable where instances of the contract classifier are expected."/>
- </elements>
- <elements name="Realization" supertypes="//@dataContexts.0/@elements.29"/>
- <elements name="Abstraction" supertypes="//@dataContexts.0/@elements.5">
- <properties name="mapping" type="Reference" description="An composition of an Expression that states the abstraction relationship between the supplier and the client. In some cases, such as Derivation, it is usually formal and unidirectional; in other cases, such as Trace, it is usually informal and bidirectional. The mapping expression is optional and may be omitted if the precise relationship between the elements is not specified."/>
- </elements>
- <elements name="OpaqueExpression" supertypes="//@dataContexts.0/@elements.12">
- <properties name="body" description="The text of the expression, possibly in multiple languages."/>
- <properties name="language" description="Specifies the languages in which the expression is stated. The interpretation of the expression body depends on the languages. If the languages are unspecified, they might be implicit from the expression body or the context. Languages are matched to body strings by order."/>
- <properties name="result" type="Reference" description="Restricts an opaque expression to return exactly one return result. When the invocation of the opaque expression completes, a single set of values is returned to its owner. This association is derived from the single return result parameter of the associated behavior."/>
- <properties name="behavior" type="Reference" description="Specifies the behavior of the opaque expression."/>
- </elements>
- <elements name="Parameter" supertypes="//@dataContexts.0/@elements.33 //@dataContexts.0/@elements.32">
- <properties name="parameterSet" type="Reference" description="The parameter sets containing the parameter. See ParameterSet."/>
- <properties name="operation" type="Reference" description="References the Operation owning this parameter."/>
- <properties name="direction" type="Enumeration" description="Indicates whether a parameter is being sent into or out of a behavioral element."/>
- <properties name="default" description="Specifies a String that represents a value to be used when no argument is supplied for the Parameter."/>
- <properties name="defaultValue" type="Reference" description="Specifies a ValueSpecification that represents a value to be used when no argument is supplied for the Parameter."/>
- <properties name="isException" description="Tells whether an output parameter may emit a value to the exclusion of the other outputs."/>
- <properties name="isStream" description="Tells whether an input parameter may accept values while its behavior is executing, or whether an output parameter post values while the behavior is executing."/>
- <properties name="effect" type="Enumeration" description="Specifies the effect that the owner of the parameter has on values passed in or out of the parameter."/>
- </elements>
- <elements name="MultiplicityElement" supertypes="//@dataContexts.0/@elements.1 //@dataContexts.1 //@dataContexts.2">
- <properties name="isOrdered" description="For a multivalued multiplicity, this attribute specifies whether the values in an instantiation of this element are sequentially ordered."/>
- <properties name="isUnique" description="For a multivalued multiplicity, this attributes specifies whether the values in an instantiation of this element are unique."/>
- <properties name="upper" description="Specifies the upper bound of the multiplicity interval."/>
- <properties name="lower" description="Specifies the lower bound of the multiplicity interval."/>
- <properties name="upperValue" type="Reference" description="The specification of the upper bound for this multiplicity."/>
- <properties name="lowerValue" type="Reference" description="The specification of the lower bound for this multiplicity."/>
- </elements>
- <elements name="ConnectableElement" supertypes="//@dataContexts.0/@elements.13 //@dataContexts.0/@elements.22">
- <properties name="end" type="Reference" description="Denotes a connector that attaches to this connectable element."/>
- </elements>
- <elements name="ConnectorEnd" supertypes="//@dataContexts.0/@elements.32">
- <properties name="definingEnd" type="Reference" description="A derived association referencing the corresponding association end on the association which types the connector owing this connector end. This association is derived by selecting the association end at the same place in the ordering of association ends as this connector end.&#xD;&#xA;"/>
- <properties name="role" type="Reference" description="The connectable element attached at this connector end. When an instance of the containing classifier is created, a link may (depending on the multiplicities) be created to an instance of the classifier that types this connectable element.&#xD;&#xA;"/>
- <properties name="partWithPort" type="Reference" description="Indicates the role of the internal structure of a classifier with the port to which the connector end is attached."/>
- </elements>
- <elements name="Property" supertypes="//@dataContexts.0/@elements.75 //@dataContexts.0/@elements.33 //@dataContexts.0/@elements.36">
- <properties name="class" type="Reference" description="References the Class that owns the Property."/>
- <properties name="datatype" type="Reference" description="The DataType that owns this Property."/>
- <properties name="isDerived" description="If isDerived is true, the value of the attribute is derived from information elsewhere.&#xD;&#xA;Specifies whether the Property is derived, i.e., whether its value or values can be computed from other information."/>
- <properties name="isDerivedUnion" description="Specifies whether the property is derived as the union of all of the properties that are constrained to subset it."/>
- <properties name="default" description="Specifies a String that represents a value to be used when no argument is supplied for the Property.&#xD;&#xA;A String that is evaluated to give a default value for the Property when an object of the owning Classifier is instantiated."/>
- <properties name="aggregation" type="Enumeration" description="Specifies the kind of aggregation that applies to the Property."/>
- <properties name="isComposite" description="If isComposite is true, the object containing the attribute is a container for the object or value contained in the attribute.&#xD;&#xA;This is a derived value, indicating whether the aggregation of the Property is composite or not."/>
- <properties name="redefinedProperty" type="Reference" description="References the properties that are redefined by this property."/>
- <properties name="owningAssociation" type="Reference" description="References the owning association of this property, if any."/>
- <properties name="defaultValue" type="Reference" description="A ValueSpecification that is evaluated to give a default value for the Property when an object of the owning Classifier is instantiated."/>
- <properties name="opposite" type="Reference" description="In the case where the property is one navigable end of a binary association with both ends navigable, this gives the other end."/>
- <properties name="subsettedProperty" type="Reference" description="References the properties of which this property is constrained to be a subset."/>
- <properties name="association" type="Reference" description="References the association of which this property is a member, if any."/>
- <properties name="qualifier" type="Reference" description="An optional list of ordered qualifier attributes for the end. If the list is empty, then the Association is not qualified."/>
- <properties name="associationEnd" type="Reference" description="Designates the optional association end that owns a qualifier attribute."/>
- <properties name="interface" type="Reference"/>
- <properties name="isID" type="Boolean"/>
- </elements>
- <elements name="DeploymentTarget" supertypes="//@dataContexts.0/@elements.4">
- <properties name="deployment" type="Reference" description="The set of Deployments for a DeploymentTarget."/>
- <properties name="deployedElement" type="Reference" description="The set of elements that are manifested in an Artifact that is involved in Deployment to a DeploymentTarget."/>
- </elements>
- <elements name="Deployment" supertypes="//@dataContexts.0/@elements.5">
- <properties name="deployedArtifact" type="Reference" description="The Artifacts that are deployed onto a Node. This association specializes the supplier association."/>
- <properties name="configuration" type="Reference" description="The specification of properties that parameterize the deployment and execution of one or more Artifacts."/>
- <properties name="location" type="Reference" description="The DeployedTarget which is the target of a Deployment."/>
- </elements>
- <elements name="DeployedArtifact" supertypes="//@dataContexts.0/@elements.4"/>
- <elements name="DeploymentSpecification" supertypes="//@dataContexts.0/@elements.40">
- <properties name="deploymentLocation" description="The location where an Artifact is deployed onto a Node. This is typically a 'directory' or 'memory address'."/>
- <properties name="executionLocation" description="The location where a component Artifact executes. This may be a local or remote location."/>
- <properties name="deployment" type="Reference" description="The deployment with which the DeploymentSpecification is associated."/>
- </elements>
- <elements name="Artifact" supertypes="//@dataContexts.0/@elements.16 //@dataContexts.0/@elements.38">
- <properties name="fileName" description="A concrete name that is used to refer to the Artifact in a physical context. Example: file system name, universal resource locator."/>
- <properties name="nestedArtifact" type="Reference" description="The Artifacts that are defined (nested) within the Artifact.&#xD;&#xA;The association is a specialization of the ownedMember association from Namespace to NamedElement.&#xD;&#xA;"/>
- <properties name="manifestation" type="Reference" description="The set of model elements that are manifested in the Artifact. That is, these model elements are utilized in the construction (or generation) of the artifact."/>
- <properties name="ownedOperation" type="Reference" description="The Operations defined for the Artifact. The association is a specialization of the ownedMember association."/>
- <properties name="ownedAttribute" type="Reference" description="The attributes or association ends defined for the Artifact.&#xD;&#xA;The association is a specialization of the ownedMember association.&#xD;&#xA;"/>
- </elements>
- <elements name="Manifestation" supertypes="//@dataContexts.0/@elements.29">
- <properties name="utilizedElement" type="Reference" description="The model element that is utilized in the manifestation in an Artifact."/>
- </elements>
- <elements name="Operation" supertypes="//@dataContexts.0/@elements.43 //@dataContexts.0/@elements.22 //@dataContexts.0/@elements.18">
- <properties name="interface" type="Reference" description="The Interface that owns this Operation."/>
- <properties name="class" type="Reference" description="The class that owns the operation."/>
- <properties name="isQuery" description="Specifies whether an execution of the BehavioralFeature leaves the state of the system unchanged (isQuery=true) or whether side effects may occur (isQuery=false)."/>
- <properties name="isOrdered" description="This information is derived from the return result for this Operation.&#xD;&#xA;Specifies whether the return parameter is ordered or not, if present."/>
- <properties name="isUnique" description="This information is derived from the return result for this Operation.&#xD;&#xA;Specifies whether the return parameter is unique or not, if present."/>
- <properties name="lower" description="This information is derived from the return result for this Operation.&#xD;&#xA;Specifies the lower multiplicity of the return parameter, if present."/>
- <properties name="upper" description="This information is derived from the return result for this Operation.&#xD;&#xA;Specifies the upper multiplicity of the return parameter, if present."/>
- <properties name="precondition" type="Reference" description="An optional set of Constraints on the state of the system when the Operation is invoked."/>
- <properties name="postcondition" type="Reference" description="An optional set of Constraints specifying the state of the system when the Operation is completed."/>
- <properties name="redefinedOperation" type="Reference" description="References the Operations that are redefined by this Operation."/>
- <properties name="datatype" type="Reference" description="The DataType that owns this Operation."/>
- <properties name="bodyCondition" type="Reference" description="An optional Constraint on the result values of an invocation of this Operation."/>
- <properties name="type" type="Reference" description="This information is derived from the return result for this Operation.&#xD;&#xA;Specifies the return result of the operation, if present."/>
- </elements>
- <elements name="BehavioralFeature" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.26">
- <properties name="ownedParameter" type="Reference" description="Specifies the ordered set of formal parameters of this BehavioralFeature."/>
- <properties name="isAbstract" description="If true, then the behavioral feature does not have an implementation, and one must be supplied by a more specific element. If false, the behavioral feature must have an implementation in the classifier or one must be inherited from a more general element."/>
- <properties name="method" type="Reference" description="A behavioral description that implements the behavioral feature. There may be at most one behavior for a particular pairing of a classifier (as owner of the behavior) and a behavioral feature (as specification of the behavior)."/>
- <properties name="concurrency" type="Enumeration" description="Specifies the semantics of concurrent calls to the same passive instance (i.e., an instance originating from a class with isActive being false). Active instances control access to their own behavioral features."/>
- <properties name="raisedException" type="Reference" description="References the Types representing exceptions that may be raised during an invocation of this feature.&#xD;&#xA;The signals that the behavioral feature raises as exceptions."/>
- <properties name="ownedParameterSet" type="Reference" description="The ParameterSets owned by this BehavioralFeature."/>
- </elements>
- <elements name="Behavior" supertypes="//@dataContexts.0/@elements.45">
- <properties name="isReentrant" description="Tells whether the behavior can be invoked while it is still executing from a previous invocation."/>
- <properties name="redefinedBehavior" type="Reference" description="References a behavior that this behavior redefines. A subtype of Behavior may redefine any other subtype of Behavior. If the behavior implements a behavioral feature, it replaces the redefined behavior. If the behavior is a classifier behavior, it extends the redefined behavior."/>
- <properties name="ownedParameter" type="Reference" description="References a list of parameters to the behavior which describes the order and type of arguments that can be given when the behavior is invoked and of the values which will be returned when the behavior completes its execution.&#xD;&#xA;"/>
- <properties name="context" type="Reference" description="The classifier that is the context for the execution of the behavior. If the behavior is owned by a BehavioredClassifier, that classifier is the context. Otherwise, the context is the first BehavioredClassifier reached by following the chain of owner relationships. For example, following this algorithm, the context of an entry action in a state machine is the classifier that owns the state machine. The features of the context classifier as well as the elements visible to the context classifier are visible to the behavior."/>
- <properties name="precondition" type="Reference" description="An optional set of Constraints specifying what must be fulfilled when the behavior is invoked."/>
- <properties name="postcondition" type="Reference" description="An optional set of Constraints specifying what is fulfilled after the execution of the behavior is completed, if its precondition was fulfilled before its invocation."/>
- <properties name="ownedParameterSet" type="Reference" description="The ParameterSets owned by this Behavior."/>
- <properties name="specification" type="Reference" description="Designates a behavioral feature that the behavior implements. The behavioral feature must be owned by the classifier that owns the behavior or be inherited by it. The parameters of the behavioral feature and the implementing behavior must match. A behavior does not need to have a specification, in which case it either is the classifer behavior of a BehavioredClassifier or it can only be invoked by another behavior of the classifier."/>
- </elements>
- <elements name="Class" supertypes="//@dataContexts.0/@elements.63 //@dataContexts.0/@elements.46">
- <properties name="nestedClassifier" type="Reference" description="References all the Classifiers that are defined (nested) within the Class."/>
- <properties name="ownedOperation" type="Reference" description="The operations owned by the class."/>
- <properties name="superClass" type="Reference" description="This gives the superclasses of a class."/>
- <properties name="isActive" description="Determines whether an object specified by this class is active or not. If true, then the owning class is referred to as an active class. If false, then such a class is referred to as a passive class."/>
- <properties name="ownedReception" type="Reference" description="Receptions that objects of this class are willing to accept."/>
- <properties name="extension" type="Reference" description="References the Extensions that specify additional properties of the metaclass. The property is derived from the extensions whose memberEnds are typed by the Class."/>
- </elements>
- <elements name="BehavioredClassifier" supertypes="//@dataContexts.0/@elements.16">
- <properties name="ownedBehavior" type="Reference" description="References behavior specifications owned by a classifier."/>
- <properties name="classifierBehavior" type="Reference" description="A behavior specification that specifies the behavior of the classifier itself."/>
- <properties name="interfaceRealization" type="Reference" description="The set of InterfaceRealizations owned by the BehavioredClassifier. Interface realizations reference the Interfaces of which the BehavioredClassifier is an implementation."/>
- </elements>
- <elements name="InterfaceRealization" supertypes="//@dataContexts.0/@elements.28">
- <properties name="contract" type="Reference" description="References the Interface specifying the conformance contract."/>
- <properties name="implementingClassifier" type="Reference" description="References the BehavioredClassifier that owns this Interfacerealization (i.e., the classifier that realizes the Interface to which it points)."/>
- </elements>
- <elements name="Interface" supertypes="//@dataContexts.0/@elements.16">
- <properties name="ownedAttribute" type="Reference" description="The attributes (i.e. the properties) owned by the class."/>
- <properties name="ownedOperation" type="Reference" description="The operations owned by the class."/>
- <properties name="nestedClassifier" type="Reference" description="References all the Classifiers that are defined (nested) within the Class."/>
- <properties name="redefinedInterface" type="Reference" description="References all the Interfaces redefined by this Interface."/>
- <properties name="ownedReception" type="Reference" description="Receptions that objects providing this interface are willing to accept."/>
- <properties name="protocol" type="Reference" description="References a protocol state machine specifying the legal sequences of the invocation of the behavioral features described in the interface."/>
- </elements>
- <elements name="Reception" supertypes="//@dataContexts.0/@elements.43">
- <properties name="signal" type="Reference" description="The signal that this reception handles."/>
- </elements>
- <elements name="Signal" supertypes="//@dataContexts.0/@elements.16">
- <properties name="ownedAttribute" type="Reference" description="The attributes owned by the signal."/>
- </elements>
- <elements name="ProtocolStateMachine" supertypes="//@dataContexts.0/@elements.52">
- <properties name="conformance" type="Reference" description="Conformance between protocol state machines."/>
- </elements>
- <elements name="StateMachine" supertypes="//@dataContexts.0/@elements.44">
- <properties name="region" type="Reference" description="The regions owned directly by the state machine."/>
- <properties name="submachineState" type="Reference" description="References the submachine(s) in case of a submachine state. Multiple machines are referenced in case of a concurrent state."/>
- <properties name="connectionPoint" type="Reference" description="The connection points defined for this state machine. They represent the interface of the state machine when used as part of submachine state."/>
- <properties name="extendedStateMachine" type="Reference" description="The state machines of which this is an extension."/>
- </elements>
- <elements name="Region" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.17">
- <properties name="subvertex" type="Reference" description="The set of vertices that are owned by this region."/>
- <properties name="transition" type="Reference" description="The set of transitions owned by the region. Note that internal transitions are owned by a region, but applies to the source state."/>
- <properties name="state" type="Reference" description="The State that owns the Region. If a Region is owned by a State, then it cannot also be owned by a StateMachine."/>
- <properties name="extendedRegion" type="Reference" description="The region of which this region is an extension."/>
- <properties name="stateMachine" type="Reference" description="The StateMachine that owns the Region. If a Region is owned by a StateMachine, then it cannot also be owned by a State."/>
- </elements>
- <elements name="Vertex" supertypes="//@dataContexts.0/@elements.4">
- <properties name="outgoing" type="Reference" description="Specifies the transitions departing from this vertex."/>
- <properties name="incoming" type="Reference" description="Specifies the transitions entering this vertex."/>
- <properties name="container" type="Reference" description="The region that contains this vertex."/>
- </elements>
- <elements name="Transition" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.17">
- <properties name="kind" type="Enumeration" description="Indicates the precise type of the transition."/>
- <properties name="container" type="Reference" description="Designates the region that owns this transition."/>
- <properties name="source" type="Reference" description="Designates the originating vertex (state or pseudostate) of the transition."/>
- <properties name="target" type="Reference" description="Designates the target vertex that is reached when the transition is taken."/>
- <properties name="redefinedTransition" type="Reference" description="The transition that is redefined by this transition."/>
- <properties name="guard" type="Reference" description="A guard is a constraint that provides a fine-grained control over the firing of the transition. The guard is evaluated when an event occurrence is dispatched by the state machine. If the guard is true at that time, the transition may be enabled, otherwise, it is disabled. Guards should be pure expressions without side effects. Guard expressions with side effects are ill formed."/>
- <properties name="effect" type="Reference" description="Specifies an optional behavior to be performed when the transition fires."/>
- <properties name="trigger" type="Reference" description="Specifies the triggers that may fire the transition."/>
- </elements>
- <elements name="Trigger" supertypes="//@dataContexts.0/@elements.4">
- <properties name="event" type="Reference" description="The event that causes the trigger."/>
- <properties name="port" type="Reference" description="A optional port of the receiver object on which the behavioral feature is invoked."/>
- </elements>
- <elements name="Event" supertypes="//@dataContexts.0/@elements.3"/>
- <elements name="Port" supertypes="//@dataContexts.0/@elements.35">
- <properties name="isBehavior" description="Specifies whether requests arriving at this port are sent to the classifier behavior of this classifier. Such ports are referred to as behavior port. Any invocation of a behavioral feature targeted at a behavior port will be handled by the instance of the owning classifier itself, rather than by any instances that this classifier may contain."/>
- <properties name="isService" description="If true indicates that this port is used to provide the published functionality of a classifier; if false, this port is used to implement the classifier but is not part of the essential externally-visible functionality of the classifier and can, therefore, be altered or deleted along with the internal implementation of the classifier and other properties that are considered part of its implementation."/>
- <properties name="required" type="Reference" description="References the interfaces specifying the set of operations and receptions which the classifier expects its environment to handle. This association is derived as the set of interfaces required by the type of the port or its supertypes."/>
- <properties name="redefinedPort" type="Reference" description="A port may be redefined when its containing classifier is specialized. The redefining port may have additional interfaces to those that are associated with the redefined port or it may replace an interface by one of its subtypes."/>
- <properties name="provided" type="Reference" description="References the interfaces specifying the set of operations and receptions which the classifier offers to its environment, and which it will handle either directly or by forwarding it to a part of its internal structure. This association is derived from the interfaces realized by the type of the port or by the type of the port, if the port was typed by an interface.&#xD;&#xA;"/>
- <properties name="protocol" type="Reference" description="References an optional protocol state machine which describes valid interactions at this interaction point."/>
- <properties name="isConjugated" type="Boolean"/>
- </elements>
- <elements name="State" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.17 //@dataContexts.0/@elements.54">
- <properties name="isComposite" description="A state with isComposite=true is said to be a composite state. A composite state is a state that contains at least one region."/>
- <properties name="isOrthogonal" description="A state with isOrthogonal=true is said to be an orthogonal composite state. An orthogonal composite state contains two or more regions."/>
- <properties name="isSimple" description="A state with isSimple=true is said to be a simple state. A simple state does not have any regions and it does not refer to any submachine state machine."/>
- <properties name="isSubmachineState" description="A state with isSubmachineState=true is said to be a submachine state. Such a state refers to a state machine (submachine)."/>
- <properties name="submachine" type="Reference" description="The state machine that is to be inserted in place of the (submachine) state."/>
- <properties name="connection" type="Reference" description="The entry and exit connection points used in conjunction with this (submachine) state, i.e. as targets and sources, respectively, in the region with the submachine state. A connection point reference references the corresponding definition of a connection point pseudostate in the statemachine referenced by the submachinestate."/>
- <properties name="connectionPoint" type="Reference" description="The entry and exit pseudostates of a composite state. These can only be entry or exit Pseudostates, and they must have different names. They can only be defined for composite states."/>
- <properties name="redefinedState" type="Reference" description="The state of which this state is a redefinition."/>
- <properties name="stateInvariant" type="Reference" description="Specifies conditions that are always true when this state is the current state. In protocol state machines, state invariants are additional conditions to the preconditions of the outgoing transitions, and to the postcondition of the incoming transitions.&#xD;&#xA;"/>
- <properties name="entry" type="Reference" description="An optional behavior that is executed whenever this state is entered regardless of the transition taken to reach the state. If defined, entry actions are always executed to completion prior to any internal behavior or transitions performed within the state.&#xD;&#xA;"/>
- <properties name="exit" type="Reference" description="An optional behavior that is executed whenever this state is exited regardless of which transition was taken out of the state. If defined, exit actions are always executed to completion only after all internal activities and transition actions have completed execution."/>
- <properties name="doActivity" type="Reference" description="An optional behavior that is executed while being in the state. The execution starts when this state is entered, and stops either by itself, or when the state is exited, whichever comes first."/>
- <properties name="deferrableTrigger" type="Reference" description="A list of triggers that are candidates to be retained by the state machine if they trigger no transitions out of the state (not consumed). A deferred trigger is retained until the state machine reaches a state configuration where it is no longer deferred.&#xD;&#xA;"/>
- <properties name="region" type="Reference" description="The regions owned directly by the state."/>
- </elements>
- <elements name="ConnectionPointReference" supertypes="//@dataContexts.0/@elements.54">
- <properties name="entry" type="Reference" description="The entryPoint kind pseudo states corresponding to this connection point."/>
- <properties name="exit" type="Reference" description="The exitPoints kind pseudo states corresponding to this connection point."/>
- <properties name="state" type="Reference" description="The State in which the connection point refreshens are defined."/>
- </elements>
- <elements name="Pseudostate" supertypes="//@dataContexts.0/@elements.54">
- <properties name="kind" type="Enumeration" description="Determines the precise type of the Pseudostate and can be one of: entryPoint, exitPoint, initial, deepHistory, shallowHistory, join, fork, junction, terminate or choice."/>
- <properties name="stateMachine" type="Reference" description="The StateMachine in which this Pseudostate is defined. This only applies to Pseudostates of the kind entryPoint or exitPoint."/>
- <properties name="state" type="Reference" description="The State that owns this pseudostate and in which it appears."/>
- </elements>
- <elements name="ProtocolConformance" supertypes="//@dataContexts.0/@elements.6">
- <properties name="generalMachine" type="Reference" description="Specifies the protocol state machine to which the specific state machine conforms."/>
- <properties name="specificMachine" type="Reference" description="Specifies the state machine which conforms to the general state machine."/>
- </elements>
- <elements name="EncapsulatedClassifier" supertypes="//@dataContexts.0/@elements.64">
- <properties name="ownedPort" type="Reference" description="References a set of ports that an encapsulated classifier owns."/>
- </elements>
- <elements name="StructuredClassifier" supertypes="//@dataContexts.0/@elements.16">
- <properties name="ownedAttribute" type="Reference" description="References the properties owned by the classifier."/>
- <properties name="part" type="Reference" description="References the properties specifying instances that the classifier owns by composition. This association is derived, selecting those owned properties where isComposite is true."/>
- <properties name="role" type="Reference" description="References the roles that instances may play in this classifier."/>
- <properties name="ownedConnector" type="Reference" description="References the connectors owned by the classifier."/>
- </elements>
- <elements name="Connector" supertypes="//@dataContexts.0/@elements.26">
- <properties name="type" type="Reference" description="An optional association that specifies the link corresponding to this connector."/>
- <properties name="redefinedConnector" type="Reference" description="A connector may be redefined when its containing classifier is specialized. The redefining connector may have a type that specializes the type of the redefined connector. The types of the connector ends of the redefining connector may specialize the types of the connector ends of the redefined connector. The properties of the connector ends of the redefining connector may be replaced."/>
- <properties name="end" type="Reference" description="A connector consists of at least two connector ends, each representing the participation of instances of the classifiers typing the connectable elements attached to this end. The set of connector ends is ordered."/>
- <properties name="kind" type="Enumeration" description="Indicates the kind of connector."/>
- <properties name="contract" type="Reference" description="The set of Behaviors that specify the valid interaction patterns across the connector."/>
- </elements>
- <elements name="Extension" supertypes="//@dataContexts.0/@elements.15">
- <properties name="isRequired" description="Indicates whether an instance of the extending stereotype must be created when an instance of the extended class is created. The attribute value is derived from the multiplicity of the Property referenced by Extension::ownedEnd; a multiplicity of 1 means that isRequired is true, but otherwise it is false. Since the default multiplicity of an ExtensionEnd is 0..1, the default value of isRequired is false."/>
- <properties name="metaclass" type="Reference" description="References the Class that is extended through an Extension. The property is derived from the type of the memberEnd that is not the ownedEnd."/>
- </elements>
- <elements name="ExtensionEnd" supertypes="//@dataContexts.0/@elements.35"/>
- <elements name="Stereotype" supertypes="//@dataContexts.0/@elements.45">
- <properties name="icon" type="Reference" description="Stereotype can change the graphical appearance of the extended model element by using attached icons. When this association is not null, it references the location of the icon content to be displayed within diagrams presenting the extended model elements."/>
- </elements>
- <elements name="Image" supertypes="//@dataContexts.0/@elements.1">
- <properties name="content" description="This contains the serialization of the image according to the format. The value could represent a bitmap, image such as a GIF file, or drawing 'instructions' using a standard such as Scalable Vector Graphic (SVG) (which is XML based)."/>
- <properties name="location" description="This contains a location that can be used by a tool to locate the image as an alternative to embedding it in the stereotype."/>
- <properties name="format" description="This indicates the format of the content - which is how the string content should be interpreted. The following values are reserved: SVG, GIF, PNG, JPG, WMF, EMF, BMP.&#xD;&#xA;&#xD;&#xA;In addition the prefix 'MIME: ' is also reserved. This option can be used as an alternative to express the reserved values above, for example &quot;SVG&quot; could instead be expressed as &quot;MIME: image/svg+xml&quot;."/>
- </elements>
- <elements name="Profile" supertypes="//@dataContexts.0/@elements.2">
- <properties name="metaclassReference" type="Reference" description="References a metaclass that may be extended."/>
- <properties name="metamodelReference" type="Reference" description="References a package containing (directly or indirectly) metaclasses that may be extended."/>
- </elements>
- <elements name="Model" supertypes="//@dataContexts.0/@elements.2">
- <properties name="viewpoint" description="The name of the viewpoint that is expressed by a model (This name may refer to a profile definition)."/>
- </elements>
- <elements name="ParameterSet" supertypes="//@dataContexts.0/@elements.4">
- <properties name="parameter" type="Reference" description="Parameters in the parameter set."/>
- <properties name="condition" type="Reference" description="Constraint that should be satisfied for the owner of the parameters in an input parameter set to start execution using the values provided for those parameters, or the owner of the parameters in an output parameter set to end execution providing the values for those parameters, if all preconditions and conditions on input parameter sets were satisfied."/>
- </elements>
- <elements name="DataType" supertypes="//@dataContexts.0/@elements.16">
- <properties name="ownedAttribute" type="Reference" description="The Attributes owned by the DataType."/>
- <properties name="ownedOperation" type="Reference" description="The Operations owned by the DataType."/>
- </elements>
- <elements name="OperationTemplateParameter" supertypes="//@dataContexts.0/@elements.21"/>
- <elements name="StructuralFeature" supertypes="//@dataContexts.0/@elements.26 //@dataContexts.0/@elements.13 //@dataContexts.0/@elements.32">
- <properties name="isReadOnly" description="States whether the feature's value may be modified by a client."/>
- </elements>
- <elements name="ConnectableElementTemplateParameter" supertypes="//@dataContexts.0/@elements.21"/>
- <elements name="CollaborationUse" supertypes="//@dataContexts.0/@elements.4">
- <properties name="type" type="Reference" description="The collaboration which is used in this occurrence. The collaboration defines the cooperation between its roles which are mapped to properties of the classifier owning the collaboration use."/>
- <properties name="roleBinding" type="Reference" description="A mapping between features of the collaboration type and features of the classifier or operation. This mapping indicates which connectable element of the classifier or operation plays which role(s) in the collaboration. A connectable element may be bound to multiple roles in the same collaboration use (that is, it may play multiple roles).&#xD;&#xA;"/>
- </elements>
- <elements name="Collaboration" supertypes="//@dataContexts.0/@elements.46 //@dataContexts.0/@elements.64">
- <properties name="collaborationRole" type="Reference" description="References connectable elements (possibly owned by other classifiers) which represent roles that instances may play in this collaboration."/>
- </elements>
- <elements name="UseCase" supertypes="//@dataContexts.0/@elements.46">
- <properties name="include" type="Reference" description="References the Include relationships owned by this use case."/>
- <properties name="extend" type="Reference" description="References the Extend relationships owned by this use case."/>
- <properties name="extensionPoint" type="Reference" description="References the ExtensionPoints owned by the use case."/>
- <properties name="subject" type="Reference" description="References the subjects to which this use case applies. The subject or its parts realize all the use cases that apply to this subject. Use cases need not be attached to any specific subject, however. The subject may, but need not, own the use cases that apply to it."/>
- </elements>
- <elements name="Include" supertypes="//@dataContexts.0/@elements.4 //@dataContexts.0/@elements.6">
- <properties name="addition" type="Reference" description="References the use case that is to be included.&#xD;&#xA;"/>
- <properties name="includingCase" type="Reference" description="References the use case which will include the addition and owns the include relationship."/>
- </elements>
- <elements name="Extend" supertypes="//@dataContexts.0/@elements.4 //@dataContexts.0/@elements.6">
- <properties name="extendedCase" type="Reference" description="References the use case that is being extended."/>
- <properties name="condition" type="Reference" description="References the condition that must hold when the first extension point is reached for the extension to take place. If no constraint is associated with the extend relationship, the extension is unconditional.&#xD;&#xA;"/>
- <properties name="extensionLocation" type="Reference" description="An ordered list of extension points belonging to the extended use case, specifying where the respective behavioral fragments of the extending use case are to be inserted. The first fragment in the extending use case is associated with the first extension point in the list, the second fragment with the second point, and so on. (Note that, in most practical cases, the extending use case has just a single behavior fragment, so that the list of extension points is trivial.)&#xD;&#xA;"/>
- <properties name="extension" type="Reference" description="References the use case that represents the extension and owns the extend relationship."/>
- </elements>
- <elements name="ExtensionPoint" supertypes="//@dataContexts.0/@elements.17">
- <properties name="useCase" type="Reference" description="References the use case that owns this extension point."/>
- </elements>
- <elements name="RedefinableTemplateSignature" supertypes="//@dataContexts.0/@elements.17 //@dataContexts.0/@elements.20">
- <properties name="extendedSignature" type="Reference" description="The template signature that is extended by this template signature."/>
- <properties name="inheritedParameter" type="Reference" description="The formal template parameters of the extendedSignature."/>
- <properties name="classifier" type="Reference" description="The classifier that owns this template signature."/>
- </elements>
- <elements name="ClassifierTemplateParameter" supertypes="//@dataContexts.0/@elements.21">
- <properties name="allowSubstitutable" description="Constrains the required relationship between an actual parameter and the parameteredElement for this formal parameter."/>
- <properties name="constrainingClassifier" type="Reference" description="The classifiers that constrain the argument that can be used for the parameter. If the allowSubstitutable attribute is true, then any classifier that is compatible with this constraining classifier can be substituted; otherwise, it must be either this classifier or one of its subclasses. If this property is empty, there are no constraints on the classifier that can be used as an argument."/>
- </elements>
- <elements name="StringExpression" supertypes="//@dataContexts.0/@elements.86 //@dataContexts.0/@elements.18">
- <properties name="subExpression" type="Reference" description="The StringExpressions that constitute this StringExpression."/>
- <properties name="owningExpression" type="Reference" description="The string expression of which this expression is a substring."/>
- </elements>
- <elements name="Expression" supertypes="//@dataContexts.0/@elements.12">
- <properties name="symbol" description="The symbol associated with the node in the expression tree."/>
- <properties name="operand" type="Reference" description="Specifies a sequence of operands."/>
- </elements>
- <elements name="Usage" supertypes="//@dataContexts.0/@elements.5"/>
- <elements name="PackageMerge" supertypes="//@dataContexts.0/@elements.6">
- <properties name="mergedPackage" type="Reference" description="References the Package that is to be merged with the receiving package of the PackageMerge."/>
- <properties name="receivingPackage" type="Reference" description="References the Package that is being extended with the contents of the merged package of the PackageMerge."/>
- </elements>
- <elements name="ProfileApplication" supertypes="//@dataContexts.0/@elements.6">
- <properties name="appliedProfile" type="Reference" description="References the Profiles that are applied to a Package through this ProfileApplication."/>
- <properties name="isStrict" description="Specifies that the Profile filtering rules for the metaclasses of the referenced metamodel shall be strictly applied."/>
- <properties name="applyingPackage" type="Reference" description="The package that owns the profile application."/>
- </elements>
- <elements name="Enumeration" supertypes="//@dataContexts.0/@elements.73">
- <properties name="ownedLiteral" type="Reference" description="The ordered set of literals for this Enumeration."/>
- </elements>
- <elements name="EnumerationLiteral" supertypes="//@dataContexts.0/@elements.92">
- <properties name="enumeration" type="Reference" description="The Enumeration that this EnumerationLiteral is a member of."/>
- <properties name="classifier" type="Reference" description="The classifier of this EnumerationLiteral is derived to be equal to its enumeration. Redefines InstanceSpecification::classifier."/>
- </elements>
- <elements name="InstanceSpecification" supertypes="//@dataContexts.0/@elements.36 //@dataContexts.0/@elements.3 //@dataContexts.0/@elements.38">
- <properties name="classifier" type="Reference" description="The classifier or classifiers of the represented instance. If multiple classifiers are specified, the instance is classified by all of them."/>
- <properties name="slot" type="Reference" description="A slot giving the value or values of a structural feature of the instance. An instance specification can have one slot per structural feature of its classifiers, including inherited features. It is not necessary to model a slot for each structural feature, in which case the instance specification is a partial description."/>
- <properties name="specification" type="Reference" description="A specification of how to compute, derive, or construct the instance."/>
- </elements>
- <elements name="Slot" supertypes="//@dataContexts.0/@elements.1">
- <properties name="definingFeature" type="Reference" description="The structural feature that specifies the values that may be held by the slot."/>
- <properties name="value" type="Reference" description="The value or values corresponding to the defining feature for the owning instance specification."/>
- <properties name="owningInstance" type="Reference" description="The instance specification that owns this slot."/>
- </elements>
- <elements name="PrimitiveType" supertypes="//@dataContexts.0/@elements.73"/>
- <elements name="LiteralSpecification" supertypes="//@dataContexts.0/@elements.12"/>
- <elements name="LiteralInteger" supertypes="//@dataContexts.0/@elements.95">
- <properties name="value" description="The specified Integer value."/>
- </elements>
- <elements name="LiteralString" supertypes="//@dataContexts.0/@elements.95">
- <properties name="value" description="The specified String value."/>
- </elements>
- <elements name="LiteralBoolean" supertypes="//@dataContexts.0/@elements.95">
- <properties name="value" description="The specified Boolean value."/>
- </elements>
- <elements name="LiteralNull" supertypes="//@dataContexts.0/@elements.95"/>
- <elements name="InstanceValue" supertypes="//@dataContexts.0/@elements.12">
- <properties name="instance" type="Reference" description="The instance that is the specified value."/>
- </elements>
- <elements name="LiteralUnlimitedNatural" supertypes="//@dataContexts.0/@elements.95">
- <properties name="value" description="The specified UnlimitedNatural value."/>
- </elements>
- <elements name="OpaqueBehavior" supertypes="//@dataContexts.0/@elements.44">
- <properties name="body" description="Specifies the behavior in one or more languages."/>
- <properties name="language" description="Languages the body strings use in the same order as the body strings."/>
- </elements>
- <elements name="FunctionBehavior" supertypes="//@dataContexts.0/@elements.102"/>
- <elements name="OpaqueAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="body" description="Specifies the action in one or more languages."/>
- <properties name="language" description="Languages the body strings use, in the same order as the body strings"/>
- <properties name="inputValue" type="Reference" description="Provides input to the action."/>
- <properties name="outputValue" type="Reference" description="Takes output from the action."/>
- </elements>
- <elements name="Action" supertypes="//@dataContexts.0/@elements.106">
- <properties name="output" type="Reference" description="The ordered set of output pins connected to the Action. The action places its results onto pins in this set."/>
- <properties name="input" type="Reference" description="The ordered set of input pins connected to the Action. These are among the total set of inputs."/>
- <properties name="context" type="Reference" description="The classifier that owns the behavior of which this action is a part."/>
- <properties name="localPrecondition" type="Reference" description="Constraint that must be satisfied when execution is started."/>
- <properties name="localPostcondition" type="Reference" description="Constraint that must be satisfied when executed is completed."/>
- <properties name="isLocallyReentrant" type="Boolean" description="If true, the action can begin a new, concurrent execution, even if there is already another execution of the action ongoing. If false, the action cannot begin a new execution until any previous execution has completed. The default is false."/>
- </elements>
- <elements name="ExecutableNode" supertypes="//@dataContexts.0/@elements.107">
- <properties name="handler" type="Reference" description="A set of exception handlers that are examined if an uncaught exception propagates to the outer level of the executable node."/>
- </elements>
- <elements name="ActivityNode" supertypes="//@dataContexts.0/@elements.17">
- <properties name="inStructuredNode" type="Reference" description="Structured activity node containing the node."/>
- <properties name="activity" type="Reference" description="Activity containing the node."/>
- <properties name="outgoing" type="Reference" description="Edges that have the node as source."/>
- <properties name="incoming" type="Reference" description="Edges that have the node as target."/>
- <properties name="inPartition" type="Reference" description="Partitions containing the node."/>
- <properties name="inInterruptibleRegion" type="Reference" description="Interruptible regions containing the node."/>
- <properties name="inGroup" type="Reference" description="Groups containing the node."/>
- <properties name="redefinedNode" type="Reference" description="Inherited nodes replaced by this node in a specialization of the activity."/>
- </elements>
- <elements name="StructuredActivityNode" supertypes="//@dataContexts.0/@elements.105 //@dataContexts.0/@elements.8 //@dataContexts.0/@elements.109">
- <properties name="variable" type="Reference" description="A variable defined in the scope of the structured activity node. It has no value and may not be accessed"/>
- <properties name="edge" type="Reference" description="Edges immediately contained in the structured node."/>
- <properties name="mustIsolate" description="If true, then the actions in the node execute in isolation from actions outside the node."/>
- <properties name="node" type="Reference" description="Nodes immediately contained in the group."/>
- <properties name="structuredNodeInput" type="Reference" multiplicity="-1"/>
- <properties name="structuredNodeOutput" type="Reference" multiplicity="-1"/>
- </elements>
- <elements name="ActivityGroup" supertypes="//@dataContexts.0/@elements.1">
- <properties name="subgroup" type="Reference" description="Groups immediately contained in the group."/>
- <properties name="superGroup" type="Reference" description="Group immediately containing the group."/>
- <properties name="inActivity" type="Reference" description="Activity containing the group."/>
- <properties name="containedEdge" type="Reference" description="Edges immediately contained in the group."/>
- <properties name="containedNode" type="Reference" description="Nodes immediately contained in the group."/>
- </elements>
- <elements name="Activity" supertypes="//@dataContexts.0/@elements.44">
- <properties name="structuredNode" type="Reference" description="Top-level structured nodes in the activity."/>
- <properties name="variable" type="Reference" description="Top-level variables in the activity."/>
- <properties name="node" type="Reference" description="Nodes coordinated by the activity."/>
- <properties name="isReadOnly" description="If true, this activity must not make any changes to variables outside the activity or to objects. (This is an assertion, not an executable property. It may be used by an execution engine to optimize model execution. If the assertion is violated by the action, then the model is ill-formed.) The default is false (an activity may make nonlocal changes)."/>
- <properties name="edge" type="Reference" description="Edges expressing flow between nodes of the activity."/>
- <properties name="partition" type="Reference" description="Top-level partitions in the activity."/>
- <properties name="isSingleExecution" description="If true, all invocations of the activity are handled by the same execution."/>
- <properties name="group" type="Reference" description="Top-level groups in the activity."/>
- </elements>
- <elements name="Variable" supertypes="//@dataContexts.0/@elements.33 //@dataContexts.0/@elements.32">
- <properties name="scope" type="Reference" description="A structured activity node that owns the variable."/>
- <properties name="activityScope" type="Reference" description="An activity that owns the variable."/>
- </elements>
- <elements name="ActivityEdge" supertypes="//@dataContexts.0/@elements.17">
- <properties name="source" type="Reference" description="Node from which tokens are taken when they traverse the edge."/>
- <properties name="target" type="Reference" description="Node to which tokens are put when they traverse the edge."/>
- <properties name="redefinedEdge" type="Reference" description="Inherited edges replaced by this edge in a specialization of the activity."/>
- <properties name="inPartition" type="Reference" description="Partitions containing the edge."/>
- <properties name="guard" type="Reference" description="Specification evaluated at runtime to determine if the edge can be traversed."/>
- <properties name="weight" type="Reference" description="The minimum number of tokens that must traverse the edge at the same time."/>
- <properties name="interrupts" type="Reference" description="Region that the edge can interrupt."/>
- <properties name="inStructuredNode" type="Reference" description="Structured activity node containing the edge."/>
- <properties name="inGroup" type="Reference" description="Groups containing the edge."/>
- <properties name="activity" type="Reference" description="Activity containing the edge."/>
- </elements>
- <elements name="ActivityPartition" supertypes="//@dataContexts.0/@elements.4 //@dataContexts.0/@elements.109">
- <properties name="isDimension" description="Tells whether the partition groups other partitions along a dimension."/>
- <properties name="isExternal" description="Tells whether the partition represents an entity to which the partitioning structure does not apply."/>
- <properties name="node" type="Reference" description="Nodes immediately contained in the group."/>
- <properties name="subpartition" type="Reference" description="Partitions immediately contained in the partition."/>
- <properties name="superPartition" type="Reference" description="Partition immediately containing the partition."/>
- <properties name="represents" type="Reference" description="An element constraining behaviors invoked by nodes in the partition."/>
- <properties name="edge" type="Reference" description="Edges immediately contained in the group."/>
- </elements>
- <elements name="InterruptibleActivityRegion" supertypes="//@dataContexts.0/@elements.109">
- <properties name="node" type="Reference" description="Nodes immediately contained in the group."/>
- <properties name="interruptingEdge" type="Reference" description="The edges leaving the region that will abort other tokens flowing in the region."/>
- </elements>
- <elements name="ExceptionHandler" supertypes="//@dataContexts.0/@elements.1">
- <properties name="handlerBody" type="Reference" description="A node that is executed if the handler satisfies an uncaught exception."/>
- <properties name="exceptionInput" type="Reference" description="An object node within the handler body. When the handler catches an exception, the exception token is placed in this node, causing the body to execute."/>
- <properties name="exceptionType" type="Reference" description="The kind of instances that the handler catches. If an exception occurs whose type is any of the classifiers in the set, the handler catches the exception and executes its body."/>
- <properties name="protectedNode" type="Reference" description="The node protected by the handler. The handler is examined if an exception propagates to the outside of the node."/>
- </elements>
- <elements name="ObjectNode" supertypes="//@dataContexts.0/@elements.107 //@dataContexts.0/@elements.13">
- <properties name="ordering" type="Enumeration" description="Tells whether and how the tokens in the object node are ordered for selection to traverse edges outgoing from the object node."/>
- <properties name="isControlType" description="Tells whether the type of the object node is to be treated as control."/>
- <properties name="upperBound" type="Reference" description="The maximum number of tokens allowed in the node. Objects cannot flow into the node if the upper bound is reached."/>
- <properties name="inState" type="Reference" description="The required states of the object available at this point in the activity."/>
- <properties name="selection" type="Reference" description="Selects tokens for outgoing edges."/>
- </elements>
- <elements name="OutputPin" supertypes="//@dataContexts.0/@elements.118"/>
- <elements name="Pin" supertypes="//@dataContexts.0/@elements.116 //@dataContexts.0/@elements.32">
- <properties name="isControl" description="Tells whether the pins provide data to the actions, or just controls when it executes it."/>
- </elements>
- <elements name="InputPin" supertypes="//@dataContexts.0/@elements.118"/>
- <elements name="CallAction" supertypes="//@dataContexts.0/@elements.121">
- <properties name="isSynchronous" description="If true, the call is synchronous and the caller waits for completion of the invoked behavior.&#xD;&#xA;If false, the call is asynchronous and the caller proceeds immediately and does not expect a return values.&#xD;&#xA;"/>
- <properties name="result" type="Reference" description="A list of output pins where the results of performing the invocation are placed."/>
- </elements>
- <elements name="InvocationAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="argument" type="Reference" description="Specification of the ordered set of argument values that appears during execution."/>
- <properties name="onPort" type="Reference" description="A optional port of the receiver object on which the behavioral feature is invoked."/>
- </elements>
- <elements name="SendSignalAction" supertypes="//@dataContexts.0/@elements.121">
- <properties name="target" type="Reference" description="The target object to which the signal is sent."/>
- <properties name="signal" type="Reference" description="The type of signal transmitted to the target object."/>
- </elements>
- <elements name="CallOperationAction" supertypes="//@dataContexts.0/@elements.120">
- <properties name="operation" type="Reference" description="The operation to be invoked by the action execution."/>
- <properties name="target" type="Reference" description="The target object to which the request is sent. The classifier of the target object is used to dynamically determine a behavior to invoke. This object constitutes the context of the execution of the operation."/>
- </elements>
- <elements name="CallBehaviorAction" supertypes="//@dataContexts.0/@elements.120">
- <properties name="behavior" type="Reference" description="The invoked behavior. It must be capable of accepting and returning control."/>
- </elements>
- <elements name="SequenceNode" supertypes="//@dataContexts.0/@elements.108">
- <properties name="executableNode" type="Reference" description="An ordered set of executable nodes."/>
- </elements>
- <elements name="ControlNode" supertypes="//@dataContexts.0/@elements.107"/>
- <elements name="ControlFlow" supertypes="//@dataContexts.0/@elements.112"/>
- <elements name="InitialNode" supertypes="//@dataContexts.0/@elements.126"/>
- <elements name="ActivityParameterNode" supertypes="//@dataContexts.0/@elements.116">
- <properties name="parameter" type="Reference" description="The parameter the object node will be accepting or providing values for."/>
- </elements>
- <elements name="ValuePin" supertypes="//@dataContexts.0/@elements.119">
- <properties name="value" type="Reference" description="Value that the pin will provide."/>
- </elements>
- <elements name="Message" supertypes="//@dataContexts.0/@elements.4">
- <properties name="messageKind" type="Enumeration" description="The derived kind of the Message (complete, lost, found or unknown)"/>
- <properties name="messageSort" type="Enumeration" description="The sort of communication reflected by the Message"/>
- <properties name="receiveEvent" type="Reference" description="References the Receiving of the Message"/>
- <properties name="sendEvent" type="Reference" description="References the Sending of the Message."/>
- <properties name="connector" type="Reference" description="The Connector on which this Message is sent."/>
- <properties name="interaction" type="Reference" description="The enclosing Interaction owning the Message"/>
- <properties name="argument" type="Reference" description="The arguments of the Message"/>
- <properties name="signature" type="Reference" description="The definition of the type or signature of the Message (depending on its kind). The associated named element is derived from the message end that constitutes the sending or receiving message event. If both a sending event and a receiving message event are present, the signature is obtained from the sending event."/>
- </elements>
- <elements name="MessageEnd" supertypes="//@dataContexts.0/@elements.4">
- <properties name="message" type="Reference" description="References a Message."/>
- </elements>
- <elements name="Interaction" supertypes="//@dataContexts.0/@elements.44 //@dataContexts.0/@elements.134">
- <properties name="lifeline" type="Reference" description="Specifies the participants in this Interaction."/>
- <properties name="fragment" type="Reference" description="The ordered set of fragments in the Interaction."/>
- <properties name="action" type="Reference" description="Actions owned by the Interaction."/>
- <properties name="formalGate" type="Reference" description="Specifies the gates that form the message interface between this Interaction and any InteractionUses which reference it.&#xD;&#xA;"/>
- <properties name="message" type="Reference" description="The Messages contained in this Interaction."/>
- </elements>
- <elements name="InteractionFragment" supertypes="//@dataContexts.0/@elements.4">
- <properties name="covered" type="Reference" description="References the Lifelines that the InteractionFragment involves."/>
- <properties name="generalOrdering" type="Reference" description="The general ordering relationships contained in this fragment."/>
- <properties name="enclosingInteraction" type="Reference" description="The Interaction enclosing this InteractionFragment."/>
- <properties name="enclosingOperand" type="Reference" description="The operand enclosing this InteractionFragment (they may nest recursively)"/>
- </elements>
- <elements name="Lifeline" supertypes="//@dataContexts.0/@elements.4">
- <properties name="represents" type="Reference" description="References the ConnectableElement within the classifier that contains the enclosing interaction."/>
- <properties name="interaction" type="Reference" description="References the Interaction enclosing this Lifeline."/>
- <properties name="selector" type="Reference" description="If the referenced ConnectableElement is multivalued, then this specifies the specific individual part within that set."/>
- <properties name="decomposedAs" type="Reference" description="References the Interaction that represents the decomposition."/>
- <properties name="coveredBy" type="Reference" description="References the InteractionFragments in which this Lifeline takes part."/>
- </elements>
- <elements name="PartDecomposition" supertypes="//@dataContexts.0/@elements.137"/>
- <elements name="InteractionUse" supertypes="//@dataContexts.0/@elements.134">
- <properties name="refersTo" type="Reference" description="Refers to the Interaction that defines its meaning"/>
- <properties name="actualGate" type="Reference" description="The actual gates of the InteractionUse"/>
- <properties name="argument" type="Reference" description="The actual arguments of the Interaction"/>
- <properties name="returnValue" type="Reference" description="The value of the executed Interaction."/>
- <properties name="returnValueRecipient" type="Reference" description="The recipient of the return value."/>
- </elements>
- <elements name="Gate" supertypes="//@dataContexts.0/@elements.132"/>
- <elements name="GeneralOrdering" supertypes="//@dataContexts.0/@elements.4">
- <properties name="before" type="Reference" description="The OccurrenceSpecification referenced comes before the OccurrenceSpecification referenced by after."/>
- <properties name="after" type="Reference" description="The OccurrenceSpecification referenced comes after the OccurrenceSpecification referenced by before."/>
- </elements>
- <elements name="OccurrenceSpecification" supertypes="//@dataContexts.0/@elements.134">
- <properties name="toBefore" type="Reference" description="References the GeneralOrderings that specify EventOcurrences that must occur before this OccurrenceSpecification&#xD;&#xA;"/>
- <properties name="toAfter" type="Reference" description="References the GeneralOrderings that specify EventOcurrences that must occur after this OccurrenceSpecification&#xD;&#xA;"/>
- </elements>
- <elements name="InteractionOperand" supertypes="//@dataContexts.0/@elements.8 //@dataContexts.0/@elements.134">
- <properties name="guard" type="Reference" description="Constraint of the operand."/>
- <properties name="fragment" type="Reference" description="The fragments of the operand."/>
- </elements>
- <elements name="InteractionConstraint" supertypes="//@dataContexts.0/@elements.11">
- <properties name="minint" type="Reference" description="The minimum number of iterations of a loop"/>
- <properties name="maxint" type="Reference" description="The maximum number of iterations of a loop"/>
- </elements>
- <elements name="ExecutionSpecification" supertypes="//@dataContexts.0/@elements.134">
- <properties name="start" type="Reference" description="References the OccurrenceSpecification that designates the start of the Action or Behavior"/>
- <properties name="finish" type="Reference" description="References the OccurrenceSpecification that designates the finish of the Action or Behavior."/>
- </elements>
- <elements name="StateInvariant" supertypes="//@dataContexts.0/@elements.134">
- <properties name="invariant" type="Reference" description="A Constraint that should hold at runtime for this StateInvariant"/>
- </elements>
- <elements name="ActionExecutionSpecification" supertypes="//@dataContexts.0/@elements.143">
- <properties name="action" type="Reference" description="Action whose execution is occurring."/>
- </elements>
- <elements name="BehaviorExecutionSpecification" supertypes="//@dataContexts.0/@elements.143">
- <properties name="behavior" type="Reference" description="Behavior whose execution is occurring."/>
- </elements>
- <elements name="CreationEvent" supertypes="//@dataContexts.0/@elements.57"/>
- <elements name="MessageEvent" supertypes="//@dataContexts.0/@elements.57"/>
- <elements name="MessageOccurrenceSpecification" supertypes="//@dataContexts.0/@elements.140 //@dataContexts.0/@elements.132"/>
- <elements name="ExecutionOccurrenceSpecification" supertypes="//@dataContexts.0/@elements.140">
- <properties name="execution" type="Reference" multiplicity="2" description="References the execution specification describing the execution that is started or finished at this execution event."/>
- </elements>
- <elements name="Actor" supertypes="//@dataContexts.0/@elements.46"/>
- <elements name="CallEvent" supertypes="//@dataContexts.0/@elements.148">
- <properties name="operation" type="Reference" description="Designates the operation whose invocation raised the call event."/>
- </elements>
- <elements name="ChangeEvent" supertypes="//@dataContexts.0/@elements.57">
- <properties name="changeExpression" type="Reference" description="A Boolean-valued expression that will result in a change event whenever its value changes from false to true."/>
- </elements>
- <elements name="SignalEvent" supertypes="//@dataContexts.0/@elements.148">
- <properties name="signal" type="Reference" description="The specific signal that is associated with this event."/>
- </elements>
- <elements name="AnyReceiveEvent" supertypes="//@dataContexts.0/@elements.148"/>
- <elements name="ForkNode" supertypes="//@dataContexts.0/@elements.126"/>
- <elements name="FlowFinalNode" supertypes="//@dataContexts.0/@elements.158"/>
- <elements name="FinalNode" supertypes="//@dataContexts.0/@elements.126"/>
- <elements name="CentralBufferNode" supertypes="//@dataContexts.0/@elements.116"/>
- <elements name="MergeNode" supertypes="//@dataContexts.0/@elements.126"/>
- <elements name="DecisionNode" supertypes="//@dataContexts.0/@elements.126">
- <properties name="decisionInput" type="Reference" description="Provides input to guard specifications on edges outgoing from the decision node."/>
- <properties name="decisionInputFlow" type="Reference" description="An additional edge incoming to the decision node that provides a decision input value."/>
- </elements>
- <elements name="ObjectFlow" supertypes="//@dataContexts.0/@elements.112">
- <properties name="isMulticast" description="Tells whether the objects in the flow are passed by multicasting."/>
- <properties name="isMultireceive" description="Tells whether the objects in the flow are gathered from respondents to multicasting."/>
- <properties name="transformation" type="Reference" description="Changes or replaces data tokens flowing along edge."/>
- <properties name="selection" type="Reference" description="Selects tokens from a source object node."/>
- </elements>
- <elements name="ActivityFinalNode" supertypes="//@dataContexts.0/@elements.158"/>
- <elements name="ComponentRealization" supertypes="//@dataContexts.0/@elements.28">
- <properties name="abstraction" type="Reference" description="The Component that owns this ComponentRealization and which is implemented by its realizing classifiers."/>
- <properties name="realizingClassifier" type="Reference" description="The classifiers that are involved in the implementation of the Component that owns this Realization."/>
- </elements>
- <elements name="Component" supertypes="//@dataContexts.0/@elements.45">
- <properties name="isIndirectlyInstantiated" description="The kind of instantiation that applies to a Component. If false, the component is instantiated as an addressable object. If true, the Component is defined at design-time, but at runtime (or execution-time) an object specified by the Component does not exist, that is, the component is instantiated indirectly, through the instantiation of its realizing classifiers or parts. Several standard stereotypes use this meta attribute, e.g. &lt;&lt;specification>>, &lt;&lt;focus>>, &lt;&lt;subsystem>>."/>
- <properties name="required" type="Reference" description="The interfaces that the component requires from other components in its environment in order to be able to offer its full set of provided functionality. These interfaces may be used by the Component or any of its realizingClassifiers, or they may be the Interfaces that are required by its public Ports."/>
- <properties name="provided" type="Reference" description="The interfaces that the component exposes to its environment. These interfaces may be Realized by the Component or any of its realizingClassifiers, or they may be the Interfaces that are provided by its public Ports."/>
- <properties name="packagedElement" type="Reference" description="The set of PackageableElements that a Component owns. In the namespace of a component, all model elements that are involved in or related to its definition may be owned or imported explicitly. These may include e.g. Classes, Interfaces, Components, Packages, Use cases, Dependencies (e.g. mappings), and Artifacts."/>
- <properties name="realization" type="Reference" description="The set of Realizations owned by the Component. Realizations reference the Classifiers of which the Component is an abstraction; i.e., that realize its behavior."/>
- </elements>
- <elements name="Node" supertypes="//@dataContexts.0/@elements.45 //@dataContexts.0/@elements.36">
- <properties name="nestedNode" type="Reference" description="The Nodes that are defined (nested) within the Node."/>
- </elements>
- <elements name="CommunicationPath" supertypes="//@dataContexts.0/@elements.15"/>
- <elements name="Device" supertypes="//@dataContexts.0/@elements.166"/>
- <elements name="ExecutionEnvironment" supertypes="//@dataContexts.0/@elements.166"/>
- <elements name="CombinedFragment" supertypes="//@dataContexts.0/@elements.134">
- <properties name="interactionOperator" type="Enumeration" description="Specifies the operation which defines the semantics of this combination of InteractionFragments."/>
- <properties name="operand" type="Reference" description="The set of operands of the combined fragment."/>
- <properties name="cfragmentGate" type="Reference" description="Specifies the gates that form the interface between this CombinedFragment and its surroundings"/>
- </elements>
- <elements name="Continuation" supertypes="//@dataContexts.0/@elements.134">
- <properties name="setting" description="True: when the Continuation is at the end of the enclosing InteractionFragment and False when it is in the beginning."/>
- </elements>
- <elements name="ConsiderIgnoreFragment" supertypes="//@dataContexts.0/@elements.170">
- <properties name="message" type="Reference" description="The set of messages that apply to this fragment"/>
- </elements>
- <elements name="CreateObjectAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="classifier" type="Reference" description="Classifier to be instantiated."/>
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="DestroyObjectAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="isDestroyLinks" description="Specifies whether links in which the object participates are destroyed along with the object."/>
- <properties name="isDestroyOwnedObjects" description="Specifies whether objects owned by the object are destroyed along with the object."/>
- <properties name="target" type="Reference" description="The input pin providing the object to be destroyed."/>
- </elements>
- <elements name="TestIdentityAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="first" type="Reference" description="Gives the pin on which an object is placed."/>
- <properties name="second" type="Reference" description="Gives the pin on which an object is placed."/>
- <properties name="result" type="Reference" description="Tells whether the two input objects are identical."/>
- </elements>
- <elements name="ReadSelfAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="result" type="Reference" description="Gives the output pin on which the hosting object is placed."/>
- </elements>
- <elements name="StructuralFeatureAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="structuralFeature" type="Reference" description="Structural feature to be read."/>
- <properties name="object" type="Reference" description="Gives the input pin from which the object whose structural feature is to be read or written is obtained.&#xD;&#xA;"/>
- </elements>
- <elements name="ReadStructuralFeatureAction" supertypes="//@dataContexts.0/@elements.177">
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="WriteStructuralFeatureAction" supertypes="//@dataContexts.0/@elements.177">
- <properties name="value" type="Reference" description="Value to be added or removed from the structural feature."/>
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="ClearStructuralFeatureAction" supertypes="//@dataContexts.0/@elements.177">
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="RemoveStructuralFeatureValueAction" supertypes="//@dataContexts.0/@elements.179">
- <properties name="isRemoveDuplicates" description="Specifies whether to remove duplicates of the value in nonunique structural features."/>
- <properties name="removeAt" type="Reference" description="Specifies the position of an existing value to remove in ordered nonunique structural features. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited."/>
- </elements>
- <elements name="AddStructuralFeatureValueAction" supertypes="//@dataContexts.0/@elements.179">
- <properties name="isReplaceAll" description="Specifies whether existing values of the structural feature of the object should be removed before adding the new value."/>
- <properties name="insertAt" type="Reference" description="Gives the position at which to insert a new value or move an existing value in ordered structural features. The type of the pin is UnlimitedNatural, but the value cannot be zero. This pin is omitted for unordered structural features."/>
- </elements>
- <elements name="LinkAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="endData" type="Reference" description="Data identifying one end of a link by the objects on its ends and qualifiers."/>
- <properties name="inputValue" type="Reference" description="Pins taking end objects and qualifier values as input."/>
- </elements>
- <elements name="LinkEndData" supertypes="//@dataContexts.0/@elements.1">
- <properties name="value" type="Reference" description="Input pin that provides the specified object for the given end. This pin is omitted if the link-end data specifies an 'open' end for reading."/>
- <properties name="end" type="Reference" description="Association end for which this link-end data specifies values."/>
- <properties name="qualifier" type="Reference" description="List of qualifier values"/>
- </elements>
- <elements name="QualifierValue" supertypes="//@dataContexts.0/@elements.1">
- <properties name="qualifier" type="Reference" description="Attribute representing the qualifier for which the value is to be specified."/>
- <properties name="value" type="Reference" description="Input pin from which the specified value for the qualifier is taken."/>
- </elements>
- <elements name="ReadLinkAction" supertypes="//@dataContexts.0/@elements.183">
- <properties name="result" type="Reference" description="The pin on which are put the objects participating in the association at the end not specified by the inputs.&#xD;&#xA;"/>
- </elements>
- <elements name="LinkEndCreationData" supertypes="//@dataContexts.0/@elements.184">
- <properties name="isReplaceAll" description="Specifies whether the existing links emanating from the object on this end should be destroyed before creating a new link."/>
- <properties name="insertAt" type="Reference" description="Specifies where the new link should be inserted for ordered association ends, or where an existing link should be moved to. The type of the input is UnlimitedNatural, but the input cannot be zero. This pin is omitted for association ends that are not ordered."/>
- </elements>
- <elements name="CreateLinkAction" supertypes="//@dataContexts.0/@elements.189"/>
- <elements name="WriteLinkAction" supertypes="//@dataContexts.0/@elements.183"/>
- <elements name="DestroyLinkAction" supertypes="//@dataContexts.0/@elements.189"/>
- <elements name="LinkEndDestructionData" supertypes="//@dataContexts.0/@elements.184">
- <properties name="isDestroyDuplicates" description="Specifies whether to destroy duplicates of the value in nonunique association ends."/>
- <properties name="destroyAt" type="Reference" description="Specifies the position of an existing link to be destroyed in ordered nonunique association ends. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited."/>
- </elements>
- <elements name="ClearAssociationAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="object" type="Reference" description="Gives the input pin from which is obtained the object whose participation in the association is to be cleared."/>
- <properties name="association" type="Reference" description="Association to be cleared."/>
- </elements>
- <elements name="BroadcastSignalAction" supertypes="//@dataContexts.0/@elements.121">
- <properties name="signal" type="Reference" description="The specification of signal object transmitted to the target objects."/>
- </elements>
- <elements name="SendObjectAction" supertypes="//@dataContexts.0/@elements.121">
- <properties name="target" type="Reference" description="The target object to which the object is sent."/>
- <properties name="request" type="Reference" description="The request object, which is transmitted to the target object. The object may be copied in transmission, so identity might not be preserved."/>
- </elements>
- <elements name="ValueSpecificationAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="value" type="Reference" description="Value specification to be evaluated."/>
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="TimeExpression" supertypes="//@dataContexts.0/@elements.12">
- <properties name="expr" type="Reference" description="The value of the time expression."/>
- <properties name="observation" type="Reference" description="Refers to the time and duration observations that are involved in expr."/>
- </elements>
- <elements name="Observation" supertypes="//@dataContexts.0/@elements.3"/>
- <elements name="Duration" supertypes="//@dataContexts.0/@elements.12">
- <properties name="expr" type="Reference" description="The value of the Duration."/>
- <properties name="observation" type="Reference" description="Refers to the time and duration observations that are involved in expr."/>
- </elements>
- <elements name="DurationInterval" supertypes="//@dataContexts.0/@elements.200"/>
- <elements name="Interval" supertypes="//@dataContexts.0/@elements.12">
- <properties name="min" type="Reference" description="Refers to the ValueSpecification denoting the minimum value of the range."/>
- <properties name="max" type="Reference" description="Refers to the ValueSpecification denoting the maximum value of the range."/>
- </elements>
- <elements name="TimeConstraint" supertypes="//@dataContexts.0/@elements.202">
- <properties name="firstEvent" description="The value of firstEvent is related to constrainedElement. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters constrainedElement. If firstEvent is false, then the corresponding observation event is the last time instant the execution is within constrainedElement."/>
- </elements>
- <elements name="IntervalConstraint" supertypes="//@dataContexts.0/@elements.11"/>
- <elements name="TimeInterval" supertypes="//@dataContexts.0/@elements.200"/>
- <elements name="DurationConstraint" supertypes="//@dataContexts.0/@elements.202">
- <properties name="firstEvent" description="The value of firstEvent[i] is related to constrainedElement[i] (where i is 1 or 2). If firstEvent[i] is true, then the corresponding observation event is the first time instant the execution enters constrainedElement[i]. If firstEvent[i] is false, then the corresponding observation event is the last time instant the execution is within constrainedElement[i]. Default value is true applied when constrainedElement[i] refers an element that represents only one time instant."/>
- </elements>
- <elements name="TimeObservation" supertypes="//@dataContexts.0/@elements.197">
- <properties name="event" type="Reference" description="The observation is determined by the entering or exiting of the event element during execution."/>
- <properties name="firstEvent" description="The value of firstEvent is related to event. If firstEvent is true, then the corresponding observation event is the first time instant the execution enters event. If firstEvent is false, then the corresponding observation event is the time instant the execution exits event."/>
- </elements>
- <elements name="DurationObservation" supertypes="//@dataContexts.0/@elements.197">
- <properties name="event" type="Reference" description="The observation is determined by the entering or exiting of the event element during execution."/>
- <properties name="firstEvent" description="The value of firstEvent[i] is related to event[i] (where i is 1 or 2). If firstEvent[i] is true, then the corresponding observation event is the first time instant the execution enters event[i]. If firstEvent[i] is false, then the corresponding observation event is the time instant the execution exits event[i]. Default value is true applied when event[i] refers an element that represents only one time instant."/>
- </elements>
- <elements name="FinalState" supertypes="//@dataContexts.0/@elements.59"/>
- <elements name="TimeEvent" supertypes="//@dataContexts.0/@elements.57">
- <properties name="isRelative" description="Specifies whether it is relative or absolute time."/>
- <properties name="when" type="Reference" description="Specifies the corresponding time deadline."/>
- </elements>
- <elements name="VariableAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="variable" type="Reference" description="Variable to be read."/>
- </elements>
- <elements name="ReadVariableAction" supertypes="//@dataContexts.0/@elements.209">
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="WriteVariableAction" supertypes="//@dataContexts.0/@elements.209">
- <properties name="value" type="Reference" description="Value to be added or removed from the variable."/>
- </elements>
- <elements name="ClearVariableAction" supertypes="//@dataContexts.0/@elements.209"/>
- <elements name="AddVariableValueAction" supertypes="//@dataContexts.0/@elements.211">
- <properties name="isReplaceAll" description="Specifies whether existing values of the variable should be removed before adding the new value."/>
- <properties name="insertAt" type="Reference" description="Gives the position at which to insert a new value or move an existing value in ordered variables. The types is UnlimitedINatural, but the value cannot be zero. This pin is omitted for unordered variables."/>
- </elements>
- <elements name="RemoveVariableValueAction" supertypes="//@dataContexts.0/@elements.211">
- <properties name="isRemoveDuplicates" description="Specifies whether to remove duplicates of the value in nonunique variables."/>
- <properties name="removeAt" type="Reference" description="Specifies the position of an existing value to remove in ordered nonunique variables. The type of the pin is UnlimitedNatural, but the value cannot be zero or unlimited."/>
- </elements>
- <elements name="RaiseExceptionAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="exception" type="Reference" description="An input pin whose value becomes an exception object."/>
- </elements>
- <elements name="ActionInputPin" supertypes="//@dataContexts.0/@elements.119">
- <properties name="fromAction" type="Reference" description="The action used to provide values."/>
- </elements>
- <elements name="InformationItem" supertypes="//@dataContexts.0/@elements.16">
- <properties name="represented" type="Reference" description="Determines the classifiers that will specify the structure and nature of the information. An information item represents all its represented classifiers."/>
- </elements>
- <elements name="InformationFlow" supertypes="//@dataContexts.0/@elements.3 //@dataContexts.0/@elements.6">
- <properties name="realization" type="Reference" description="Determines which Relationship will realize the specified flow"/>
- <properties name="conveyed" type="Reference" description="Specifies the information items that may circulate on this information flow."/>
- <properties name="informationSource" type="Reference" description="Defines from which source the conveyed InformationItems are initiated."/>
- <properties name="informationTarget" type="Reference" description="Defines to which target the conveyed InformationItems are directed."/>
- <properties name="realizingActivityEdge" type="Reference" description="Determines which ActivityEdges will realize the specified flow."/>
- <properties name="realizingConnector" type="Reference" description="Determines which Connectors will realize the specified flow."/>
- <properties name="realizingMessage" type="Reference" description="Determines which Messages will realize the specified flow."/>
- </elements>
- <elements name="ReadExtentAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="result" type="Reference" description="The runtime instances of the classifier."/>
- <properties name="classifier" type="Reference" description="The classifier whose instances are to be retrieved."/>
- </elements>
- <elements name="ReclassifyObjectAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="isReplaceAll" description="Specifies whether existing classifiers should be removed before adding the new classifiers."/>
- <properties name="oldClassifier" type="Reference" description="A set of classifiers to be removed from the classifiers of the object."/>
- <properties name="newClassifier" type="Reference" description="A set of classifiers to be added to the classifiers of the object."/>
- <properties name="object" type="Reference" description="Holds the object to be reclassified."/>
- </elements>
- <elements name="ReadIsClassifiedObjectAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="isDirect" description="Indicates whether the classifier must directly classify the input object."/>
- <properties name="classifier" type="Reference" description="The classifier against which the classification of the input object is tested."/>
- <properties name="result" type="Reference" description="After termination of the action, will hold the result of the test."/>
- <properties name="object" type="Reference" description="Holds the object whose classification is to be tested."/>
- </elements>
- <elements name="StartClassifierBehaviorAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="object" type="Reference" description="Holds the object on which to start the owned behavior."/>
- </elements>
- <elements name="ReadLinkObjectEndAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="object" type="Reference" description="Gives the input pin from which the link object is obtained."/>
- <properties name="end" type="Reference" description="Link end to be read."/>
- <properties name="result" type="Reference" description="Pin where the result value is placed."/>
- </elements>
- <elements name="ReadLinkObjectEndQualifierAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="object" type="Reference" description="Gives the input pin from which the link object is obtained."/>
- <properties name="result" type="Reference" description="Pin where the result value is placed."/>
- <properties name="qualifier" type="Reference" description="The attribute representing the qualifier to be read."/>
- </elements>
- <elements name="CreateLinkObjectAction" supertypes="//@dataContexts.0/@elements.188">
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- </elements>
- <elements name="AcceptEventAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="isUnmarshall" description="Indicates whether there is a single output pin for the event, or multiple output pins for attributes of the event."/>
- <properties name="result" type="Reference" description="Pins holding the received event objects or their attributes. Event objects may be copied in transmission, so identity might not be preserved."/>
- <properties name="trigger" type="Reference" description="The type of events accepted by the action, as specified by triggers. For triggers with signal events, a signal of the specified type or any subtype of the specified signal type is accepted."/>
- </elements>
- <elements name="AcceptCallAction" supertypes="//@dataContexts.0/@elements.226">
- <properties name="returnInformation" type="Reference" description="Pin where a value is placed containing sufficient information to perform a subsequent reply and return control to the caller. The contents of this value are opaque. It can be passed and copied but it cannot be manipulated by the model."/>
- </elements>
- <elements name="ReplyAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="replyToCall" type="Reference" description="The trigger specifying the operation whose call is being replied to."/>
- <properties name="returnInformation" type="Reference" description="A pin containing the return information value produced by an earlier AcceptCallAction."/>
- <properties name="replyValue" type="Reference" description="A list of pins containing the reply values of the operation. These values are returned to the caller."/>
- </elements>
- <elements name="UnmarshallAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="result" type="Reference" description="The values of the structural features of the input object."/>
- <properties name="unmarshallType" type="Reference" description="The type of the object to be unmarshalled."/>
- <properties name="object" type="Reference" description="The object to be unmarshalled."/>
- </elements>
- <elements name="ReduceAction" supertypes="//@dataContexts.0/@elements.105">
- <properties name="reducer" type="Reference" description="Behavior that is applied to two elements of the input collection to produce a value that is the same type as elements of the collection."/>
- <properties name="result" type="Reference" description="Gives the output pin on which the result is put."/>
- <properties name="collection" type="Reference" description="The collection to be reduced."/>
- <properties name="isOrdered" description="Tells whether the order of the input collection should determine the order in which the behavior is applied to its elements."/>
- </elements>
- <elements name="StartObjectBehaviorAction" supertypes="//@dataContexts.0/@elements.120">
- <properties name="object" type="Reference" description="Holds the object which is either a behavior to be started or has a classifier behavior to be started."/>
- </elements>
- <elements name="JoinNode" supertypes="//@dataContexts.0/@elements.126">
- <properties name="isCombineDuplicate" description="Tells whether tokens having objects with the same identity are combined into one by the join."/>
- <properties name="joinSpec" type="Reference" description="A specification giving the conditions under which the join with emit a token. Default is &quot;and&quot;."/>
- </elements>
- <elements name="DataStoreNode" supertypes="//@dataContexts.0/@elements.159"/>
- <elements name="ConditionalNode" supertypes="//@dataContexts.0/@elements.108">
- <properties name="isDeterminate" description="If true, the modeler asserts that at most one test will succeed."/>
- <properties name="isAssured" description="If true, the modeler asserts that at least one test will succeed."/>
- <properties name="clause" type="Reference" description="Set of clauses composing the conditional."/>
- <properties name="result" type="Reference" description="A list of output pins that constitute the data flow outputs of the conditional."/>
- </elements>
- <elements name="Clause" supertypes="//@dataContexts.0/@elements.1">
- <properties name="test" type="Reference" multiplicity="-1" description="A nested activity fragment with a designated output pin that specifies the result of the test."/>
- <properties name="body" type="Reference" description="A nested activity fragment that is executed if the test evaluates to true and the clause is chosen over any concurrent clauses that also evaluate to true."/>
- <properties name="predecessorClause" type="Reference" description="A set of clauses whose tests must all evaluate false before the current clause can be tested."/>
- <properties name="successorClause" type="Reference" description="A set of clauses which may not be tested unless the current clause tests false."/>
- <properties name="decider" type="Reference" description="An output pin within the test fragment the value of which is examined after execution of the test to determine whether the body should be executed."/>
- <properties name="bodyOutput" type="Reference" description="A list of output pins within the body fragment whose values are moved to the result pins of the containing conditional node after execution of the clause body."/>
- </elements>
- <elements name="LoopNode" supertypes="//@dataContexts.0/@elements.108">
- <properties name="isTestedFirst" description="If true, the test is performed before the first execution of the body.&#xA;If false, the body is executed once before the test is performed.&#xA;"/>
- <properties name="bodyPart" type="Reference" description="The set of nodes and edges that perform the repetitive computations of the loop. The body section is executed as long as the test section produces a true value."/>
- <properties name="setupPart" type="Reference" description="The set of nodes and edges that initialize values or perform other setup computations for the loop."/>
- <properties name="decider" type="Reference" description="An output pin within the test fragment the value of which is examined after execution of the test to determine whether to execute the loop body."/>
- <properties name="test" type="Reference" multiplicity="-1" description="The set of nodes, edges, and designated value that compute a Boolean value to determine if another execution of the body will be performed."/>
- <properties name="result" type="Reference" description="A list of output pins that constitute the data flow output of the entire loop."/>
- <properties name="loopVariable" type="Reference" description="A list of output pins that hold the values of the loop variables during an execution of the loop. When the test fails, the values are movied to the result pins of the loop."/>
- <properties name="bodyOutput" type="Reference" description="A list of output pins within the body fragment the values of which are moved to the loop variable pins after completion of execution of the body, before the next iteration of the loop begins or before the loop exits."/>
- <properties name="loopVariableInput" type="Reference" description="A list of values that are moved into the loop variable pins before the first iteration of the loop."/>
- </elements>
- <elements name="ExpansionNode" supertypes="//@dataContexts.0/@elements.116">
- <properties name="regionAsOutput" type="Reference" description="The expansion region for which the node is an output."/>
- <properties name="regionAsInput" type="Reference" description="The expansion region for which the node is an input."/>
- </elements>
- <elements name="ExpansionRegion" supertypes="//@dataContexts.0/@elements.108">
- <properties name="mode" type="Enumeration" description="The way in which the executions interact:&#xD;&#xA;parallel: all interactions are independent&#xD;&#xA;iterative: the interactions occur in order of the elements&#xD;&#xA;stream: a stream of values flows into a single execution&#xD;&#xA;"/>
- <properties name="inputElement" type="Reference" description="An object node that holds a separate element of the input collection during each of the multiple executions of the region."/>
- <properties name="outputElement" type="Reference" description="An object node that accepts a separate element of the output collection during each of the multiple executions of the region. The values are formed into a collection that is available when the execution of the region is complete."/>
- </elements>
- <elements name="ProtocolTransition" supertypes="//@dataContexts.0/@elements.55">
- <properties name="postCondition" type="Reference" description="Specifies the post condition of the transition which is the condition that should be obtained once the transition is triggered. This post condition is part of the post condition of the operation connected to the transition.&#xD;&#xA;"/>
- <properties name="referred" type="Reference" description="This association refers to the associated operation. It is derived from the operation of the call trigger when applicable."/>
- <properties name="preCondition" type="Reference" description="Specifies the precondition of the transition. It specifies the condition that should be verified before triggering the transition. This guard condition added to the source state will be evaluated as part of the precondition of the operation referred by the transition if any."/>
- </elements>
- <elements name="AssociationClass" supertypes="//@dataContexts.0/@elements.45 //@dataContexts.0/@elements.15"/>
- <elements name="EModelElement">
- <properties name="eAnnotations" type="Reference"/>
- </elements>
- <elements name="LiteralReal" supertypes="//@dataContexts.0/@elements.95">
- <properties name="value" label="" description="The specified Real value."/>
- </elements>
- <elements name="DestructionOccurrenceSpecification" supertypes="//@dataContexts.0/@elements.149"/>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.1"/>
- </dataContexts>
- <dataContexts name="MemberEnd" label="Multiplicity">
- <properties name="owner" label="Owner" type="Enumeration"/>
- <properties name="navigable" label="Navigable" type="Boolean"/>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.0"/>
- </dataContexts>
- <dataContexts name="Multiplicity" label="Multiplicity">
- <properties name="multiplicity" label="Multiplicity"/>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.0"/>
- </dataContexts>
- <dataContexts name="StereotypeApplication" label="Stereotype application">
- <properties name="stereotypeApplication" label="Stereotype application" type="Reference" multiplicity="-1"/>
- <properties name="profileApplication" label="Profile application" type="Reference" multiplicity="-1"/>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.3"/>
- </dataContexts>
- <dataContexts name="CustomImage" label="Custom Image">
- <elements name="Image">
- <properties name="kind" type="Enumeration" description="The kind of image to be used. If icon is set, the image will be displayed on the stereotyped element. If shape is used, the image will be used as the graphical element. "/>
- <properties name="expression" description="A boolean expression to determine under which condition this image should be displayed."/>
- <properties name="name" label="" description="The image's name. This is a virtual property, used only for label display."/>
- </elements>
- <modelElementFactory href="ppe:/environment/org.eclipse.papyrus.uml.properties/Model/Environment.xmi#//@modelElementFactories.5"/>
- </dataContexts>
-</contexts:Context>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi
deleted file mode 100644
index a0a3ff2c595..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/UMLStereotypeApplicationExternalResourceEnvironment.xmi
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<environment:Environment
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:environment="http://www.eclipse.org/papyrus/properties/environment/0.9">
- <propertyEditorTypes
- label="External Resource Profile Application Editor"
- widgetClass="ProfileApplicationPropertyEditor"
- namespace="//@namespaces.0"
- type="Reference"
- multiplicity="-1"/>
- <namespaces
- name="umlprofileexternalresource"
- value="org.eclipse.papyrus.uml.profile.externalresource.properties.widget"/>
-</environment:Environment>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/ui/SinglePackageProfile.xwt b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/ui/SinglePackageProfile.xwt
deleted file mode 100644
index 2507f0c30e4..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/resources/ui/SinglePackageProfile.xwt
+++ /dev/null
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Composite
- xmlns:ppel="clr-namespace:org.eclipse.papyrus.views.properties.widgets.layout"
- xmlns:ppe="clr-namespace:org.eclipse.papyrus.views.properties.widgets"
- xmlns:uml="clr-namespace:org.eclipse.papyrus.uml.properties.widgets"
- xmlns="http://www.eclipse.org/xwt/presentation" xmlns:x="http://www.eclipse.org/xwt">
- <Composite.layout>
- <ppel:PropertiesLayout></ppel:PropertiesLayout>
- </Composite.layout>
- <uml:ProfileApplicationPropertyEditor
- input="{Binding}" property="StereotypeApplication:profileApplication">
- </uml:ProfileApplicationPropertyEditor>
-</Composite> \ No newline at end of file
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/Activator.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/Activator.java
deleted file mode 100644
index b9692fb91e2..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/Activator.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*****************************************************************************
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.properties;
-
-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.profile.externalresource.properties"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /**
- * 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;
- }
-
- /*
- * (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/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/OneResourceOnlyStrategyLocationPropertyEditor.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/OneResourceOnlyStrategyLocationPropertyEditor.java
deleted file mode 100644
index d0f03043f38..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/OneResourceOnlyStrategyLocationPropertyEditor.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*****************************************************************************
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.properties.widgets;
-
-import org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationEditor;
-import org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationPropertyEditor;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A Property editor for Profile Application, extended to support external resource for profile applications
- */
-public class OneResourceOnlyStrategyLocationPropertyEditor extends ProfileApplicationPropertyEditor {
-
- /**
- * Constructor.
- *
- * @param parent
- * @param style
- */
- public OneResourceOnlyStrategyLocationPropertyEditor(Composite parent, int style) {
- super(parent, style);
- setEditor(new ResourcePerProfileStrategyLocationEditor(parent, style));
- }
-
-
-
- /**
- * Location editor for the common resource where stereotype application are stored
- *
- * ---------------------------------------
- * Stereotype Application Location | | |+| |X|
- * ---------------------------------------
- */
- public class ResourcePerProfileStrategyLocationEditor extends ProfileApplicationEditor {
-
- /**
- * @param parent
- * @param style
- */
- public ResourcePerProfileStrategyLocationEditor(Composite parent, int style) {
- super(parent, style);
- }
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/ResourcePerProfileStrategyLocationPropertyEditor.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/ResourcePerProfileStrategyLocationPropertyEditor.java
deleted file mode 100644
index 6e8838cf7a2..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/src/org/eclipse/papyrus/uml/profile/externalresource/properties/widgets/ResourcePerProfileStrategyLocationPropertyEditor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*****************************************************************************
- * 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:
- * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.properties.widgets;
-
-import org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationEditor;
-import org.eclipse.papyrus.uml.properties.widgets.ProfileApplicationPropertyEditor;
-import org.eclipse.swt.widgets.Composite;
-
-/**
- * A Property editor for Profile Application, extended to support external resource for profile applications
- */
-public class ResourcePerProfileStrategyLocationPropertyEditor extends ProfileApplicationPropertyEditor {
-
- /**
- * Constructor.
- *
- * @param parent
- * @param style
- */
- public ResourcePerProfileStrategyLocationPropertyEditor(Composite parent, int style) {
- super(parent, style);
- setEditor(new ResourcePerProfileStrategyLocationEditor(parent, style));
- }
-
-
- public class ResourcePerProfileStrategyLocationEditor extends ProfileApplicationEditor {
-
- /**
- * @param parent
- * @param style
- */
- public ResourcePerProfileStrategyLocationEditor(Composite parent, int style) {
- super(parent, style);
- }
-
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.settings/org.eclipse.jdt.core.prefs b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b63063c..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/META-INF/MANIFEST.MF b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/META-INF/MANIFEST.MF
deleted file mode 100644
index ff092ba2322..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,27 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Profil in External Resources plugin project
-Bundle-SymbolicName: org.eclipse.papyrus.uml.profile.externalresource.tests;singleton:=true
-Bundle-Version: 0.10.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.profile.externalresource.tests.Activator
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.junit,
- org.eclipse.papyrus.uml.extensionpoints,
- org.eclipse.emf.ecore,
- org.eclipse.papyrus.infra.core;bundle-version="0.10.1",
- org.eclipse.core.resources;bundle-version="3.8.100",
- org.eclipse.papyrus.infra.core.log;bundle-version="0.10.1",
- org.eclipse.ui.ide;bundle-version="3.9.0",
- org.eclipse.papyrus.infra.emf;bundle-version="0.10.1",
- org.eclipse.papyrus.uml.tools;bundle-version="0.10.1",
- org.eclipse.pde;bundle-version="3.8.100",
- org.eclipse.pde.ui;bundle-version="3.8.0",
- org.eclipse.papyrus.uml.profile.externalresource;bundle-version="0.10.1",
- org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
- org.eclipse.papyrus.junit.utils;bundle-version="0.10.1",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="0.10.1"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.papyrus.uml.profile.externalresource.tests,
- org.eclipse.papyrus.uml.profile.externalresource.tests.resourceloading
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/plugin.xml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/plugin.xml
deleted file mode 100644
index 1af20507cbc..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/plugin.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.emf.ecore.uri_mapping">
- <mapping
- source="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/"
- target="platform:/plugin/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/"/>
- </extension>
- <extension point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
- <profile
- iconpath="resources/icons/testProfile.gif"
- name="ExternalResourcesTestProfile (Test)"
- path="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml"
- provider="Eclipse Modeling Project">
- </profile>
- </extension>
-
-</plugin> \ No newline at end of file
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.di b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.di
deleted file mode 100644
index a898e8fd771..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.di
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList>
- <availablePage>
- <emfPageIdentifier href="ExternalResourcesTestProfile.profile.notation#_yZ2kwPLPEeKxdJFsMzlLJA"/>
- </availablePage>
- <availablePage>
- <emfPageIdentifier href="ExternalResourcesTestProfile.profile.notation#_bpFtQPLQEeKxdJFsMzlLJA"/>
- </availablePage>
- </pageList>
- <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
- <windows>
- <children xsi:type="di:TabFolder">
- <children>
- <emfPageIdentifier href="ExternalResourcesTestProfile.profile.notation#_yZ2kwPLPEeKxdJFsMzlLJA"/>
- </children>
- <children>
- <emfPageIdentifier href="ExternalResourcesTestProfile.profile.notation#_bpFtQPLQEeKxdJFsMzlLJA"/>
- </children>
- </children>
- </windows>
- </sashModel>
-</di:SashWindowsMngr>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.notation
deleted file mode 100644
index 1c08fb5bb8c..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.notation
+++ /dev/null
@@ -1,202 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:l2="http://www.eclipse.org/uml2/4.0.0/UML/Profile/L2" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML">
- <notation:Diagram xmi:id="_yZ2kwPLPEeKxdJFsMzlLJA" type="PapyrusUMLProfileDiagram" name="Main" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_BRB0YPLQEeKxdJFsMzlLJA" type="1031" fillColor="8905185">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BRV9cPLQEeKxdJFsMzlLJA" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRXyoPLQEeKxdJFsMzlLJA" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRYZsPLQEeKxdJFsMzlLJA" key="StereotypeList" value="StandardProfileL2::Metaclass"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRZAwPLQEeKxdJFsMzlLJA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRZAwfLQEeKxdJFsMzlLJA" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRZAwvLQEeKxdJFsMzlLJA" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_BRP20PLQEeKxdJFsMzlLJA" type="1084"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_BZNgAPLQEeKxdJFsMzlLJA" visible="false" type="AppliedStereotypeCompartement">
- <styles xmi:type="notation:TitleStyle" xmi:id="_BZNgAfLQEeKxdJFsMzlLJA" showTitle="true"/>
- <element xmi:type="l2:Metaclass" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_Sh6H8KtKEeGF4uwJob34Mw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BZNgAvLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_BZU0wPLQEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZVb0PLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZWC4PLQEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_BZU0wfLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BZU0wvLQEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BRP20fLQEeKxdJFsMzlLJA" x="30" y="30" width="171" height="100"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_BRdSMPLQEeKxdJFsMzlLJA" type="1031" fillColor="8905185">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BRegUPLQEeKxdJFsMzlLJA" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRegUfLQEeKxdJFsMzlLJA" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRegUvLQEeKxdJFsMzlLJA" key="StereotypeList" value="StandardProfileL2::Metaclass"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRfHYPLQEeKxdJFsMzlLJA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRfHYfLQEeKxdJFsMzlLJA" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BRfHYvLQEeKxdJFsMzlLJA" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_BRdSMvLQEeKxdJFsMzlLJA" type="1084"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_BaerUPLQEeKxdJFsMzlLJA" visible="false" type="AppliedStereotypeCompartement">
- <styles xmi:type="notation:TitleStyle" xmi:id="_BaerUfLQEeKxdJFsMzlLJA" showTitle="true"/>
- <element xmi:type="l2:Metaclass" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_Sk8N0KtKEeGF4uwJob34Mw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaerUvLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_BaerU_LQEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BafSYPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BafSYfLQEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_BaerVPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BaerVfLQEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BRdSM_LQEeKxdJFsMzlLJA" x="260" y="30" width="171" height="100"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_Cm2X0PLQEeKxdJFsMzlLJA" type="1026">
- <children xmi:type="notation:DecorationNode" xmi:id="_Cm2X0vLQEeKxdJFsMzlLJA" type="1034"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_Cm8ecPLQEeKxdJFsMzlLJA" type="1071">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CnOLQPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CnOyUPLQEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_RvgZAPLQEeKxdJFsMzlLJA" type="3002">
- <element xmi:type="uml:Property" href="ExternalResourcesTestProfile.profile.uml#_RuBLQPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_RvgZAfLQEeKxdJFsMzlLJA"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_Cm8ecfLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Cm8ecvLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Cm8ec_LQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cm8edPLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_Cm9FgPLQEeKxdJFsMzlLJA" visible="false" type="1019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CnScsPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_CnScsfLQEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_Cm9FgfLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_Cm9FgvLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_Cm9Fg_LQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cm9FhPLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_CntTcPLQEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Cnt6gPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Cnt6gfLQEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_CntTcfLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_CntTcvLQEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Stereotype" href="ExternalResourcesTestProfile.profile.uml#_CmLCYPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Cm2X0fLQEeKxdJFsMzlLJA" x="30" y="230" width="171"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_FvT9kPLQEeKxdJFsMzlLJA" type="1026">
- <children xmi:type="notation:DecorationNode" xmi:id="_FvUkoPLQEeKxdJFsMzlLJA" type="1034"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_FvUkofLQEeKxdJFsMzlLJA" type="1071">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FvVLsPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FvVywPLQEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_FvUkovLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_FvUko_LQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_FvUkpPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FvUkpfLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_FvUkpvLQEeKxdJFsMzlLJA" visible="false" type="1019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FvVywfLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_FvVywvLQEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_FvUkp_LQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_FvUkqPLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_FvUkqfLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FvUkqvLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_Fvgx4PLQEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Fvgx4_LQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Fvgx5PLQEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_Fvgx4fLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Fvgx4vLQEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Stereotype" href="ExternalResourcesTestProfile.profile.uml#_Fu-mYPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_FvT9kfLQEeKxdJFsMzlLJA" x="260" y="230" width="171"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_yZ2kwfLPEeKxdJFsMzlLJA"/>
- <element xmi:type="uml:Profile" href="ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- <edges xmi:type="notation:Connector" xmi:id="_OjUJ0PLQEeKxdJFsMzlLJA" type="1013" source="_Cm2X0PLQEeKxdJFsMzlLJA" target="_BRB0YPLQEeKxdJFsMzlLJA">
- <styles xmi:type="notation:FontStyle" xmi:id="_OjUJ0fLQEeKxdJFsMzlLJA"/>
- <element xmi:type="uml:Extension" href="ExternalResourcesTestProfile.profile.uml#_Oi-LkPLQEeKxdJFsMzlLJA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_OjUJ0vLQEeKxdJFsMzlLJA" points="[-5, -8, -5, 150]$[-5, -108, -5, 50]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_OkJQQPLQEeKxdJFsMzlLJA" id="(0.49645390070921985,0.08)"/>
- </edges>
- <edges xmi:type="notation:Connector" xmi:id="_PnT9cPLQEeKxdJFsMzlLJA" type="1013" source="_FvT9kPLQEeKxdJFsMzlLJA" target="_BRdSMPLQEeKxdJFsMzlLJA">
- <styles xmi:type="notation:FontStyle" xmi:id="_PnT9cfLQEeKxdJFsMzlLJA"/>
- <element xmi:type="uml:Extension" href="ExternalResourcesTestProfile.profile.uml#_PnHJIPLQEeKxdJFsMzlLJA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_PnT9cvLQEeKxdJFsMzlLJA" points="[-2, -10, 1, 150]$[-73, -151, -70, 9]"/>
- <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_PnZdAPLQEeKxdJFsMzlLJA" id="(0.5177304964539007,0.1)"/>
- </edges>
- </notation:Diagram>
- <notation:Diagram xmi:id="_bpFtQPLQEeKxdJFsMzlLJA" type="PapyrusUMLProfileDiagram" name="SubProfile" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_gqIlQPLQEeKxdJFsMzlLJA" type="1031" fillColor="8905185">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_gqjcAPLQEeKxdJFsMzlLJA" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gqjcAfLQEeKxdJFsMzlLJA" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gqjcAvLQEeKxdJFsMzlLJA" key="StereotypeList" value="StandardProfileL2::Metaclass"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gqjcA_LQEeKxdJFsMzlLJA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gqjcBPLQEeKxdJFsMzlLJA" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gqjcBfLQEeKxdJFsMzlLJA" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_gqIlQvLQEeKxdJFsMzlLJA" type="1084"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_gqfxoPLQEeKxdJFsMzlLJA" visible="false" type="AppliedStereotypeCompartement">
- <styles xmi:type="notation:TitleStyle" xmi:id="_gqfxofLQEeKxdJFsMzlLJA" showTitle="true"/>
- <element xmi:type="l2:Metaclass" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_SjhRgKtKEeGF4uwJob34Mw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gqfxovLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_gqgYsPLQEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_gqg_wPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gqg_wfLQEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_gqgYsfLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gqgYsvLQEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_gqIlQfLQEeKxdJFsMzlLJA" x="95" y="25" width="246" height="98"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_hGOEUPLQEeKxdJFsMzlLJA" type="1026">
- <children xmi:type="notation:DecorationNode" xmi:id="_hGOrYPLQEeKxdJFsMzlLJA" type="1034"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_hGOrYfLQEeKxdJFsMzlLJA" type="1071">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hGOra_LQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hGOrbPLQEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_qy_EkPLQEeKxdJFsMzlLJA" type="3002">
- <element xmi:type="uml:Property" href="ExternalResourcesTestProfile.profile.uml#_qy0sgPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_qy_EkfLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_tTggkPLQEeKxdJFsMzlLJA" type="3002">
- <element xmi:type="uml:Property" href="ExternalResourcesTestProfile.profile.uml#_tTVhcPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Location" xmi:id="_tTggkfLQEeKxdJFsMzlLJA"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_hGOrYvLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_hGOrY_LQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_hGOrZPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hGOrZfLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_hGOrZvLQEeKxdJFsMzlLJA" visible="false" type="1019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hGPScPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hGPScfLQEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_hGOrZ_LQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_hGOraPLQEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_hGOrafLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hGOravLQEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_hGYcYPLQEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hGZqgPLQEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hGZqgfLQEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_hGZDcPLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hGZDcfLQEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Stereotype" href="ExternalResourcesTestProfile.profile.uml#_D86y4PLQEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_hGOEUfLQEeKxdJFsMzlLJA" x="93" y="243" width="246" height="98"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_bpFtQfLQEeKxdJFsMzlLJA"/>
- <element xmi:type="uml:Profile" href="ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- <edges xmi:type="notation:Connector" xmi:id="_hGgYMPLQEeKxdJFsMzlLJA" type="1013" source="_hGOEUPLQEeKxdJFsMzlLJA" target="_gqIlQPLQEeKxdJFsMzlLJA">
- <styles xmi:type="notation:FontStyle" xmi:id="_hGgYMfLQEeKxdJFsMzlLJA"/>
- <element xmi:type="uml:Extension" href="ExternalResourcesTestProfile.profile.uml#_PJRWkPLQEeKxdJFsMzlLJA"/>
- <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_hGgYMvLQEeKxdJFsMzlLJA" points="[0, 0, -196, -157]$[164, 132, -32, -25]"/>
- </edges>
- </notation:Diagram>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.uml
deleted file mode 100644
index 82254c7c111..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/ExternalResourcesTestProfile.profile.uml
+++ /dev/null
@@ -1,158 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Profile xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_yW4wUPLPEeKxdJFsMzlLJA" name="ExternalResourcesTestProfile" metaclassReference="_BQMG4PLQEeKxdJFsMzlLJA _BQu5cPLQEeKxdJFsMzlLJA" metamodelReference="_yW5XYPLPEeKxdJFsMzlLJA">
- <eAnnotations xmi:id="_7pf1EPLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <contents xmi:type="ecore:EPackage" xmi:id="_aPl0oPLZEeKxdJFsMzlLJA" name="ExternalResourcesTestProfile" nsURI="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" nsPrefix="ExternalResourcesTestProfile">
- <eAnnotations xmi:id="_aPl0ofLZEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_8HJwgPLPEeKxdJFsMzlLJA"/>
- <eAnnotations xmi:id="_aP7L0PLZEeKxdJFsMzlLJA" source="PapyrusVersion">
- <details xmi:id="_aP7L0fLZEeKxdJFsMzlLJA" key="Version" value="0.0.2"/>
- <details xmi:id="_aP7L0vLZEeKxdJFsMzlLJA" key="Comment" value="update default values for existing properties"/>
- <details xmi:id="_aP7L0_LZEeKxdJFsMzlLJA" key="Copyright" value=""/>
- <details xmi:id="_aP7L1PLZEeKxdJFsMzlLJA" key="Date" value="2013-07-22"/>
- <details xmi:id="_aP7L1fLZEeKxdJFsMzlLJA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_aPl0ovLZEeKxdJFsMzlLJA" name="ClassStereotype">
- <eAnnotations xmi:id="_aPl0o_LZEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_CmLCYPLQEeKxdJFsMzlLJA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_aPl0pPLZEeKxdJFsMzlLJA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_aPl0pvLZEeKxdJFsMzlLJA" name="stringValue" ordered="false" lowerBound="1" defaultValueLiteral="default">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_aPl0qPLZEeKxdJFsMzlLJA" name="PackageStereotype">
- <eAnnotations xmi:id="_aPl0qfLZEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Fu-mYPLQEeKxdJFsMzlLJA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_aPl0qvLZEeKxdJFsMzlLJA" name="base_Package" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_7pnw4PLYEeKxdJFsMzlLJA" name="ExternalResourcesTestProfile" nsURI="http:///schemas/ExternalResourcesTestProfile/_7pa8kPLYEeKxdJFsMzlLJA/0" nsPrefix="ExternalResourcesTestProfile">
- <eAnnotations xmi:id="_7pnw4fLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_8HJwgPLPEeKxdJFsMzlLJA"/>
- <eAnnotations xmi:id="_7qR4MPLYEeKxdJFsMzlLJA" source="PapyrusVersion">
- <details xmi:id="_7qR4MfLYEeKxdJFsMzlLJA" key="Version" value="0.0.1"/>
- <details xmi:id="_7qR4MvLYEeKxdJFsMzlLJA" key="Comment" value="First version of this test profile"/>
- <details xmi:id="_7qR4M_LYEeKxdJFsMzlLJA" key="Copyright" value=""/>
- <details xmi:id="_7qR4NPLYEeKxdJFsMzlLJA" key="Date" value="2013-07-22"/>
- <details xmi:id="_7qR4NfLYEeKxdJFsMzlLJA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_7pnw4vLYEeKxdJFsMzlLJA" name="ClassStereotype">
- <eAnnotations xmi:id="_7pnw4_LYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_CmLCYPLQEeKxdJFsMzlLJA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_7pnw5PLYEeKxdJFsMzlLJA" name="base_Class" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_7pnw5vLYEeKxdJFsMzlLJA" name="stringValue" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
- </eStructuralFeatures>
- </eClassifiers>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_7pnw6PLYEeKxdJFsMzlLJA" name="PackageStereotype">
- <eAnnotations xmi:id="_7pnw6fLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Fu-mYPLQEeKxdJFsMzlLJA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_7pnw6vLYEeKxdJFsMzlLJA" name="base_Package" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Package"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- </eAnnotations>
- <elementImport xmi:id="_BQMG4PLQEeKxdJFsMzlLJA" alias="Class">
- <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </elementImport>
- <elementImport xmi:id="_BQu5cPLQEeKxdJFsMzlLJA" alias="Package">
- <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
- </elementImport>
- <packageImport xmi:id="_yW5XYPLPEeKxdJFsMzlLJA">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
- </packageImport>
- <packageImport xmi:id="_yW5XYfLPEeKxdJFsMzlLJA">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Profile" xmi:id="_8HJwgPLPEeKxdJFsMzlLJA" name="SubProfile">
- <eAnnotations xmi:id="_7pspYfLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <contents xmi:type="ecore:EPackage" xmi:id="_aPpfAfLZEeKxdJFsMzlLJA" name="SubProfile" nsURI="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" nsPrefix="SubProfile">
- <eAnnotations xmi:id="_aQIAIPLZEeKxdJFsMzlLJA" source="PapyrusVersion">
- <details xmi:id="_aQIAIfLZEeKxdJFsMzlLJA" key="Version" value="0.0.2"/>
- <details xmi:id="_aQIAIvLZEeKxdJFsMzlLJA" key="Comment" value="update default values for existing properties"/>
- <details xmi:id="_aQIAI_LZEeKxdJFsMzlLJA" key="Copyright" value=""/>
- <details xmi:id="_aQIAJPLZEeKxdJFsMzlLJA" key="Date" value="2013-07-22"/>
- <details xmi:id="_aQIAJfLZEeKxdJFsMzlLJA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_aPpfAvLZEeKxdJFsMzlLJA" name="ElementStereotype">
- <eAnnotations xmi:id="_aPpfA_LZEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_D86y4PLQEeKxdJFsMzlLJA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_aPpfBPLZEeKxdJFsMzlLJA" name="base_Element" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_aPpfBvLZEeKxdJFsMzlLJA" name="stringSimple" ordered="false" lowerBound="1" defaultValueLiteral="defaultValue">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_aPpfCPLZEeKxdJFsMzlLJA" name="intSimple" ordered="false" unique="false" lowerBound="1" defaultValueLiteral="0">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- <contents xmi:type="ecore:EPackage" xmi:id="_7pz-IPLYEeKxdJFsMzlLJA" name="SubProfile" nsURI="http://ExternalResourcesTestProfile/schemas/SubProfile/_7pspYPLYEeKxdJFsMzlLJA/0" nsPrefix="SubProfile">
- <eAnnotations xmi:id="_7qdeYPLYEeKxdJFsMzlLJA" source="PapyrusVersion">
- <details xmi:id="_7qdeYfLYEeKxdJFsMzlLJA" key="Version" value="0.0.1"/>
- <details xmi:id="_7qdeYvLYEeKxdJFsMzlLJA" key="Comment" value="First version of this test profile"/>
- <details xmi:id="_7qdeY_LYEeKxdJFsMzlLJA" key="Copyright" value=""/>
- <details xmi:id="_7qdeZPLYEeKxdJFsMzlLJA" key="Date" value="2013-07-22"/>
- <details xmi:id="_7qdeZfLYEeKxdJFsMzlLJA" key="Author" value=""/>
- </eAnnotations>
- <eClassifiers xmi:type="ecore:EClass" xmi:id="_7pz-IfLYEeKxdJFsMzlLJA" name="ElementStereotype">
- <eAnnotations xmi:id="_7pz-IvLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_D86y4PLQEeKxdJFsMzlLJA"/>
- <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_7pz-I_LYEeKxdJFsMzlLJA" name="base_Element" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_7pz-JfLYEeKxdJFsMzlLJA" name="stringSimple" ordered="false" lowerBound="1">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
- </eStructuralFeatures>
- <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_7pz-J_LYEeKxdJFsMzlLJA" name="intSimple" ordered="false" unique="false" lowerBound="1">
- <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
- </eStructuralFeatures>
- </eClassifiers>
- </contents>
- </eAnnotations>
- <elementImport xmi:id="_BQg3APLQEeKxdJFsMzlLJA" alias="Element">
- <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
- </elementImport>
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_D86y4PLQEeKxdJFsMzlLJA" name="ElementStereotype">
- <ownedAttribute xmi:id="_PJJawPLQEeKxdJFsMzlLJA" name="base_Element" association="_PJRWkPLQEeKxdJFsMzlLJA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
- </ownedAttribute>
- <ownedAttribute xmi:id="_qy0sgPLQEeKxdJFsMzlLJA" name="stringSimple" visibility="public">
- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_s03cwPLQEeKxdJFsMzlLJA" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_s1E4IPLQEeKxdJFsMzlLJA" value="1"/>
- <defaultValue xmi:type="uml:LiteralString" xmi:id="_s1l1gPLQEeKxdJFsMzlLJA" name="defaultValueStringSimple" value="defaultValue"/>
- </ownedAttribute>
- <ownedAttribute xmi:id="_tTVhcPLQEeKxdJFsMzlLJA" name="intSimple" visibility="public" isUnique="false">
- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_unGPYPLQEeKxdJFsMzlLJA" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_unTDsPLQEeKxdJFsMzlLJA" value="1"/>
- <defaultValue xmi:type="uml:LiteralInteger" xmi:id="_NukkEPLZEeKxdJFsMzlLJA" name="defaultIntegerValue"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_PJRWkPLQEeKxdJFsMzlLJA" name="E_ElementStereotype_Element1" memberEnd="_PJRWkfLQEeKxdJFsMzlLJA _PJJawPLQEeKxdJFsMzlLJA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_PJRWkfLQEeKxdJFsMzlLJA" name="extension_ElementStereotype" type="_D86y4PLQEeKxdJFsMzlLJA" aggregation="composite" association="_PJRWkPLQEeKxdJFsMzlLJA"/>
- </packagedElement>
- </packagedElement>
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_CmLCYPLQEeKxdJFsMzlLJA" name="ClassStereotype">
- <ownedAttribute xmi:id="_Oi3d4PLQEeKxdJFsMzlLJA" name="base_Class" association="_Oi-LkPLQEeKxdJFsMzlLJA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
- </ownedAttribute>
- <ownedAttribute xmi:id="_RuBLQPLQEeKxdJFsMzlLJA" name="stringValue" visibility="public">
- <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
- <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_UqimwPLQEeKxdJFsMzlLJA" value="1"/>
- <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Uqx3UPLQEeKxdJFsMzlLJA" value="1"/>
- <defaultValue xmi:type="uml:LiteralString" xmi:id="_Urg3IPLQEeKxdJFsMzlLJA" name="stringValueDefautValue" value="default"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Stereotype" xmi:id="_Fu-mYPLQEeKxdJFsMzlLJA" name="PackageStereotype">
- <ownedAttribute xmi:id="_PnBpkPLQEeKxdJFsMzlLJA" name="base_Package" association="_PnHJIPLQEeKxdJFsMzlLJA">
- <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Package"/>
- </ownedAttribute>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_Oi-LkPLQEeKxdJFsMzlLJA" name="E_ClassStereotype_Class1" memberEnd="_Oi-yoPLQEeKxdJFsMzlLJA _Oi3d4PLQEeKxdJFsMzlLJA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Oi-yoPLQEeKxdJFsMzlLJA" name="extension_ClassStereotype" type="_CmLCYPLQEeKxdJFsMzlLJA" aggregation="composite" association="_Oi-LkPLQEeKxdJFsMzlLJA"/>
- </packagedElement>
- <packagedElement xmi:type="uml:Extension" xmi:id="_PnHJIPLQEeKxdJFsMzlLJA" name="E_PackageStereotype_Package1" memberEnd="_PnHJIfLQEeKxdJFsMzlLJA _PnBpkPLQEeKxdJFsMzlLJA">
- <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_PnHJIfLQEeKxdJFsMzlLJA" name="extension_PackageStereotype" type="_Fu-mYPLQEeKxdJFsMzlLJA" aggregation="composite" association="_PnHJIPLQEeKxdJFsMzlLJA"/>
- </packagedElement>
-</uml:Profile>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile
deleted file mode 100644
index b1369bf20a9..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.ExternalResourcesTestProfileProfile
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA">
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_sAW6IBYQEeOXvea8CstROg" base_Class="_qSrQUBYQEeOXvea8CstROg"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di
deleted file mode 100644
index 9bddb6f752a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.di
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList/>
- <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
- <windows>
- <children xsi:type="di:TabFolder"/>
- </windows>
- </sashModel>
-</di:SashWindowsMngr>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml
deleted file mode 100644
index bb18f81d46f..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Class3.uml
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA">
- <uml:Class xmi:id="_qSrQUBYQEeOXvea8CstROg" name="Class3"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile
deleted file mode 100644
index bead286fa11..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.ExternalResourcesTestProfileProfile
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA">
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_3b7lkBYQEeOXvea8CstROg" base_Class="_uLswUBYQEeOXvea8CstROg"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di
deleted file mode 100644
index 9bddb6f752a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.di
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList/>
- <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
- <windows>
- <children xsi:type="di:TabFolder"/>
- </windows>
- </sashModel>
-</di:SashWindowsMngr>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml
deleted file mode 100644
index b9c7ed2f8bc..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.uml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Package xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_tKnGwBYQEeOXvea8CstROg" name="Package1">
- <eAnnotations xmi:id="_WzTEgBYmEeOXvea8CstROg" source="http://www.eclipse.org/papyrus/uml/profile/externalresource">
- <details xmi:id="_WzTEgRYmEeOXvea8CstROg" key="locationStrategy" value="ResourcePerProfileStrategy"/>
- </eAnnotations>
- <packagedElement xmi:type="uml:Class" xmi:id="_uLswUBYQEeOXvea8CstROg" name="Package1_Class1"/>
- <profileApplication xmi:id="_3W-NEBYQEeOXvea8CstROg">
- <eAnnotations xmi:id="_3XmfMBYQEeOXvea8CstROg" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <eAnnotations xmi:id="_3cMEQBYQEeOXvea8CstROg" source="duplicatedProfile"/>
- <appliedProfile href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:id="_3cMrUBYQEeOXvea8CstROg">
- <eAnnotations xmi:id="_3ciCgBYQEeOXvea8CstROg" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <eAnnotations xmi:id="_3ciCgRYQEeOXvea8CstROg" source="duplicatedProfile"/>
- <appliedProfile href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
-</uml:Package>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.ExternalResourcesTestProfileProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.ExternalResourcesTestProfileProfile
deleted file mode 100644
index f61655dbe97..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.ExternalResourcesTestProfileProfile
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA">
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_QmeWQPuVEeKClrtZiAiidQ">
- <base_Class xmi:type="uml:Class" href="oneProfileApplied.uml#_6e1LAPVEEeKWG-T5DC87Xw"/>
- </ExternalResourcesTestProfile:ClassStereotype>
- <SubProfile:ElementStereotype xmi:id="_XPG3IPuVEeKClrtZiAiidQ">
- <base_Element xmi:type="uml:Class" href="oneProfileApplied.uml#_kyl8EPXIEeKjvqrMhLLWTg"/>
- </SubProfile:ElementStereotype>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation
deleted file mode 100644
index 0374acfd58a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.notation
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_LLO-QPVCEeKaxaN6QZe_iw" type="PapyrusUMLClassDiagram" name="Main" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_6g19MPVEEeKWG-T5DC87Xw" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-bIBcPVEEeKWG-T5DC87Xw" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngMPuVEeKClrtZiAiidQ" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngMfuVEeKClrtZiAiidQ" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngMvuVEeKClrtZiAiidQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngM_uVEeKClrtZiAiidQ" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngNPuVEeKClrtZiAiidQ" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_6g61sPVEEeKWG-T5DC87Xw" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HIPVEEeKWG-T5DC87Xw" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hqckPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hqckfVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HIfVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HIvVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HI_VEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HJPVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HJfVEEeKWG-T5DC87Xw" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hrqsPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hrqsfVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HJvVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HJ_VEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HKPVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HKfVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HKvVEEeKWG-T5DC87Xw" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hsRwPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hs40PVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HK_VEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HLPVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HLfVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HLvVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6mWvUPVEEeKWG-T5DC87Xw" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6mX9cPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6mX9cfVEEeKWG-T5DC87Xw" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6mWvUfVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6mWvUvVEEeKWG-T5DC87Xw"/>
- </children>
- <element xmi:type="uml:Class" href="oneProfileApplied.uml#_6e1LAPVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g19MfVEEeKWG-T5DC87Xw" x="40" y="25" width="321" height="331"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_k19ZIPXIEeKjvqrMhLLWTg" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_my94YPXIEeKjvqrMhLLWTg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvoPuVEeKClrtZiAiidQ" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvofuVEeKClrtZiAiidQ" key="StereotypeList" value="ExternalResourcesTestProfile::SubProfile::ElementStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvovuVEeKClrtZiAiidQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvo_uVEeKClrtZiAiidQ" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvpPuVEeKClrtZiAiidQ" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_k1_OUPXIEeKjvqrMhLLWTg" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1YPXIEeKjvqrMhLLWTg" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2AccPXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2AccfXIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1YfXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1YvXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1Y_XIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1ZPXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1ZfXIEeKjvqrMhLLWTg" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2AccvXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2Acc_XIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1ZvXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1Z_XIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1aPXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1afXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1avXIEeKjvqrMhLLWTg" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2BDgPXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2BDgfXIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1a_XIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1bPXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1bfXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1bvXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k2MpsPXIEeKjvqrMhLLWTg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2Mps_XIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2MptPXIEeKjvqrMhLLWTg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k2MpsfXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k2MpsvXIEeKjvqrMhLLWTg"/>
- </children>
- <element xmi:type="uml:Class" href="oneProfileApplied.uml#_kyl8EPXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k19ZIfXIEeKjvqrMhLLWTg" x="575" y="30" width="336" height="331"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_qVOOABYQEeOXvea8CstROg" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sA1bQBYQEeOXvea8CstROg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA2pYBYQEeOXvea8CstROg" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA33gBYQEeOXvea8CstROg" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA4ekBYQEeOXvea8CstROg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA4ekRYQEeOXvea8CstROg" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_sA4ekhYQEeOXvea8CstROg" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_qVR4YBYQEeOXvea8CstROg" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_qVTGgBYQEeOXvea8CstROg" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVU7sBYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVU7sRYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_qVTGgRYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_qVTGghYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_qVTGgxYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVTGhBYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_qVTGhRYQEeOXvea8CstROg" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVViwBYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVViwRYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_qVTGhhYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_qVTGhxYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_qVTGiBYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVTGiRYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_qVTGihYQEeOXvea8CstROg" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVWJ0BYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVWJ0RYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_qVTGixYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_qVTGjBYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_qVTGjRYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVTGjhYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_qVy1wBYQEeOXvea8CstROg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_qVzc0BYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qVzc0RYQEeOXvea8CstROg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_qVy1wRYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVy1whYQEeOXvea8CstROg"/>
- </children>
- <element xmi:type="uml:Class" href="Class3.uml#_qSrQUBYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_qVOOARYQEeOXvea8CstROg" x="1005" y="35" width="296" height="331"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_tKwQsBYQEeOXvea8CstROg" type="2007">
- <children xmi:type="notation:DecorationNode" xmi:id="_tKwQshYQEeOXvea8CstROg" type="5026"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_tKwQsxYQEeOXvea8CstROg" type="7016">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tK724BYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tK724RYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_uLwasBYQEeOXvea8CstROg" type="3010">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_yRh9QBYQEeOXvea8CstROg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRh9QRYQEeOXvea8CstROg" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikUBYQEeOXvea8CstROg" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikURYQEeOXvea8CstROg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikUhYQEeOXvea8CstROg" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_yRikUxYQEeOXvea8CstROg" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_uLxBwRYQEeOXvea8CstROg" type="5014"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_uLxBwhYQEeOXvea8CstROg" type="7011">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uL1TMBYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uL1TMRYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_uLxBwxYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_uLxBxBYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_uLxBxRYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxBxhYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_uLxo0BYQEeOXvea8CstROg" type="7012">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uL16QBYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uL16QRYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_uLxo0RYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_uLxo0hYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_uLxo0xYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxo1BYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_uLxo1RYQEeOXvea8CstROg" type="7013">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uL2hUBYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uL2hURYQEeOXvea8CstROg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_uLxo1hYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_uLxo1xYQEeOXvea8CstROg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_uLxo2BYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxo2RYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_uMT0UBYQEeOXvea8CstROg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_uMUbYBYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_uMUbYRYQEeOXvea8CstROg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_uMT0URYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uMT0UhYQEeOXvea8CstROg"/>
- </children>
- <element xmi:type="uml:Class" href="Package1.uml#_uLswUBYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_uLxBwBYQEeOXvea8CstROg" x="85" y="2" width="226" height="151"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_tKwQtBYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKwQtRYQEeOXvea8CstROg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_tLnzYBYQEeOXvea8CstROg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tLnzYxYQEeOXvea8CstROg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_tLnzZBYQEeOXvea8CstROg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_tLnzYRYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tLnzYhYQEeOXvea8CstROg"/>
- </children>
- <element xmi:type="uml:Package" href="Package1.uml#_tKnGwBYQEeOXvea8CstROg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_tKwQsRYQEeOXvea8CstROg" x="325" y="430" width="701" height="211"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_LLO-QfVCEeKaxaN6QZe_iw"/>
- <element xmi:type="uml:Model" href="oneProfileApplied.uml#_LK5nEPVCEeKaxaN6QZe_iw"/>
-</notation:Diagram>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml
deleted file mode 100644
index 70fe0ea0022..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.uml
+++ /dev/null
@@ -1,25 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_LK5nEPVCEeKaxaN6QZe_iw" name="Model">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_zB4P8PuUEeKClrtZiAiidQ" source="http://www.eclipse.org/papyrus/uml/profile/externalresource">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zB4P8fuUEeKClrtZiAiidQ" key="locationStrategy" value="ResourcePerProfileStrategy"/>
- </eAnnotations>
- <packageImport xmi:type="uml:PackageImport" xmi:id="_LK5nEfVCEeKaxaN6QZe_iw">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Class" xmi:id="_6e1LAPVEEeKWG-T5DC87Xw" name="Class1"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_kyl8EPXIEeKjvqrMhLLWTg" name="Class2"/>
- <packagedElement xmi:type="uml:Class" href="Class3.uml#_qSrQUBYQEeOXvea8CstROg"/>
- <packagedElement xmi:type="uml:Package" href="Package1.uml#_tKnGwBYQEeOXvea8CstROg"/>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JIjYPVEEeKWG-T5DC87Xw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5JehoPVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JmdcPVEEeKWG-T5DC87Xw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5J1G8PVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
-</uml:Model>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.notation
deleted file mode 100644
index 67884c42ae1..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.notation
+++ /dev/null
@@ -1,97 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_LLO-QPVCEeKaxaN6QZe_iw" type="PapyrusUMLClassDiagram" name="Main" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_6g19MPVEEeKWG-T5DC87Xw" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-bIBcPVEEeKWG-T5DC87Xw" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pyPhgPksEeK1io5hEcSdZA" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pyQIkPksEeK1io5hEcSdZA" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pyQIkfksEeK1io5hEcSdZA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pyQIkvksEeK1io5hEcSdZA" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_pyQIk_ksEeK1io5hEcSdZA" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_6g61sPVEEeKWG-T5DC87Xw" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HIPVEEeKWG-T5DC87Xw" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hqckPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hqckfVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HIfVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HIvVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HI_VEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HJPVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HJfVEEeKWG-T5DC87Xw" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hrqsPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hrqsfVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HJvVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HJ_VEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HKPVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HKfVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HKvVEEeKWG-T5DC87Xw" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hsRwPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hs40PVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HK_VEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HLPVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HLfVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HLvVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6mWvUPVEEeKWG-T5DC87Xw" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6mX9cPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6mX9cfVEEeKWG-T5DC87Xw" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6mWvUfVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6mWvUvVEEeKWG-T5DC87Xw"/>
- </children>
- <element xmi:type="uml:Class" href="oneProfileApplied.uml#_6e1LAPVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g19MfVEEeKWG-T5DC87Xw" x="280" y="185" width="321" height="331"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_k19ZIPXIEeKjvqrMhLLWTg" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_my94YPXIEeKjvqrMhLLWTg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qlsXsPksEeK1io5hEcSdZA" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qls-wPksEeK1io5hEcSdZA" key="StereotypeList" value="ExternalResourcesTestProfile::SubProfile::ElementStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qls-wfksEeK1io5hEcSdZA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qltl0PksEeK1io5hEcSdZA" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_qltl0fksEeK1io5hEcSdZA" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_k1_OUPXIEeKjvqrMhLLWTg" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1YPXIEeKjvqrMhLLWTg" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2AccPXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2AccfXIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1YfXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1YvXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1Y_XIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1ZPXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1ZfXIEeKjvqrMhLLWTg" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2AccvXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2Acc_XIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1ZvXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1Z_XIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1aPXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1afXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1avXIEeKjvqrMhLLWTg" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2BDgPXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2BDgfXIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1a_XIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1bPXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1bfXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1bvXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k2MpsPXIEeKjvqrMhLLWTg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2Mps_XIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2MptPXIEeKjvqrMhLLWTg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k2MpsfXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k2MpsvXIEeKjvqrMhLLWTg"/>
- </children>
- <element xmi:type="uml:Class" href="oneProfileApplied.uml#_kyl8EPXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k19ZIfXIEeKjvqrMhLLWTg" x="725" y="180" width="336" height="331"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_LLO-QfVCEeKaxaN6QZe_iw"/>
- <element xmi:type="uml:Model" href="oneProfileApplied.uml#_LK5nEPVCEeKaxaN6QZe_iw"/>
-</notation:Diagram>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.profiles b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.profiles
deleted file mode 100644
index 8e465a27624..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.profiles
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA">
- <ExternalResourcesTestProfile:ClassStereotype stringValue="class1Value&#xD;&#xA;">
- <base_Class xmi:type="uml:Class" href="oneProfileApplied.uml#_6e1LAPVEEeKWG-T5DC87Xw"/>
- </ExternalResourcesTestProfile:ClassStereotype>
- <SubProfile:ElementStereotype stringSimple="Class2Value" intSimple="3">
- <base_Element xmi:type="uml:Class" href="oneProfileApplied.uml#_kyl8EPXIEeKjvqrMhLLWTg"/>
- </SubProfile:ElementStereotype>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.uml
deleted file mode 100644
index 38a4dd005eb..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.uml
+++ /dev/null
@@ -1,23 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<uml:Model xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_LK5nEPVCEeKaxaN6QZe_iw" name="Model">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_ytmUkP2uEeKClrtZiAiidQ" source="http://www.eclipse.org/papyrus/uml/profile/externalresource">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_ytmUkf2uEeKClrtZiAiidQ" key="locationStrategy" value="OneResourceOnlyStrategy"/>
- </eAnnotations>
- <packageImport xmi:type="uml:PackageImport" xmi:id="_LK5nEfVCEeKaxaN6QZe_iw">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Class" xmi:id="_6e1LAPVEEeKWG-T5DC87Xw" name="Class1"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_kyl8EPXIEeKjvqrMhLLWTg" name="Class2"/>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JIjYPVEEeKWG-T5DC87Xw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5JehoPVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JmdcPVEEeKWG-T5DC87Xw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5J1G8PVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
-</uml:Model>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.ExternalResourcesTestProfileProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.ExternalResourcesTestProfileProfile
deleted file mode 100644
index 07ce2c43014..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.ExternalResourcesTestProfileProfile
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701"/>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.SysMLProfile b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.SysMLProfile
deleted file mode 100644
index 4737d17bfb9..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.SysMLProfile
+++ /dev/null
@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<Blocks:Block xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Blocks="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/0.7.0/SysML/Blocks http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks" xmi:id="_UuaJwPqJEeKrCKXbcChcTw">
- <base_Class xmi:type="uml:Class" href="SimpleTestModel.uml#_kdOGQPLZEeKxdJFsMzlLJA"/>
-</Blocks:Block>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.notation
deleted file mode 100644
index 68b202b2187..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.notation
+++ /dev/null
@@ -1,143 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_YTWm4PLYEeKxdJFsMzlLJA" type="PapyrusUMLClassDiagram" name="Main" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_djz-cPLZEeKxdJFsMzlLJA" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_eth_kPLZEeKxdJFsMzlLJA" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_NaiigPnkEeK6o8XJ3nuIOQ" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_NaiigfnkEeK6o8XJ3nuIOQ" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_NaiigvnkEeK6o8XJ3nuIOQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Naiig_nkEeK6o8XJ3nuIOQ" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_NajJkPnkEeK6o8XJ3nuIOQ" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_djz-cvLZEeKxdJFsMzlLJA" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_djz-c_LZEeKxdJFsMzlLJA" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dj9IYPLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dj9IYfLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_djz-dPLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_djz-dfLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_djz-dvLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_djz-d_LZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_dj0lgPLZEeKxdJFsMzlLJA" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dj-9kPLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dj-9kfLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_dj0lgfLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_dj0lgvLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_dj0lg_LZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dj0lhPLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_dj0lhfLZEeKxdJFsMzlLJA" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dkALsPLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dkALsfLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_dj0lhvLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_dj0lh_LZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_dj0liPLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dj0lifLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_dkt9YPLZEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dkt9Y_LZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dkt9ZPLZEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_dkt9YfLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_dkt9YvLZEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Class" href="SimpleTestModel.uml#_djpmYPLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_djz-cfLZEeKxdJFsMzlLJA" x="55" y="35" width="266"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_fQ5LUPLZEeKxdJFsMzlLJA" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_gaKggPLZEeKxdJFsMzlLJA" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gal-UPLZEeKxdJFsMzlLJA" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gal-UfLZEeKxdJFsMzlLJA" key="StereotypeList" value="ExternalResourcesTestProfile::SubProfile::ElementStereotype,ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gal-UvLZEeKxdJFsMzlLJA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gal-U_LZEeKxdJFsMzlLJA" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_gal-VPLZEeKxdJFsMzlLJA" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_fQ5LUvLZEeKxdJFsMzlLJA" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fQ5yYPLZEeKxdJFsMzlLJA" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fQ5yb_LZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fQ5ycPLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_fQ5yYfLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fQ5yYvLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fQ5yY_LZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fQ5yZPLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fQ5yZfLZEeKxdJFsMzlLJA" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fQ6ZcPLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fQ6ZcfLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_fQ5yZvLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fQ5yZ_LZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fQ5yaPLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fQ5yafLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fQ5yavLZEeKxdJFsMzlLJA" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fQ6ZcvLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fQ6Zc_LZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_fQ5ya_LZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_fQ5ybPLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_fQ5ybfLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fQ5ybvLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_fRHNwPLZEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fRHNw_LZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fRHNxPLZEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_fRHNwfLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fRHNwvLZEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Class" href="SimpleTestModel.uml#_fQs-EPLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_fQ5LUfLZEeKxdJFsMzlLJA" x="55" y="155" width="266"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_kdaTgPLZEeKxdJFsMzlLJA" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_wE_goPnqEeK6o8XJ3nuIOQ" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_U2w0gPqJEeKrCKXbcChcTw" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_U2w0gfqJEeKrCKXbcChcTw" key="StereotypeList" value="SysML::Blocks::Block"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_U2w0gvqJEeKrCKXbcChcTw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_U2w0g_qJEeKrCKXbcChcTw" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_U2w0hPqJEeKrCKXbcChcTw" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_kda6kPLZEeKxdJFsMzlLJA" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_kda6kfLZEeKxdJFsMzlLJA" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kdcIsPLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kdcIsfLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_kda6kvLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kda6k_LZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kda6lPLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kda6lfLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_kda6lvLZEeKxdJFsMzlLJA" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kdcvwPLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kdcvwfLZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_kda6l_LZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kda6mPLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kda6mfLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kda6mvLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_kdbhoPLZEeKxdJFsMzlLJA" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kdcvwvLZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kdcvw_LZEeKxdJFsMzlLJA" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_kdbhofLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_kdbhovLZEeKxdJFsMzlLJA"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_kdbho_LZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kdbhpPLZEeKxdJFsMzlLJA"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_kdnu4PLZEeKxdJFsMzlLJA" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kdnu4_LZEeKxdJFsMzlLJA" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kdnu5PLZEeKxdJFsMzlLJA" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_kdnu4fLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kdnu4vLZEeKxdJFsMzlLJA"/>
- </children>
- <element xmi:type="uml:Class" href="SimpleTestModel.uml#_kdOGQPLZEeKxdJFsMzlLJA"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_kdaTgfLZEeKxdJFsMzlLJA" x="55" y="280" width="266" height="104"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_YTWm4fLYEeKxdJFsMzlLJA"/>
- <element xmi:type="uml:Model" href="SimpleTestModel.uml#_YTUKoPLYEeKxdJFsMzlLJA"/>
-</notation:Diagram>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.uml
deleted file mode 100644
index d85de22b2a8..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.uml
+++ /dev/null
@@ -1,32 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA">
- <uml:Model xmi:id="_YTUKoPLYEeKxdJFsMzlLJA" name="SimpleTestModel">
- <packageImport xmi:type="uml:PackageImport" xmi:id="_YTUKofLYEeKxdJFsMzlLJA">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Class" xmi:id="_djpmYPLZEeKxdJFsMzlLJA" name="ClassStereotypeApplied"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_fQs-EPLZEeKxdJFsMzlLJA" name="TwoStereotypesApplied"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_kdOGQPLZEeKxdJFsMzlLJA" name="NoStereotype"/>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_9xv7APLYEeKxdJFsMzlLJA">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9yoEwPLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_9y0SAPLYEeKxdJFsMzlLJA">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9zjR0PLYEeKxdJFsMzlLJA" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_kzznYPqGEeKrCKXbcChcTw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k0XBAPqGEeKrCKXbcChcTw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/papyrus/0.7.0/SysML#//blocks"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://SysML_PROFILES/SysML.profile.uml#_fSw28LX7EduFmqQsrNB9lw"/>
- </profileApplication>
- </uml:Model>
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_etI-APLZEeKxdJFsMzlLJA" base_Class="_djpmYPLZEeKxdJFsMzlLJA"/>
- <SubProfile:ElementStereotype xmi:id="_gZ2-gPLZEeKxdJFsMzlLJA" base_Element="_fQs-EPLZEeKxdJFsMzlLJA"/>
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_gaQAEPLZEeKxdJFsMzlLJA" base_Class="_fQs-EPLZEeKxdJFsMzlLJA" stringValue="wantedValue"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.di b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.di
deleted file mode 100644
index 9bddb6f752a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.di
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList/>
- <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
- <windows>
- <children xsi:type="di:TabFolder"/>
- </windows>
- </sashModel>
-</di:SashWindowsMngr>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.notation
deleted file mode 100644
index bf9abab340f..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.notation
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.uml
deleted file mode 100644
index dfffc2f5133..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Class3.uml
+++ /dev/null
@@ -1,5 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA">
- <uml:Class xmi:id="_YpQ8UBCvEeOTVqJPk38YKg" name="Class3"/>
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_cEyA8BCvEeOTVqJPk38YKg" base_Class="_YpQ8UBCvEeOTVqJPk38YKg"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.notation
deleted file mode 100644
index bf9abab340f..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.notation
+++ /dev/null
@@ -1,2 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.uml
deleted file mode 100644
index 9c10cf2a4b2..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.uml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA">
- <uml:Package xmi:id="_VSiREBCvEeOTVqJPk38YKg" name="Package1">
- <packagedElement xmi:type="uml:Class" xmi:id="_WzY_0BCvEeOTVqJPk38YKg" name="Package1_Class1"/>
- <profileApplication xmi:id="_fTc8YBCvEeOTVqJPk38YKg">
- <eAnnotations xmi:id="_fTq-0BCvEeOTVqJPk38YKg" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <eAnnotations xmi:id="_fZtVYBCvEeOTVqJPk38YKg" source="duplicatedProfile"/>
- <appliedProfile href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:id="_fZt8cBCvEeOTVqJPk38YKg">
- <eAnnotations xmi:id="_faAQUBCvEeOTVqJPk38YKg" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <eAnnotations xmi:id="_faA3YBCvEeOTVqJPk38YKg" source="duplicatedProfile"/>
- <appliedProfile href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- </uml:Package>
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_bXZ9kBCvEeOTVqJPk38YKg" base_Class="_WzY_0BCvEeOTVqJPk38YKg"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.notation b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.notation
deleted file mode 100644
index c6eb655ceb9..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.notation
+++ /dev/null
@@ -1,208 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_LLO-QPVCEeKaxaN6QZe_iw" type="PapyrusUMLClassDiagram" name="Main" measurementUnit="Pixel">
- <children xmi:type="notation:Shape" xmi:id="_6g19MPVEEeKWG-T5DC87Xw" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_-bIBcPVEEeKWG-T5DC87Xw" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngMPuVEeKClrtZiAiidQ" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngMfuVEeKClrtZiAiidQ" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngMvuVEeKClrtZiAiidQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngM_uVEeKClrtZiAiidQ" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_QmngNPuVEeKClrtZiAiidQ" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_6g61sPVEEeKWG-T5DC87Xw" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HIPVEEeKWG-T5DC87Xw" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hqckPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hqckfVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HIfVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HIvVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HI_VEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HJPVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HJfVEEeKWG-T5DC87Xw" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hrqsPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hrqsfVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HJvVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HJ_VEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HKPVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HKfVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6g_HKvVEEeKWG-T5DC87Xw" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6hsRwPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6hs40PVEEeKWG-T5DC87Xw" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6g_HK_VEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_6g_HLPVEEeKWG-T5DC87Xw"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_6g_HLfVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g_HLvVEEeKWG-T5DC87Xw"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_6mWvUPVEEeKWG-T5DC87Xw" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6mX9cPVEEeKWG-T5DC87Xw" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6mX9cfVEEeKWG-T5DC87Xw" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_6mWvUfVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6mWvUvVEEeKWG-T5DC87Xw"/>
- </children>
- <element xmi:type="uml:Class" href="oneProfileApplied.uml#_6e1LAPVEEeKWG-T5DC87Xw"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6g19MfVEEeKWG-T5DC87Xw" x="40" y="25" width="321" height="331"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_k19ZIPXIEeKjvqrMhLLWTg" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_my94YPXIEeKjvqrMhLLWTg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvoPuVEeKClrtZiAiidQ" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvofuVEeKClrtZiAiidQ" key="StereotypeList" value="ExternalResourcesTestProfile::SubProfile::ElementStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvovuVEeKClrtZiAiidQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvo_uVEeKClrtZiAiidQ" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XPLvpPuVEeKClrtZiAiidQ" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_k1_OUPXIEeKjvqrMhLLWTg" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1YPXIEeKjvqrMhLLWTg" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2AccPXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2AccfXIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1YfXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1YvXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1Y_XIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1ZPXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1ZfXIEeKjvqrMhLLWTg" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2AccvXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2Acc_XIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1ZvXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1Z_XIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1aPXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1afXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k1_1avXIEeKjvqrMhLLWTg" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2BDgPXIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2BDgfXIEeKjvqrMhLLWTg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k1_1a_XIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_k1_1bPXIEeKjvqrMhLLWTg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_k1_1bfXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k1_1bvXIEeKjvqrMhLLWTg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_k2MpsPXIEeKjvqrMhLLWTg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_k2Mps_XIEeKjvqrMhLLWTg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_k2MptPXIEeKjvqrMhLLWTg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_k2MpsfXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k2MpsvXIEeKjvqrMhLLWTg"/>
- </children>
- <element xmi:type="uml:Class" href="oneProfileApplied.uml#_kyl8EPXIEeKjvqrMhLLWTg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_k19ZIfXIEeKjvqrMhLLWTg" x="575" y="30" width="336" height="331"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_VTIG8BCvEeOTVqJPk38YKg" type="2007">
- <children xmi:type="notation:DecorationNode" xmi:id="_VTJ8IBCvEeOTVqJPk38YKg" type="5026"/>
- <children xmi:type="notation:DecorationNode" xmi:id="_VTJ8IRCvEeOTVqJPk38YKg" type="7016">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VTQp0BCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VTQp0RCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <children xmi:type="notation:Shape" xmi:id="_Wzu-EBCvEeOTVqJPk38YKg" type="3010">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bXp1MBCvEeOTVqJPk38YKg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bXqcQBCvEeOTVqJPk38YKg" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bXqcQRCvEeOTVqJPk38YKg" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bXqcQhCvEeOTVqJPk38YKg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bXqcQxCvEeOTVqJPk38YKg" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_bXqcRBCvEeOTVqJPk38YKg" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_Wzu-EhCvEeOTVqJPk38YKg" type="5014"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_Wzu-ExCvEeOTVqJPk38YKg" type="7011">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WzyBYBCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WzyBYRCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_WzvlIBCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_WzvlIRCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_WzvlIhCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WzvlIxCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_WzvlJBCvEeOTVqJPk38YKg" type="7012">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WzyocBCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WzyocRCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_WzvlJRCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_WzvlJhCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_WzvlJxCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WzvlKBCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_WzvlKRCvEeOTVqJPk38YKg" type="7013">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WzzPgBCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Wzz2kBCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_WzvlKhCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_WzvlKxCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_WzvlLBCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WzvlLRCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_W0JNwBCvEeOTVqJPk38YKg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_W0JNwxCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_W0JNxBCvEeOTVqJPk38YKg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_W0JNwRCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_W0JNwhCvEeOTVqJPk38YKg"/>
- </children>
- <element xmi:type="uml:Class" href="Package1.uml#_WzY_0BCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Wzu-ERCvEeOTVqJPk38YKg" x="85" y="17" width="186" height="136"/>
- </children>
- <styles xmi:type="notation:TitleStyle" xmi:id="_VTJ8IhCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VTJ8IxCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_VTlZ8BCvEeOTVqJPk38YKg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_VTlZ8xCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_VTlZ9BCvEeOTVqJPk38YKg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_VTlZ8RCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VTlZ8hCvEeOTVqJPk38YKg"/>
- </children>
- <element xmi:type="uml:Package" href="Package1.uml#_VSiREBCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_VTIG8RCvEeOTVqJPk38YKg" x="210" y="420" width="511" height="201"/>
- </children>
- <children xmi:type="notation:Shape" xmi:id="_YpSKcBCvEeOTVqJPk38YKg" type="2008">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_cE7K4BCvEeOTVqJPk38YKg" source="Stereotype_Annotation">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cE7K4RCvEeOTVqJPk38YKg" key="StereotypeWithQualifiedNameList" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cE7x8BCvEeOTVqJPk38YKg" key="StereotypeList" value="ExternalResourcesTestProfile::ClassStereotype"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cE7x8RCvEeOTVqJPk38YKg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cE7x8hCvEeOTVqJPk38YKg" key="PropStereoDisplay" value=""/>
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_cE7x8xCvEeOTVqJPk38YKg" key="StereotypePropertyLocation" value="Compartment"/>
- </eAnnotations>
- <children xmi:type="notation:DecorationNode" xmi:id="_YpSxgBCvEeOTVqJPk38YKg" type="5029"/>
- <children xmi:type="notation:BasicCompartment" xmi:id="_YpSxgRCvEeOTVqJPk38YKg" type="7017">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YpTYkBCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YpTYkRCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_YpSxghCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_YpSxgxCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_YpSxhBCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YpSxhRCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_YpSxhhCvEeOTVqJPk38YKg" type="7018">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YpTYkhCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YpTYkxCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_YpSxhxCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_YpSxiBCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_YpSxiRCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YpSxihCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_YpSxixCvEeOTVqJPk38YKg" type="7019">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_YpTYlBCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_YpT_oBCvEeOTVqJPk38YKg" key="showTitle" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_YpSxjBCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:SortingStyle" xmi:id="_YpSxjRCvEeOTVqJPk38YKg"/>
- <styles xmi:type="notation:FilteringStyle" xmi:id="_YpSxjhCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YpSxjxCvEeOTVqJPk38YKg"/>
- </children>
- <children xmi:type="notation:BasicCompartment" xmi:id="_YpgM4BCvEeOTVqJPk38YKg" visible="false" type="compartment_shape_display">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Ypgz8BCvEeOTVqJPk38YKg" source="PapyrusCSSForceValue">
- <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Ypgz8RCvEeOTVqJPk38YKg" key="mutable" value="true"/>
- </eAnnotations>
- <styles xmi:type="notation:TitleStyle" xmi:id="_YpgM4RCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YpgM4hCvEeOTVqJPk38YKg"/>
- </children>
- <element xmi:type="uml:Class" href="Class3.uml#_YpQ8UBCvEeOTVqJPk38YKg"/>
- <layoutConstraint xmi:type="notation:Bounds" xmi:id="_YpSKcRCvEeOTVqJPk38YKg" x="785" y="420" width="181" height="196"/>
- </children>
- <styles xmi:type="notation:DiagramStyle" xmi:id="_LLO-QfVCEeKaxaN6QZe_iw"/>
- <element xmi:type="uml:Model" href="oneProfileApplied.uml#_LK5nEPVCEeKaxaN6QZe_iw"/>
-</notation:Diagram>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.uml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.uml
deleted file mode 100644
index 17a1c6fc252..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.uml
+++ /dev/null
@@ -1,26 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xmi:XMI xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ExternalResourcesTestProfile="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1" xmlns:SubProfile="http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xsi:schemaLocation="http:///schemas/ExternalResourcesTestProfile/_aPlNkPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA http://ExternalResourcesTestProfile/schemas/SubProfile/_aPpfAPLZEeKxdJFsMzlLJA/1 pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA">
- <uml:Model xmi:id="_LK5nEPVCEeKaxaN6QZe_iw" name="Model">
- <packageImport xmi:type="uml:PackageImport" xmi:id="_LK5nEfVCEeKaxaN6QZe_iw">
- <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
- </packageImport>
- <packagedElement xmi:type="uml:Class" xmi:id="_6e1LAPVEEeKWG-T5DC87Xw" name="Class1"/>
- <packagedElement xmi:type="uml:Class" xmi:id="_kyl8EPXIEeKjvqrMhLLWTg" name="Class2"/>
- <packagedElement xmi:type="uml:Package" href="Package1.uml#_VSiREBCvEeOTVqJPk38YKg"/>
- <packagedElement xmi:type="uml:Class" href="Class3.uml#_YpQ8UBCvEeOTVqJPk38YKg"/>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JIjYPVEEeKWG-T5DC87Xw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5JehoPVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPl0oPLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_yW4wUPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_5JmdcPVEEeKWG-T5DC87Xw">
- <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_5J1G8PVEEeKWG-T5DC87Xw" source="http://www.eclipse.org/uml2/2.0.0/UML">
- <references xmi:type="ecore:EPackage" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_aPpfAfLZEeKxdJFsMzlLJA"/>
- </eAnnotations>
- <appliedProfile xmi:type="uml:Profile" href="pathmap://EXTERNAL_RESOURCE_TEST_PATHMAP/ExternalResourcesTestProfile.profile.uml#_8HJwgPLPEeKxdJFsMzlLJA"/>
- </profileApplication>
- </uml:Model>
- <ExternalResourcesTestProfile:ClassStereotype xmi:id="_QmeWQPuVEeKClrtZiAiidQ" base_Class="_6e1LAPVEEeKWG-T5DC87Xw"/>
- <SubProfile:ElementStereotype xmi:id="_XPG3IPuVEeKClrtZiAiidQ" base_Element="_kyl8EPXIEeKjvqrMhLLWTg"/>
-</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/icons/testProfile.gif b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/icons/testProfile.gif
deleted file mode 100644
index 542dddca3f2..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/icons/testProfile.gif
+++ /dev/null
Binary files differ
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractChangeStrategyTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractChangeStrategyTests.java
deleted file mode 100644
index c3ec7b69438..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractChangeStrategyTests.java
+++ /dev/null
@@ -1,251 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests;
-
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.List;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Path;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.ExternalResourceProfileUtils;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.IStereotypeApplicationLocationStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.OneResourceOnlyStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.PapyrusStereotypeApplicationHelper;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.ResourcePerProfileStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.StandardApplicationLocationStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.StrategyRegistry;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.Assert;
-import org.junit.Test;
-
-/**
- * Abstract class for all change strategy tests
- */
-public abstract class AbstractChangeStrategyTests extends AbstractExternalResourcesTest {
-
- @Test
- public void testSaveAs() {
- UmlModel umlModel = null;
- // get The model. try to see applied stereotypes
- try {
- umlModel = (UmlModel)modelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Model rootModel = (Model)umlModel.getResource().getContents().get(0);
- Assert.assertNotNull("Root model impossible to find", rootModel);
- URI resultURI = getResultURI();
- try {
- getModelSet(getURI()).saveAs(resultURI);
- } catch (IOException e) {
- fail(e.getMessage());
- }
- checkModel(rootModel);
- // check current model still have right stereotypes/values
- tearDownRegistry();
- // try to load and read profiles in the result file
- ModelSet resultModelSet = getModelSet(resultURI);
- Assert.assertNotNull("TMP Model set should not be null", resultModelSet);
- UmlModel resultUmlModel = null;
- // get The result model. try to see applied stereotypes
- try {
- resultUmlModel = (UmlModel)resultModelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Assert.assertNotNull(resultUmlModel);
- Resource resultResource = resultUmlModel.getResource();
- Assert.assertNotNull(resultResource);
- Model resultRootModel = (Model)resultResource.getContents().get(0);
- Assert.assertNotNull(resultRootModel);
- checkModel(resultRootModel);
- }
-
- @Test
- public void changeToOneFileOnlyStrategy() {
- changeToStrategy(StrategyRegistry.getInstance().getStrategy(OneResourceOnlyStrategy.ID));
- // additionnal checks : strategy, location of the stereotype application, etc.
- ModelSet resultModelSet = getModelSet(getResultURI());
- UmlModel resultUmlModel = null;
- // get The result model. try to see applied stereotypes
- try {
- resultUmlModel = (UmlModel)resultModelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Resource resultResource = resultUmlModel.getResource();
- Model resultRootModel = (Model)resultResource.getContents().get(0);
- // test some stereotype applications
- // Model::class1 should have <<classStereotype>> Applied (verify root level stererotype)
- Class class1_ = (Class)resultRootModel.getPackagedElement(MODEL_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false);
- EObject application = class1_.getStereotypeApplication(class1_.getAppliedStereotype(CLASS_STEREOTYPE_QN));
- Assert.assertNotNull("No stereotype applied on " + MODEL_CLASS1, application);
- Assert.assertNotNull(application.eResource());
- URI stereotypeApplicationURI = application.eResource().getURI();
- Assert.assertEquals("Stereotype is not in expected resource", getResultURI().trimFileExtension().appendFileExtension(OneResourceOnlyStrategy.PROFILE_DEFAULT_EXTENSION), stereotypeApplicationURI);
- // check undo, check redo...
- }
-
- @Test
- public void changeToOneFilePerProfileStrategy() {
- changeToStrategy(StrategyRegistry.getInstance().getStrategy(ResourcePerProfileStrategy.ID));
- // additionnal checks : strategy, location of the stereotype application, etc.
- ModelSet resultModelSet = getModelSet(getResultURI());
- UmlModel resultUmlModel = null;
- // get The result model. try to see applied stereotypes
- try {
- resultUmlModel = (UmlModel)resultModelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Resource resultResource = resultUmlModel.getResource();
- Model resultRootModel = (Model)resultResource.getContents().get(0);
- // test some stereotype applications
- // Model::class1 should have <<classStereotype>> Applied (verify root level stererotype)
- Class class1_ = (Class)resultRootModel.getPackagedElement(MODEL_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false);
- EObject application = class1_.getStereotypeApplication(class1_.getAppliedStereotype(CLASS_STEREOTYPE_QN));
- Assert.assertNotNull("No stereotype applied on " + MODEL_CLASS1, application);
- Assert.assertNotNull(application.eResource());
- URI stereotypeApplicationURI = application.eResource().getURI();
- Assert.assertEquals("Stereotype is not in expected resource", getResultURI().trimFileExtension().appendFileExtension(EXTERNAL_RESOURCES_TEST_PROFILE + "Profile"), stereotypeApplicationURI);
- }
-
- @Test
- public void changeToStandardStrategy() {
- changeToStrategy(StrategyRegistry.getInstance().getStrategy(StandardApplicationLocationStrategy.ID));
- // additionnal checks : strategy, location of the stereotype application, etc.
- ModelSet resultModelSet = getModelSet(getResultURI());
- UmlModel resultUmlModel = null;
- // get The result model. try to see applied stereotypes
- try {
- resultUmlModel = (UmlModel)resultModelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Resource resultResource = resultUmlModel.getResource();
- Model resultRootModel = (Model)resultResource.getContents().get(0);
- // test some stereotype applications
- // Model::class1 should have <<classStereotype>> Applied (verify root level stererotype)
- Class class1_ = (Class)resultRootModel.getPackagedElement(MODEL_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false);
- EObject application = class1_.getStereotypeApplication(class1_.getAppliedStereotype(CLASS_STEREOTYPE_QN));
- Assert.assertNotNull("No stereotype applied on " + MODEL_CLASS1, application);
- Assert.assertNotNull(application.eResource());
- URI stereotypeApplicationURI = application.eResource().getURI();
- Assert.assertEquals("Stereotype is not in expected resource", resultUmlModel.getResourceURI(), stereotypeApplicationURI);
- // check undo, check redo...
- }
-
- protected void changeToStrategy(IStereotypeApplicationLocationStrategy newStrategy) {
- UmlModel umlModel = null;
- // get The model. try to see applied stereotypes
- try {
- umlModel = (UmlModel)modelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Model rootModel = (Model)umlModel.getResource().getContents().get(0);
- Assert.assertNotNull("Root model impossible to find", rootModel);
- IStereotypeApplicationLocationStrategy oldStrategy = PapyrusStereotypeApplicationHelper.getCurrentLocationStrategy(rootModel);
- ICommand command = ExternalResourceProfileUtils.createUpdateStereotypeApplicationsLocationCommand(rootModel, oldStrategy, newStrategy);
- Assert.assertNotNull("Impossible to create update command", command);
- Assert.assertTrue("Command should be executable", command.canExecute());
- IStatus status = null;
- try {
- status = OperationHistoryFactory.getOperationHistory().execute(command, new NullProgressMonitor(), null);
- } catch (ExecutionException e1) {
- fail(e1.getMessage());
- }
- if(!status.isOK()) {
- fail(status.getMessage());
- }
-// URI resultURI = getResultURI();
-// try {
-// getModelSet(getURI()).saveAs(resultURI);
-// } catch (IOException e) {
-// fail(e.getMessage());
-// }
-
- try {
- getModelSet(getURI()).save(new NullProgressMonitor());
- } catch (IOException e1) {
- fail(e1.getMessage());
- }
- checkModel(rootModel);
-
- // check current model still have right stereotypes/values
- tearDownRegistry();
-
- // check result files
- checkFiles(getResultURI(), newStrategy);
-
- // try to load and read models
- ModelSet modelSet = getModelSet(getURI());
- Assert.assertNotNull("TMP Model set should not be null", modelSet);
- UmlModel resultUmlModel = null;
- // get The result model. try to see applied stereotypes
- try {
- resultUmlModel = (UmlModel)modelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Assert.assertNotNull(resultUmlModel);
- Resource resultResource = resultUmlModel.getResource();
- Assert.assertNotNull(resultResource);
- Model resultRootModel = (Model)resultResource.getContents().get(0);
- Assert.assertNotNull(resultRootModel);
- checkModel(resultRootModel);
- }
-
- /**
- * @param resultURI
- * @param newStrategy
- */
- public void checkFiles(URI resultURI, IStereotypeApplicationLocationStrategy newStrategy) {
- List<String> resultFileNames = STRATEGY_FILE_NAMES_MAPPING.get(newStrategy.getIdentifier());
- for(String fileName : resultFileNames) {
- URI fileURI = getResultFolderURI().appendSegment(fileName);
- IPath path = new Path(fileURI.toPlatformString(true));
- IFile file = ResourcesPlugin.getWorkspace().getRoot().getFile(path);
- if(file == null || !file.exists()) {
- fail(fileName + " does not exists. URI: " + fileURI);
- }
- }
- }
-
- public URI getResultFolderURI() {
- // return URI.createPlatformResourceURI(getTestProjectName() + "/result", true);
- return URI.createPlatformResourceURI(getTestProjectName(), true);
- }
-
- public URI getResultURI() {
- // getResultFolderURI().appendSegment("result.di");
- return getURI();
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java
deleted file mode 100644
index 26ecb1bf78a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AbstractExternalResourcesTest.java
+++ /dev/null
@@ -1,472 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests;
-
-import static org.junit.Assert.fail;
-
-import java.io.IOException;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.commands.operations.OperationHistoryFactory;
-import org.eclipse.core.resources.IFolder;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.ResourcesPlugin;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.emf.workspace.EMFCommandOperation;
-import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
-import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelsReader;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.infra.core.resource.TransactionalEditingDomainManager;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
-import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServiceMultiException;
-import org.eclipse.papyrus.infra.core.services.ServiceNotFoundException;
-import org.eclipse.papyrus.infra.core.services.ServiceStartKind;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
-import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceInitializerService;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.papyrus.junit.utils.PapyrusProjectUtils;
-import org.eclipse.papyrus.junit.utils.ProjectUtils;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.OneResourceOnlyStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.ResourcePerProfileStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.StandardApplicationLocationStrategy;
-import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IEditorReference;
-import org.eclipse.ui.IWorkbenchPage;
-import org.eclipse.ui.IWorkbenchWindow;
-import org.eclipse.ui.PlatformUI;
-import org.eclipse.uml2.uml.Class;
-import org.eclipse.uml2.uml.Model;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Stereotype;
-import org.eclipse.uml2.uml.UMLPackage;
-import org.junit.After;
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
-
-/**
- * Abstract class for all tests in this plugin
- */
-public abstract class AbstractExternalResourcesTest {
-
- /** services registry for the model under test */
- protected ServicesRegistry servicesRegistry;
-
- /** model set that contains the model under test */
- protected ModelSet modelSet;
-
- /** The papyrus editor. */
- protected IMultiDiagramEditor papyrusEditor;
-
- public static boolean isInitialized = false;
-
- public static IEditorPart editor = null;
-
- public static String editorID = "org.eclipse.papyrus.infra.core.papyrusEditor";
-
- public static final String EXTERNAL_RESOURCES_TEST_PROFILE = "ExternalResourcesTestProfile";
-
- public static final String EXTERNAL_RESOURCES_TEST_PROFILE_SUB_PROFILE = EXTERNAL_RESOURCES_TEST_PROFILE + NamedElement.SEPARATOR + "SubProfile";
-
- public static final String MODEL_CLASS1 = "Class1";
-
- public static final String CLASS_STEREOTYPE_NAME = "ClassStereotype";
-
- public static final String CLASS_STEREOTYPE_QN = EXTERNAL_RESOURCES_TEST_PROFILE + "::" + CLASS_STEREOTYPE_NAME;
-
- public static final String MODEL_CLASS2 = "Class2";
-
- public static final String MODEL_CLASS3 = "Class3";
-
- public static final String MODEL_PACKAGE1 = "Package1";
-
- public static final String MODEL_PACKAGE1_CLASS1 = "Package1_Class1";
-
- public static final String ELEMENT_STEREOTYPE_NAME = "ElementStereotype";
-
- public static final String ELEMENT_STEREOTYPE_QN = EXTERNAL_RESOURCES_TEST_PROFILE_SUB_PROFILE + NamedElement.SEPARATOR + ELEMENT_STEREOTYPE_NAME;
-
- public static final String ONE_PROFILE_MODEL_FILENAME = "oneProfileApplied";
-
- public final static String DI_FILE = ONE_PROFILE_MODEL_FILENAME + "." + DiModel.DI_FILE_EXTENSION;
-
- public final static String UML_FILE = ONE_PROFILE_MODEL_FILENAME + "." + UmlModel.UML_FILE_EXTENSION;
-
- public final static String NOTATION_FILE = ONE_PROFILE_MODEL_FILENAME + "." + NotationModel.NOTATION_FILE_EXTENSION;
-
- public static final String PACKAGE1_MODEL_FILENAME = "Package1";
-
- public final static String PACKAGE1_MODEL_DI_FILE = PACKAGE1_MODEL_FILENAME + "." + DiModel.DI_FILE_EXTENSION;
-
- public final static String PACKAGE1_MODEL_UML_FILE = PACKAGE1_MODEL_FILENAME + "." + UmlModel.UML_FILE_EXTENSION;
-
- public final static String PACKAGE1_MODEL_NOTATION_FILE = PACKAGE1_MODEL_FILENAME + "." + NotationModel.NOTATION_FILE_EXTENSION;
-
- public static final String CLASS3_MODEL_FILENAME = "Class3";
-
- public final static String CLASS3_MODEL_DI_FILE = CLASS3_MODEL_FILENAME + "." + DiModel.DI_FILE_EXTENSION;
-
- public final static String CLASS3_MODEL_UML_FILE = CLASS3_MODEL_FILENAME + "." + UmlModel.UML_FILE_EXTENSION;
-
- public final static String CLASS3_MODEL_NOTATION_FILE = CLASS3_MODEL_FILENAME + "." + NotationModel.NOTATION_FILE_EXTENSION;
-
- public final static String ALL_PROFILES_FILE = ONE_PROFILE_MODEL_FILENAME + "." + OneResourceOnlyStrategy.PROFILE_DEFAULT_EXTENSION;
-
- public final static String EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE = ONE_PROFILE_MODEL_FILENAME + "." + EXTERNAL_RESOURCES_TEST_PROFILE + "Profile";
-
- public final static String PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE = PACKAGE1_MODEL_FILENAME + "." + EXTERNAL_RESOURCES_TEST_PROFILE + "Profile";
-
- public final static String CLASS3_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE = CLASS3_MODEL_FILENAME + "." + EXTERNAL_RESOURCES_TEST_PROFILE + "Profile";
-
- public final static String PACKAGE1_ALL_PROFILES_FILE = PACKAGE1_MODEL_FILENAME + "." + OneResourceOnlyStrategy.PROFILE_DEFAULT_EXTENSION;
-
- public final static String CLASS3_ALL_PROFILES_FILE = CLASS3_MODEL_FILENAME + "." + OneResourceOnlyStrategy.PROFILE_DEFAULT_EXTENSION;
-
- public static final String STANDARD_STRATEGY_FOLDER = "StandardResource";
-
- public static final String ONE_RESOURCE_FOR_ALL_PROFILES_FOLDER = "OneResourceForAllProfiles";
-
- public static final String ONE_RESOURCE_PER_PROFILE_FOLDER = "OneResourcePerProfile";
-
- public static final List<String> STANDARD_STRATEGY_FILE_NAMES = Arrays.asList(DI_FILE, UML_FILE, NOTATION_FILE,
- /* Class3.di */ CLASS3_MODEL_DI_FILE, CLASS3_MODEL_NOTATION_FILE, CLASS3_MODEL_UML_FILE,
- /* Package1_Class1.di */PACKAGE1_MODEL_DI_FILE, PACKAGE1_MODEL_NOTATION_FILE, PACKAGE1_MODEL_UML_FILE);
-
- public static final List<String> ONE_RESOURCE_PER_PROFILE_FILE_NAMES = Arrays.asList(DI_FILE, NOTATION_FILE, UML_FILE, EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE,
- /* PACKAGE1*/ PACKAGE1_MODEL_DI_FILE, PACKAGE1_MODEL_NOTATION_FILE, PACKAGE1_MODEL_UML_FILE, PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE,
- /* CLASS3*/ CLASS3_MODEL_DI_FILE, CLASS3_MODEL_NOTATION_FILE, CLASS3_MODEL_UML_FILE, CLASS3_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE
- );
-
- public static final List<String> ONE_RESOURCE_FOR_ALL_PROFILES_FILE_NAMES = Arrays.asList(DI_FILE, NOTATION_FILE, UML_FILE, ALL_PROFILES_FILE,
- /* PACKAGE1*/ PACKAGE1_MODEL_DI_FILE, PACKAGE1_MODEL_NOTATION_FILE, PACKAGE1_MODEL_UML_FILE, PACKAGE1_ALL_PROFILES_FILE,
- /* CLASS3*/ CLASS3_MODEL_DI_FILE, CLASS3_MODEL_NOTATION_FILE, CLASS3_MODEL_UML_FILE, CLASS3_ALL_PROFILES_FILE
- );
-
- public static final Map<String, List<String>> STRATEGY_FILE_NAMES_MAPPING = new HashMap<String, List<String>>(); {
- STRATEGY_FILE_NAMES_MAPPING.put(OneResourceOnlyStrategy.ID, ONE_RESOURCE_FOR_ALL_PROFILES_FILE_NAMES);
- STRATEGY_FILE_NAMES_MAPPING.put(ResourcePerProfileStrategy.ID, ONE_RESOURCE_PER_PROFILE_FILE_NAMES);
- STRATEGY_FILE_NAMES_MAPPING.put(StandardApplicationLocationStrategy.ID, STANDARD_STRATEGY_FILE_NAMES);
- }
-
- @Before
- public void initializeRegistry() {
- ResourcesPlugin.getWorkspace().getDescription().setAutoBuilding(false);
- IProject project = null;
- try {
- project = ProjectUtils.createProject(getTestProjectName());
- IFolder folder = project.getFolder("result");
- if(folder.exists()) {
- folder.delete(true, new NullProgressMonitor());
- }
- folder.create(true, true, new NullProgressMonitor());
- } catch (CoreException e1) {
- fail(e1.getMessage());
- }
- Assert.assertNotNull("Impossible to create the project", project);
- // import model files.
- // retrieve the content of the source folder, and copy it into the destination folder
- for(String fileName : getModelFileNames()) {
- try {
- PapyrusProjectUtils.copyIFile("resources/" + getTestProjectName() + "/" + fileName, Platform.getBundle(Activator.PLUGIN_ID), project, fileName);
- } catch (CoreException e) {
- fail(e.getMessage());
- } catch (IOException e) {
- fail(e.getMessage());
- }
- }
- servicesRegistry = getServicesRegistry();
- modelSet = getModelSet(getURI());
- Assert.assertNotNull("Model set should not be null", modelSet);
- }
-
- /**
- * {@inheritDoc}
- */
- public URI getURI() {
- return URI.createPlatformResourceURI(getTestProjectName() + "/" + getModelFileNames().get(0), true);
- }
-
- /**
- * Warning: main Model.di file must be put first!!!
- *
- * @return
- */
- protected abstract List<String> getModelFileNames();
-
- /**
- * @return
- */
- protected abstract String getTestProjectName();
-
- @After
- public void tearDownRegistry() {
- if(modelSet != null) {
- modelSet.unload();
- modelSet = null;
- }
- if(servicesRegistry != null) {
- try {
- servicesRegistry.disposeRegistry();
- servicesRegistry = null;
- } catch (ServiceMultiException e) {
- Activator.log.error(e);
- org.junit.Assert.fail(e.getMessage());
- }
- }
- }
-
- @Test
- public void testLoadModelOutsidePapyrusEditor() {
- UmlModel umlModel = null;
- // get The model. try to see applied stereotypes
- try {
- umlModel = (UmlModel)modelSet.getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Model rootModel = (Model)umlModel.getResource().getContents().get(0);
- Assert.assertNotNull("Root model impossible to find", rootModel);
- // test applied profiles
- checkModel(rootModel);
- }
-
- @Test
- public void testApplyStereotypeOnClassInControlledResource() {
- UmlModel umlModel = null;
- // get The model. try to see applied stereotypes
- try {
- umlModel = (UmlModel)getModelSet(getURI()).getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Model rootModel = (Model)umlModel.getResource().getContents().get(0);
- Assert.assertNotNull("Root model impossible to find", rootModel);
- // test applied profiles
-
-
- // apply stereotype on Model::Class3. Do not check eveythong, as loading tests should already have fixed that
- Class class3_ = (Class)rootModel.getPackagedElement(MODEL_CLASS3, true, UMLPackage.eINSTANCE.getClass_(), false);
- if(class3_ ==null) {
- return; // should send an ignore or a warning
- }
-
- // try to apply a stereotype and checks where it is located
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(class3_);
- Stereotype stereotype = class3_.getApplicableStereotype(ELEMENT_STEREOTYPE_QN);
- Assert.assertNotNull("Stereotype to apply should not be null", stereotype);
- ApplyStereotypeCommand command = new ApplyStereotypeCommand(class3_, stereotype, editingDomain);
- Assert.assertNotNull("Command should not be null", command);
- Assert.assertTrue("Command should be executable", command.canExecute());
-
- // execute command
- try {
- OperationHistoryFactory.getOperationHistory().execute(new EMFCommandOperation(editingDomain, command), new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- fail(e.getMessage());
- }
-
- // check stereotype has been applied
- EObject stereotypeApplication = class3_.getStereotypeApplication(stereotype);
- Assert.assertNotNull("Stereotype "+ ELEMENT_STEREOTYPE_QN+" is not applied on "+MODEL_CLASS3, stereotypeApplication);
- Assert.assertEquals("Stereotype is not located in good resource", getApplyStereotypeOnClassInControlledResourceURI(), stereotypeApplication.eResource().getURI());
- }
-
-
- @Test
- public void testApplyStereotypeOnClassInControlledPackage() {
- UmlModel umlModel = null;
- // get The model. try to see applied stereotypes
- try {
- umlModel = (UmlModel)getModelSet(getURI()).getModelChecked(UmlModel.MODEL_ID);
- } catch (NotFoundException e) {
- fail(e.getMessage());
- }
- Model rootModel = (Model)umlModel.getResource().getContents().get(0);
- Assert.assertNotNull("Root model impossible to find", rootModel);
- // test applied profiles
-
-
- // apply stereotype on Model::Class3. Do not check eveythong, as loading tests should already have fixed that
- Package package1 = (Package)rootModel.getNestedPackage(MODEL_PACKAGE1, true, UMLPackage.eINSTANCE.getPackage(), false);
- Assert.assertNotNull("Impossible to find "+MODEL_PACKAGE1, package1);
-
- Class package1_class1 = (Class)package1.getPackagedElement(MODEL_PACKAGE1_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false);
- Assert.assertNotNull("Impossible to find "+MODEL_PACKAGE1_CLASS1, package1_class1);
-
- // try to apply a stereotype and checks where it is located
- TransactionalEditingDomain editingDomain = TransactionUtil.getEditingDomain(package1_class1);
- Stereotype stereotype = package1_class1.getApplicableStereotype(ELEMENT_STEREOTYPE_QN);
- Assert.assertNotNull("Stereotype to apply should not be null", stereotype);
- ApplyStereotypeCommand command = new ApplyStereotypeCommand(package1_class1, stereotype, editingDomain);
- Assert.assertNotNull("Command should not be null", command);
- Assert.assertTrue("Command should be executable", command.canExecute());
-
- // execute command
- try {
- OperationHistoryFactory.getOperationHistory().execute(new EMFCommandOperation(editingDomain, command), new NullProgressMonitor(), null);
- } catch (ExecutionException e) {
- fail(e.getMessage());
- }
-
- // check stereotype has been applied
- EObject stereotypeApplication = package1_class1.getStereotypeApplication(stereotype);
- Assert.assertNotNull("Stereotype "+ ELEMENT_STEREOTYPE_QN+" is not applied on "+MODEL_PACKAGE1_CLASS1, stereotypeApplication);
- Assert.assertEquals("Stereotype is not located in good resource", getApplyStereotypeOnClassInControlledPackageResourceURI(), stereotypeApplication.eResource().getURI());
- }
-
- /**
- * @return
- */
- protected abstract URI getApplyStereotypeOnClassInControlledPackageResourceURI();
-
- /**
- * @return
- */
- protected abstract URI getApplyStereotypeOnClassInControlledResourceURI();
-
- /**
- * @param rootModel
- */
- protected void checkModel(Model rootModel) {
- Assert.assertEquals("Some profiles are missing", 2, rootModel.getAllAppliedProfiles().size());
- Assert.assertNotNull("ExternalResourcesTestProfile is missing", rootModel.getAppliedProfile(EXTERNAL_RESOURCES_TEST_PROFILE));
- Assert.assertNotNull("ExternalResourcesTestProfile::SubProfile is missing", rootModel.getAppliedProfile(EXTERNAL_RESOURCES_TEST_PROFILE_SUB_PROFILE));
- // test some stereotype applications
- // Model::class1 should have <<classStereotype>> Applied (verify root level stererotype)
- Class class1_ = (Class)rootModel.getPackagedElement(MODEL_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false);
- Assert.assertNotNull(MODEL_CLASS1 + " should not be null", class1_);
- Assert.assertNotNull(MODEL_CLASS1 + " should have stereotype " + CLASS_STEREOTYPE_NAME, class1_.getAppliedStereotype(CLASS_STEREOTYPE_QN));
- // Model::class1 should have <<classStereotype>> Applied (verify stereotype in subprofile)
- Class class2_ = (Class)rootModel.getPackagedElement(MODEL_CLASS2, true, UMLPackage.eINSTANCE.getClass_(), false);
- Assert.assertNotNull(MODEL_CLASS2 + " should not be null", class2_);
- Assert.assertNotNull(MODEL_CLASS2 + " should have stereotype " + ELEMENT_STEREOTYPE_NAME + ", but has only: " + class2_.getAppliedStereotypes(), class2_.getAppliedStereotype(ELEMENT_STEREOTYPE_QN));
- // check controlled resources : Package1 and class3
- Class class3_ = (Class)rootModel.getPackagedElement(MODEL_CLASS3, true, UMLPackage.eINSTANCE.getClass_(), false);
- Assert.assertNotNull(MODEL_CLASS3 + " should not be null", class3_);
- Assert.assertNotNull(MODEL_CLASS3 + " should have stereotype " + CLASS_STEREOTYPE_NAME + ", but has only: " + class3_.getAppliedStereotypes(), class3_.getAppliedStereotype(CLASS_STEREOTYPE_QN));
- // check controlled resources : Package1 and class3
- Package package1 = (Package)rootModel.getNestedPackage(MODEL_PACKAGE1);
- Assert.assertNotNull(MODEL_PACKAGE1 + " should not be null", package1);
- Class package1_Class1 = (Class)package1.getPackagedElement(MODEL_PACKAGE1_CLASS1, true, UMLPackage.eINSTANCE.getClass_(), false);
- Assert.assertNotNull(MODEL_PACKAGE1_CLASS1 + " should not be null", package1_Class1);
- Assert.assertNotNull(MODEL_PACKAGE1_CLASS1 + " should have stereotype " + CLASS_STEREOTYPE_NAME + ", but has only: " + package1_Class1.getAppliedStereotypes(), package1_Class1.getAppliedStereotype(CLASS_STEREOTYPE_QN));
- }
-
- public ModelSet createModelSet(URI uri) throws ModelMultiException {
- ModelSet modelSet = new ModelSet();
- ModelsReader reader = new ModelsReader();
- reader.readModel(modelSet);
- modelSet.loadModels(uri);
- return modelSet;
- }
-
- protected ServicesRegistry getUpdatedServiceRegistry() {
- if(papyrusEditor != null) {
- ServicesRegistry registry = (ServicesRegistry)papyrusEditor.getAdapter(ServicesRegistry.class);
- return registry;
- }
- return servicesRegistry;
- }
-
- protected Collection<IEditorPart> getEditors() {
- Collection<IEditorPart> results = new HashSet<IEditorPart>();
- IWorkbenchWindow[] windows = PlatformUI.getWorkbench().getWorkbenchWindows();
- for(IWorkbenchWindow iWorkbenchWindow : windows) {
- IWorkbenchPage[] pages = iWorkbenchWindow.getPages();
- for(IWorkbenchPage iWorkbenchPage : pages) {
- IEditorReference[] references = iWorkbenchPage.getEditorReferences();
- for(IEditorReference ref : references) {
- IEditorPart editor = ref.getEditor(true);
- results.add(editor);
- }
- }
- }
- return results;
- }
-
- public ServicesRegistry getServicesRegistry() {
- if(servicesRegistry == null) {
- //Try to find existing
- ServicesRegistry registry = getUpdatedServiceRegistry();
- if(registry != null) {
- servicesRegistry = registry;
- } else {
- servicesRegistry = createServicesRegistry();
- }
- }
- return servicesRegistry;
- }
-
- /**
- * Starts a new Service registry
- *
- * @return
- */
- protected ServicesRegistry createServicesRegistry() {
- try {
- ServicesRegistry serviceRegistry = new ServicesRegistry();
- serviceRegistry.startRegistry();
- return serviceRegistry;
- } catch (ServiceException e) {
- Activator.log.error(e);
- }
- return null;
- }
-
- public ModelSet getModelSet(URI uri) {
- //If null, try to find one or create one
- if(modelSet == null) {
- try {
- modelSet = ServiceUtils.getInstance().getModelSet(getServicesRegistry());
- } catch (ServiceException e) {
- //Create one
- try {
- modelSet = createModelSet(uri);
- getServicesRegistry().add(ModelSet.class, 10, modelSet);
- getServicesRegistry().add(ServiceUtilsForResourceInitializerService.class, 10, new ServiceUtilsForResourceInitializerService());
- getServicesRegistry().startServicesByClassKeys(ModelSet.class, ServiceUtilsForResourceInitializerService.class);
- TransactionalEditingDomain domain = TransactionalEditingDomainManager.createTransactionalEditingDomain(modelSet);
- getServicesRegistry().add(TransactionalEditingDomain.class, 10, domain, ServiceStartKind.STARTUP);
- getServicesRegistry().add(EditingDomain.class, 10, domain, ServiceStartKind.STARTUP);
- } catch (ModelMultiException modelMultiException) {
- Activator.log.error(modelMultiException);
- } catch (ServiceMultiException e1) {
- Activator.log.error(e1);
- } catch (ServiceNotFoundException e1) {
- Activator.log.error(e1);
- }
- }
- }
- return modelSet;
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java
deleted file mode 100644
index 252d0d677c2..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/oneresourceforallprofiles/OneResourceForAllProfilesTests.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests.oneresourceforallprofiles;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.uml.profile.externalresource.tests.AbstractChangeStrategyTests;
-import org.eclipse.papyrus.uml.profile.externalresource.tests.AbstractExternalResourcesTest;
-
-/**
- * Test class for load/unload
- */
-public class OneResourceForAllProfilesTests extends AbstractChangeStrategyTests {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getTestProjectName() {
- return ONE_RESOURCE_FOR_ALL_PROFILES_FOLDER;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected List<String> getModelFileNames() {
- return ONE_RESOURCE_FOR_ALL_PROFILES_FILE_NAMES;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected URI getApplyStereotypeOnClassInControlledPackageResourceURI() {
- return URI.createPlatformResourceURI(getTestProjectName()+ "/"+ PACKAGE1_EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE, true);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected URI getApplyStereotypeOnClassInControlledResourceURI() {
- return URI.createPlatformResourceURI(getTestProjectName()+ "/"+ CLASS3_ALL_PROFILES_FILE, true);
- }
-
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceloading/ResourceLoading.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceloading/ResourceLoading.java
deleted file mode 100644
index 30a277784e4..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceloading/ResourceLoading.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests.resourceloading;
-
-import static org.junit.Assert.*;
-
-import org.junit.Test;
-
-
-/**
- * Tests on Resource Loading
- */
-public class ResourceLoading {
-
- @Test
- public void test() {
- fail("Not yet implemented");
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java
deleted file mode 100644
index 4344a4e6acc..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/resourceperprofile/ResourcePerProfileTests.java
+++ /dev/null
@@ -1,60 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests.resourceperprofile;
-
-import java.util.Arrays;
-import java.util.List;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.uml.profile.externalresource.tests.AbstractChangeStrategyTests;
-
-/**
- * Test class for load/unload
- */
-public class ResourcePerProfileTests extends AbstractChangeStrategyTests {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getTestProjectName() {
- return ONE_RESOURCE_PER_PROFILE_FOLDER;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected List<String> getModelFileNames() {
- return ONE_RESOURCE_PER_PROFILE_FILE_NAMES;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected URI getApplyStereotypeOnClassInControlledPackageResourceURI() {
- return getResultFolderURI().appendSegment(EXTERNAL_RESOURCES_TEST_PROFILE_EXTENSION_FILE);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected URI getApplyStereotypeOnClassInControlledResourceURI() {
- // TODO Auto-generated method stub
- return null;
- }
-
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java
deleted file mode 100644
index 9c8f958077f..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/standardstrategy/StandardStrategyTests.java
+++ /dev/null
@@ -1,68 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests.standardstrategy;
-
-import java.util.List;
-
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.ExternalResourceProfileUtils;
-import org.eclipse.papyrus.uml.profile.externalresource.tests.AbstractChangeStrategyTests;
-import org.junit.Test;
-
-/**
- * Test class for load/unload
- */
-public class StandardStrategyTests extends AbstractChangeStrategyTests {
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected String getTestProjectName() {
- return STANDARD_STRATEGY_FOLDER;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected List<String> getModelFileNames() {
- return STANDARD_STRATEGY_FILE_NAMES;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected URI getApplyStereotypeOnClassInControlledPackageResourceURI() {
- return URI.createPlatformResourceURI(getTestProjectName() + "/" + PACKAGE1_MODEL_UML_FILE, true);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected URI getApplyStereotypeOnClassInControlledResourceURI() {
- return URI.createPlatformResourceURI(getTestProjectName() + "/" + CLASS3_MODEL_UML_FILE, true);
- }
-
-
- @Test
- public void testFindStereotypeApplicationsByDefinition() {
-
-
- // ExternalResourceProfileUtils.findStereotypeApplicationsByDefinition(profileApplication, oldStrategy)
-
-
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.settings/org.eclipse.jdt.core.prefs b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index c537b63063c..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/META-INF/MANIFEST.MF b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/META-INF/MANIFEST.MF
deleted file mode 100644
index 177e7f343cc..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,22 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: UML2 Profile Management in External Resources (Incubation)
-Bundle-SymbolicName: org.eclipse.papyrus.uml.profile.externalresource;singleton:=true
-Bundle-Version: 0.10.1.qualifier
-Bundle-Activator: org.eclipse.papyrus.uml.profile.externalresource.Activator
-Bundle-Vendor: Eclipse Modeling Project
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.infra.core.log;bundle-version="0.10.0",
- org.eclipse.uml2.uml;bundle-version="4.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="0.10.0",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="0.10.1",
- org.eclipse.papyrus.uml.tools;bundle-version="0.10.1",
- org.eclipse.emf.transaction;bundle-version="1.4.0",
- com.google.guava;bundle-version="10.0.1",
- org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0"
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Bundle-ActivationPolicy: lazy
-Export-Package: org.eclipse.papyrus.uml.profile.externalresource,
- org.eclipse.papyrus.uml.profile.externalresource.helper,
- org.eclipse.papyrus.uml.profile.externalresource.model
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/documentation.pdoc b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/documentation.pdoc
deleted file mode 100644
index a971d3ea382..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/documentation.pdoc
+++ /dev/null
@@ -1,4 +0,0 @@
-<?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="Plugin to manage profile and stereotype application in external resources">
- <referent firstName="Remi" lastName="Schnekenburger" eMail="remi.schnekenburger@cea.fr" currentCompany="CEA LIST"/>
-</doc:Documentation>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/plugin.xml b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/plugin.xml
deleted file mode 100644
index 59f092516b4..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/plugin.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-<plugin>
- <extension
- point="org.eclipse.papyrus.infra.core.model">
- <model
- classname="org.eclipse.papyrus.uml.profile.externalresource.model.StereotypeApplicationExternalResourceModel">
- <dependency>
- <loadAfter
- identifier="org.eclipse.papyrus.infra.core.resource.uml.UmlModel">
- </loadAfter>
- </dependency>
- </model>
- </extension>
-
-</plugin>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/Activator.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/Activator.java
deleted file mode 100644
index 5875dc1d46a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/Activator.java
+++ /dev/null
@@ -1,55 +0,0 @@
-package org.eclipse.papyrus.uml.profile.externalresource;
-
-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.profile.externalresource"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- /** logger helper */
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- log = null;
- super.stop(context);
- }
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/AbstractStereotypeApplicationLocationStrategy.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/AbstractStereotypeApplicationLocationStrategy.java
deleted file mode 100644
index f6521a180a6..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/AbstractStereotypeApplicationLocationStrategy.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.uml2.uml.Element;
-
-
-/**
- * Abstract strategy class for stereotype application location
- */
-public abstract class AbstractStereotypeApplicationLocationStrategy implements IStereotypeApplicationLocationStrategy {
-
- /**
- * @param element
- * @param definition
- * @return
- */
- protected EList<EObject> getDefaultContainmentList(Element element, EClass definition) {
- return element.eResource().getContents();
- }
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExtendedProfileApplicationHelper.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExtendedProfileApplicationHelper.java
deleted file mode 100644
index d95aab82d65..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExtendedProfileApplicationHelper.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.util.UMLUtil.ProfileApplicationHelper;
-
-
-/**
- * Extended profile application helper for Papyrus tool.
- * <P>
- * When this helper is activated, profiles are located in external resources
- * </P>
- */
-public class ExtendedProfileApplicationHelper extends ProfileApplicationHelper {
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<Package> getOtherApplyingPackages(Package package_) {
- return super.getOtherApplyingPackages(package_);
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExternalResourceProfileUtils.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExternalResourceProfileUtils.java
deleted file mode 100644
index 802a38de3eb..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ExternalResourceProfileUtils.java
+++ /dev/null
@@ -1,173 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Status;
-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.resource.Resource;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.uml.profile.externalresource.Activator;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.ProfileApplication;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-/**
- * Utility class for stereotype application management in external resources
- */
-public class ExternalResourceProfileUtils {
-
- /**
- * @param profileApplication
- */
- public static IStatus updateStereotypeApplicationsLocation(ProfileApplication profileApplication, IStereotypeApplicationLocationStrategy oldStrategy, IStereotypeApplicationLocationStrategy newStrategy) {
- // 1. retrieve all stereotype applications concerned by the given profile application
- // 2. move the stereotype application in their new containment list
- Map<EClass, List<EObject>> allStereotypeApplications = findStereotypeApplicationsByDefinition(profileApplication, oldStrategy);
-
- // now have a map of all definitions of stereotypes contained in the profile applied, now they should be moved according to the new strategy
- for(Entry<EClass, List<EObject>> entry : allStereotypeApplications.entrySet()) {
- EClass definition = entry.getKey();
- for(EObject stereotypeApplication : entry.getValue()) {
- // move the EObject in the new containment list
- Element baseElement = UMLUtil.getBaseElement(stereotypeApplication);
- List<EObject> containmentList = newStrategy.getContainmentList(baseElement, definition);
- if(!containmentList.contains(stereotypeApplication)) { // move the stereotype application only if it was not already there (to avoid useless moves)
- containmentList.add(stereotypeApplication); // move stereotype at the right place
- };
- }
- }
-
- // update Eannotation that stores the new strategy
- PapyrusStereotypeApplicationHelper.setCurrentLocationStrategy(profileApplication, newStrategy);
-
- return Status.OK_STATUS;
- }
-
- /**
- * @param profileApplication
- * @return
- */
- public static Map<EClass, List<EObject>> findStereotypeApplicationsByDefinition(ProfileApplication profileApplication, IStereotypeApplicationLocationStrategy oldStrategy) throws RuntimeException{
- Map<EClass, List<EObject>> allStereotypeApplications = new HashMap<EClass, List<EObject>>();
-
- Resource modelResource = profileApplication.eResource();
- if(modelResource == null) {
- Activator.log.error("Profile Application is not in a resource. "+profileApplication, null);
- return Collections.emptyMap();
- }
- ModelSet modelSet = null;
- if(!(modelResource.getResourceSet() instanceof ModelSet)) {
- Activator.log.error("Trying to modify the stereotype application outside a Papyrus Model Set", null);
- return Collections.emptyMap();
-
- } else {
- modelSet = (ModelSet)modelResource.getResourceSet();
- }
-
- // For all resources, retrieve the containment list that should hold the stereotype application for the given profile, for all UML elements at the root of the resource (should test for all elements, but would be really slow)
- // for all elements in the containment list that corresponds to the profile application, store in a new list
- List<EClassifier> classifiers = profileApplication.getAppliedDefinition().getEClassifiers();
- for(final EClassifier classifier : classifiers) {
- if(classifier instanceof EClass) {
- final EClass definition = (EClass)classifier;
- List<EObject> stereotypeApplications = new ArrayList<EObject>();
- for(Resource resource : modelSet.getResources()) {
- // if resource = read only (model import, etc.), nothing should be done
- if(!modelSet.getTransactionalEditingDomain().isReadOnly(resource)) {
- for(EObject object : resource.getContents()) {
- if(object instanceof Element) {
- // retrieve the containment list for this element and all the stereotype applications of the applied profile
- Element element = ((Element)object);
- EList<EObject> fullList = oldStrategy.getContainmentList(element, definition);
- for(EObject possibleStereotypeApplication : fullList) {
- if(definition.equals(possibleStereotypeApplication.eClass())) {
- stereotypeApplications.add(possibleStereotypeApplication);
- }
- }
- }
- }
- }
- }
- allStereotypeApplications.put(definition, stereotypeApplications);
- }
- }
- return allStereotypeApplications;
- }
-
- public static ICommand createUpdateStereotypeApplicationsLocationCommand( ProfileApplication profileApplication, IStereotypeApplicationLocationStrategy oldStrategy, IStereotypeApplicationLocationStrategy newStrategy) {
- if(profileApplication ==null) {
- return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
- }
- // create a command based on #updateStereotypeApplicationsLocation()
- return new UpdateStereotypeApplicationsLocationCommand(profileApplication, oldStrategy, newStrategy);
- }
-
-
- public static ICommand createUpdateStereotypeApplicationsLocationCommand( Element element, IStereotypeApplicationLocationStrategy oldStrategy, IStereotypeApplicationLocationStrategy newStrategy) {
- if(element ==null) {
- return null;
- }
- // retrieve all stereotype applications from the element (should be for each root => subpackages and over), all stereotype applications
- EObject root = EcoreUtil.getRootContainer(element, true);
- if(root instanceof Package) {
- List<ProfileApplication> profileApplications = new ArrayList<ProfileApplication>();
- computeAllProfileApplications((Package)root, true, profileApplications);
- return createUpdateStereotypeApplicationsLocationCommand(profileApplications, oldStrategy, newStrategy);
- }
- return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
- }
-
- /**
- * @param element
- * @param recursive <code>true</code> if profile applications should be searched in nested packages
- * @return
- */
- protected static void computeAllProfileApplications(Package package_, boolean recursive, List<ProfileApplication> profileApplications) {
- List<ProfileApplication> thisPackageProfileApplications = package_.getProfileApplications();
- if(thisPackageProfileApplications != null && thisPackageProfileApplications.size() > 0) {
- profileApplications.addAll(thisPackageProfileApplications);
- }
-
- if(recursive) {
- for(Package ownedPackage : package_.getNestedPackages()) {
- computeAllProfileApplications(ownedPackage, recursive, profileApplications);
- }
- }
- }
-
- public static ICommand createUpdateStereotypeApplicationsLocationCommand(List<ProfileApplication> profileApplications, IStereotypeApplicationLocationStrategy oldStrategy, IStereotypeApplicationLocationStrategy newStrategy) {
- if(profileApplications == null || profileApplications.size() < 1) {
- return org.eclipse.gmf.runtime.common.core.command.UnexecutableCommand.INSTANCE;
- }
- ICommand resultCommand = null;
- for(ProfileApplication profileApplication : profileApplications) {
- resultCommand = new UpdateStereotypeApplicationsLocationCommand(profileApplication, oldStrategy, newStrategy).compose(resultCommand);
- }
- return resultCommand;
- }
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/IStereotypeApplicationLocationStrategy.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/IStereotypeApplicationLocationStrategy.java
deleted file mode 100644
index 0dc998c92b0..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/IStereotypeApplicationLocationStrategy.java
+++ /dev/null
@@ -1,51 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.uml2.uml.Element;
-
-
-/**
- * Interface implemented by all strategies in charge of the management of resources for stereotype applications
- */
-public interface IStereotypeApplicationLocationStrategy {
-
- /**
- * Returns the containment list in which stereotype applications should be read/added.
- * @param element the stereotyped element
- * @param definition the definition of the stereotype to apply
- * @return the containment list for the new stereotype application. if any problem, this will be the default location (direct content of the resource containing the element)
- */
- public EList<EObject> getContainmentList(Element element, EClass definition);
-
- /**
- * Returns the list of URIs of the resources in which stereotype applications are placed.
- * @param root element of the model from which all profile applications are found
- * @return the list of URIS, an empty collection if not URIs are found.
- */
- public Set<URI> getProfileApplicationResourceURIs(EObject root);
-
-
- /**
- * Returns the identifier of this strategy
- * @return the identifier of this strategy, should never be <code>null</code>.
- */
- public String getIdentifier();
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/OneResourceOnlyStrategy.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/OneResourceOnlyStrategy.java
deleted file mode 100644
index 77def9cb776..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/OneResourceOnlyStrategy.java
+++ /dev/null
@@ -1,112 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.resource.UMLResource;
-
-/**
- * Strategy for only one resource for all profile applications
- */
-public class OneResourceOnlyStrategy extends AbstractStereotypeApplicationLocationStrategy {
-
- /** identifier of this strategy */
- public static final String ID = "OneResourceOnlyStrategy"; //$NON-NLS-1$
-
- /** default extension for the profile URI */
- public static final String PROFILE_DEFAULT_EXTENSION = "profiles";
-
- /** singleton instance */
- private static OneResourceOnlyStrategy instance;
-
- /**
- * Returns the singleton instance for this strategy
- *
- * @return the singleton instance for this strategy
- */
- public static OneResourceOnlyStrategy getInstance() {
- if(instance == null) {
- instance = new OneResourceOnlyStrategy();
- }
- return instance;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public EList<EObject> getContainmentList(Element element, EClass definition) {
- // 1. only one resource => look if there is a custom name. Otherwise, use a standard name for the resource
- // compute the URI of the resource
- Resource baseResource = element.eResource();
- if(baseResource == null) {
- return null;
- }
- URI newURI = getProfileResourceURI(element, definition);
- ResourceSet resourceSet = baseResource.getResourceSet();
- if(resourceSet instanceof ModelSet && newURI != null) {
- ModelSet modelSet = (ModelSet)resourceSet;
- Resource resource = ModelUtils.getOrCreateResource(modelSet, true, newURI, UMLResource.UML_CONTENT_TYPE_IDENTIFIER);
- return resource.getContents();
- }
- // by default, return the resource containing the element
- return getDefaultContainmentList(element, definition);
- }
-
- /**
- * @param element
- * @param definition
- * @return
- */
- protected URI getProfileResourceURI(Element element, EClass definition) {
- if(element.eResource() !=null) {
- URI uri = element.eResource().getURI();
- if(uri !=null) {
- return uri.trimFileExtension().appendFileExtension(PROFILE_DEFAULT_EXTENSION);
- }
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Set<URI> getProfileApplicationResourceURIs(EObject root) {
- URI uri = root.eResource().getURI();
- if(uri !=null) {
- return Collections.singleton(uri.trimFileExtension().appendFileExtension(PROFILE_DEFAULT_EXTENSION));
- }
- return Collections.emptySet();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getIdentifier() {
- return ID;
- }
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/PapyrusStereotypeApplicationHelper.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/PapyrusStereotypeApplicationHelper.java
deleted file mode 100644
index 7dc45da2678..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/PapyrusStereotypeApplicationHelper.java
+++ /dev/null
@@ -1,111 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.util.UMLUtil.StereotypeApplicationHelper;
-
-
-/**
- * Specific Stereotype Application Helper for Papyrus tool. If it detects the model is not a model handled by Papyrus, it will delegate to the standard Stereotype application helper.
- */
-public class PapyrusStereotypeApplicationHelper extends StereotypeApplicationHelper {
-
- /** Key for the location strategy value */
- public static final String LOCATION_STRATEGY_KEY = "locationStrategy";
-
- /** source for the eannotation that is used to store specific URI for stereotype application resource */
- public static final String PAPYRUS_EXTERNAL_RESOURCE_EANNOTATION_SOURCE = "http://www.eclipse.org/papyrus/uml/profile/externalresource"; //$NON-NLS-1$
-
- /**
- * {@inheritDoc}
- */
- @Override
- public EObject applyStereotype(Element element, EClass definition) {
- return super.applyStereotype(element, definition);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public boolean addToContainmentList(Element element, EObject stereotypeApplication) {
- return super.addToContainmentList(element, stereotypeApplication);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected EList<EObject> getContainmentList(Element element, EClass definition) {
- // 1. find the current strategy used for the model element
- // 2. use the strategy to find the resource and the containment list
- // 3. if no strategy found, return usual strategy ==> stereotype application are directly contained by the resource containing the stereotyped element.
- IStereotypeApplicationLocationStrategy locationStrategy = getCurrentLocationStrategy(element);
- if(locationStrategy ==null) {
- return StandardApplicationLocationStrategy.getInstance().getContainmentList(element, definition);
- }
- return locationStrategy.getContainmentList(element, definition);
- }
-
- /**
- * Returns the specific location strategy to use for the given model element
- * @param element the stereotyped element
- * @return the location strategy or the standard one if none was found
- */
- public static IStereotypeApplicationLocationStrategy getCurrentLocationStrategy(EObject element) {
- EObject container = EcoreUtil.getRootContainer(element, true);
- if(container instanceof Element) {
- EAnnotation annotation = ((Element)container).getEAnnotation(PAPYRUS_EXTERNAL_RESOURCE_EANNOTATION_SOURCE);
- if(annotation == null) {
- return StrategyRegistry.getInstance().getStrategy(StandardApplicationLocationStrategy.ID);
- }
-
- String location = annotation.getDetails().get(LOCATION_STRATEGY_KEY);
- if(location == null) {
- return StrategyRegistry.getInstance().getStrategy(StandardApplicationLocationStrategy.ID);
- }
-
- IStereotypeApplicationLocationStrategy strategy = StrategyRegistry.getInstance().getStrategy(location);
- if(strategy != null) {
- return strategy;
- }
- }
- return StrategyRegistry.getInstance().getStrategy(StandardApplicationLocationStrategy.ID);
- }
-
- /**
- * Sets the specific location strategy to use for the given model element
- * Warning: this method modifies the model, it should be executed in a command.
- * @param element the stereotyped element
- * @return the location strategy or <code>null</code> if none was found
- */
- public static void setCurrentLocationStrategy(EObject element, IStereotypeApplicationLocationStrategy newStrategy) {
- EObject container = EcoreUtil.getRootContainer(element, true);
- if(container instanceof Element) {
- EAnnotation annotation = ((Element)container).getEAnnotation(PAPYRUS_EXTERNAL_RESOURCE_EANNOTATION_SOURCE);
- if(annotation == null) {
- // create a new one
- annotation = ((Element)container).createEAnnotation(PAPYRUS_EXTERNAL_RESOURCE_EANNOTATION_SOURCE);
- }
- // update or create
- annotation.getDetails().put(LOCATION_STRATEGY_KEY, newStrategy.getIdentifier());
- }
- }
-
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ResourcePerProfileStrategy.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ResourcePerProfileStrategy.java
deleted file mode 100644
index df2d511cb29..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/ResourcePerProfileStrategy.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import java.util.HashSet;
-import java.util.List;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EAnnotation;
-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.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Package;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.ProfileApplication;
-import org.eclipse.uml2.uml.resource.UMLResource;
-
-/**
- * Strategy that uses one resource per profile application
- */
-public class ResourcePerProfileStrategy implements IStereotypeApplicationLocationStrategy {
-
- /** default resource name */
- protected static final String DEFAULT_RESOURCE_NAME = "default"; //$NON-NLS-1$
-
- /** default resource extension */
- protected static final String DEFAULT_RESOURCE_EXTENSION = "profile"; //$NON-NLS-1$
-
- /** key for the value of the eannotation that is used to store specific URI for stereotype application resource */
- public static final String SPECIFIC_URI_EANNOTATION_KEY = "specificURI"; //$NON-NLS-1$
-
- /** identifier of this strategy */
- public static final String ID = "ResourcePerProfileStrategy"; //$NON-NLS-1$
-
- /** singleton instance */
- private static ResourcePerProfileStrategy instance;
-
- /**
- * Returns the singleton instance for this strategy
- *
- * @return the singleton instance for this strategy
- */
- public static ResourcePerProfileStrategy getInstance() {
- if(instance == null) {
- instance = new ResourcePerProfileStrategy();
- }
- return instance;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getIdentifier() {
- return ID;
- }
-
- /**
- * Returns the resource where the stereotype application should be added for the given couple element/stereotype
- *
- * @param element
- * the stereotyped element
- * @param definition
- * the definition of the stereotype to apply
- * @return the resource where the stereotype application should be added
- */
- public Resource getStereotypeApplicationResource(Element element, EClass definition) {
- // in this case, the resource is specific to the profile application.
- // the profile application should give the right path.
- // 1. retrieve profile application
- // 2. ask it for the resource name (by default, it should give the name of the profile)
- // 3. compute the resource name
- // 4. ask to create on demand ?
- // 5. return the content of this resource
- ProfileApplication profileApplication = getProfileApplication(element, definition);
- Resource baseResource = element.eResource();
- if(baseResource==null) {
- return null;
- }
- ResourceSet resourceSet = baseResource.getResourceSet();
- if(resourceSet instanceof ModelSet) {
- ModelSet modelSet = (ModelSet)resourceSet;
- URI newURI = getProfileApplicationResourceURI(profileApplication, baseResource);
- Resource resource = ModelUtils.getOrCreateResource(modelSet, true, newURI, UMLResource.UML_CONTENT_TYPE_IDENTIFIER);
- return resource;
- }
- // by default, return the resource containing the element
- return element.eResource();
- }
-
- /**
- * Returns the specific URI indicated on the profile application
- *
- * @param profileApplication
- * the profile application that should have stereotype applications in resource with specific URI
- * @return the specific URI or <code>null</code>
- */
- protected URI getSpecificURI(ProfileApplication profileApplication, Resource baseResource) {
- EAnnotation annotation = profileApplication.getEAnnotation(PapyrusStereotypeApplicationHelper.PAPYRUS_EXTERNAL_RESOURCE_EANNOTATION_SOURCE);
- if(annotation != null) {
- String value = annotation.getDetails().get(SPECIFIC_URI_EANNOTATION_KEY);
- URI newURI = baseResource.getURI();
- newURI = newURI.trimSegments(1);
- newURI = newURI.appendSegment(value);
- return newURI;
- }
- return null;
- }
-
- /**
- * Checks if the profile application should use a specific URI for the steroetype application resources
- *
- * @param profileApplication
- * profile application that should have stereotype applications in resource with specific URI
- * @return <code>true</code> if a specific URI is specified for the profile application
- */
- protected boolean hasSpecificURI(ProfileApplication profileApplication) {
- EAnnotation annotation = profileApplication.getEAnnotation(PapyrusStereotypeApplicationHelper.PAPYRUS_EXTERNAL_RESOURCE_EANNOTATION_SOURCE);
- return annotation != null;
- }
-
- protected String getStereotypeApplicationResourceExtension(ProfileApplication profileApplication, boolean basedOnMainProfile) {
- // 1. check if nested profiles have the same resource or if each nested profile has its own resource
- // 2. deduce the name from the profile application
- // 3. return the string. This will be the extension of the file
- String resourceExtension = null;
- if(profileApplication != null) {
- Profile profile = profileApplication.getAppliedProfile();
- if(profile != null) {
- // if based on main profile => retrieve the main profile name.
- // otherwise, returns the name of the profile
- if(basedOnMainProfile) {
- Profile parentProfile = profile;
- while(parentProfile.getNestingPackage() instanceof Profile) {
- parentProfile = (Profile)parentProfile.getNestingPackage();
- }
- resourceExtension = parentProfile.getName() + "Profile"; // warning, can not return an extension which is linked to another factory than a UML Factory
- } else {
- resourceExtension = profile.getName() + "Profile";
- }
- }
- }
- if(resourceExtension == null) {
- resourceExtension = DEFAULT_RESOURCE_EXTENSION;
- }
- return resourceExtension;
- }
-
- protected String getStereotypeApplicationResourceName(ProfileApplication profileApplication, boolean basedOnMainProfile) {
- // 1. check if nested profiles have the same resource or if each nested profile has its own resource
- // 2. deduce the name from the profile application.
- // 3. return the string. This will be the extension of the file
- String resourceName = null;
- if(profileApplication != null) {
- Package applyingPackage = profileApplication.getApplyingPackage();
- if(applyingPackage != null) {
- resourceName = applyingPackage.eResource().getURI().trimFileExtension().lastSegment();
- }
- }
- if(resourceName == null) {
- resourceName = DEFAULT_RESOURCE_NAME;
- }
- return resourceName;
- }
-
- /**
- * Returns the profile application for the given element on which the stereotype with specified definition is or will be applied
- *
- * @param element
- * the UML element on which stereotype is applied
- * @return the profile application or <code>null</code> if none was found.
- */
- protected ProfileApplication getProfileApplication(Element element, EClass definition) {
- Package nearestPackage = element.getNearestPackage();
- if(nearestPackage == null) {
- return null;
- }
- List<ProfileApplication> profileApplications = nearestPackage.getAllProfileApplications();
- for(ProfileApplication profileApplication : profileApplications) {
- EPackage appliedDefinition = profileApplication.getAppliedDefinition();
- List<EClassifier> classifiers = appliedDefinition.getEClassifiers();
- if(classifiers != null && !classifiers.isEmpty() && classifiers.contains(definition)) {
- return profileApplication;
- }
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public EList<EObject> getContainmentList(Element element, EClass definition) {
- Resource stereotypeApplicationResource = getStereotypeApplicationResource(element, definition);
- if(stereotypeApplicationResource != null) {
- return stereotypeApplicationResource.getContents();
- }
- // fallback: adds stereotype at the root of the UML resource.
- Resource elementResource = element.eResource();
- if(elementResource != null) {
- return elementResource.getContents();
- }
- return null;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Set<URI> getProfileApplicationResourceURIs(EObject root) {
- Set<URI> uris = new HashSet<URI>();
- // 1. retrieve all profile applications
- // 2. retrieve all URI from all this profile applications
- if(root instanceof Element && root.eResource()!=null) {
- Package nearestPackage = ((Element)root).getNearestPackage();
- if(nearestPackage != null) {
- List<ProfileApplication> profileApplications = nearestPackage.getAllProfileApplications();
- for(ProfileApplication profileApplication : profileApplications) {
- URI newURI = getProfileApplicationResourceURI(profileApplication, root.eResource());
- uris.add(newURI);
- }
- }
- }
- return uris;
- }
-
- protected URI getProfileApplicationResourceURI(ProfileApplication profileApplication, Resource baseResource) {
- // test if it needs a specific name. Otherwise, it will use a default name
- URI newURI = null;
- if(hasSpecificURI(profileApplication)) {
- newURI = getSpecificURI(profileApplication, baseResource);
- }
- if(newURI == null) {
- URI baseURI = baseResource.getURI();
- newURI = baseURI.trimSegments(1);
- String resourceName = getStereotypeApplicationResourceName(profileApplication, true);
- newURI = newURI.appendSegment(resourceName);
- String extension = getStereotypeApplicationResourceExtension(profileApplication, true);
- newURI = newURI.appendFileExtension(extension);
- }
- return newURI;
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StandardApplicationLocationStrategy.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StandardApplicationLocationStrategy.java
deleted file mode 100644
index d0e4de7274a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StandardApplicationLocationStrategy.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import java.util.Collections;
-import java.util.Set;
-
-import org.eclipse.emf.common.util.EList;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EClass;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.uml2.uml.Element;
-
-
-/**
- * Usual stereotype application strategy
- */
-public class StandardApplicationLocationStrategy implements IStereotypeApplicationLocationStrategy {
-
- /** identifier of this strategy */
- public static final String ID = "standardStrategy"; //$NON-NLS-1$
-
- /** singleton instance */
- protected static StandardApplicationLocationStrategy instance;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getIdentifier() {
- return ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public EList<EObject> getContainmentList(Element element, EClass definition) {
- if(element.eResource() !=null) {
- return element.eResource().getContents();
- }
- return null;
- }
-
- /**
- * @return
- */
- public static StandardApplicationLocationStrategy getInstance() {
- if(instance ==null) {
- instance = new StandardApplicationLocationStrategy();
- }
- return instance;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Set<URI> getProfileApplicationResourceURIs(EObject root) {
- return Collections.emptySet();
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StrategyRegistry.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StrategyRegistry.java
deleted file mode 100644
index 07af6bfd0b7..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/StrategyRegistry.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-import java.util.HashMap;
-import java.util.Map;
-
-
-/**
- * Registry for all {@link IStereotypeApplicationLocationStrategy}.
- */
-public class StrategyRegistry {
-
- /** singleton instance */
- private static StrategyRegistry instance;
-
- /** map identifier - strategies */
- private Map<String, IStereotypeApplicationLocationStrategy> registry;
-
- /**
- * Returns the singleton instance for this strategy
- *
- * @return the singleton instance for this strategy
- */
- public static StrategyRegistry getInstance() {
- if(instance == null) {
- instance = new StrategyRegistry();
- instance.init();
- }
- return instance;
- }
-
- /**
- * Initialize the strategy registry, reading extension points.
- */
- protected void init() {
- // TODO: read extension points.
- registry = new HashMap<String, IStereotypeApplicationLocationStrategy>();
- registry.put(StandardApplicationLocationStrategy.ID, StandardApplicationLocationStrategy.getInstance());
- registry.put(OneResourceOnlyStrategy.ID, OneResourceOnlyStrategy.getInstance());
- registry.put(ResourcePerProfileStrategy.ID, ResourcePerProfileStrategy.getInstance());
- }
-
- /**
- * Returns the strategy for the given identifier
- * @param identifier identifier of the strategy
- * @return the strategy found or <code>null</code> if none was found
- */
- public IStereotypeApplicationLocationStrategy getStrategy(String identifier) {
- return registry.get(identifier);
- }
-}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/UpdateStereotypeApplicationsLocationCommand.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/UpdateStereotypeApplicationsLocationCommand.java
deleted file mode 100644
index b45fa8fc07a..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/helper/UpdateStereotypeApplicationsLocationCommand.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.helper;
-
-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.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.uml2.uml.ProfileApplication;
-
-/**
- * Command to update stereotype application locations when strategy is changed
- */
-public class UpdateStereotypeApplicationsLocationCommand extends AbstractTransactionalCommand {
-
- protected ProfileApplication profileApplication;
- protected IStereotypeApplicationLocationStrategy oldStrategy;
- protected IStereotypeApplicationLocationStrategy newStrategy;
-
- /**
- * Default Constructor
- * @param profileApplication the profile application for which stereotype applications should be moved
- * @param oldStrategy old strategy currently used to store stereotype applications
- * @param newStrategy new strategy to use for stereotype application management
- */
- public UpdateStereotypeApplicationsLocationCommand(ProfileApplication profileApplication, IStereotypeApplicationLocationStrategy oldStrategy, IStereotypeApplicationLocationStrategy newStrategy) {
- super(TransactionUtil.getEditingDomain(profileApplication), "Update Stereotype Applications Location", getWorkspaceFiles(profileApplication));
- this.profileApplication = profileApplication;
- this.oldStrategy = oldStrategy;
- this.newStrategy = newStrategy;
-
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- IStatus status = ExternalResourceProfileUtils.updateStereotypeApplicationsLocation(profileApplication, oldStrategy, newStrategy);
- return new CommandResult(status);
- }
-
-} \ No newline at end of file
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java b/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java
deleted file mode 100644
index dff5b807a7d..00000000000
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource/src/org/eclipse/papyrus/uml/profile/externalresource/model/StereotypeApplicationExternalResourceModel.java
+++ /dev/null
@@ -1,252 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Remi Schnekenburger (CEA LIST) - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.model;
-
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.runtime.IPath;
-import org.eclipse.emf.common.util.URI;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
-import org.eclipse.papyrus.infra.core.resource.AbstractModel;
-import org.eclipse.papyrus.infra.core.resource.IModel;
-import org.eclipse.papyrus.infra.core.resource.IModelSnippet;
-import org.eclipse.papyrus.infra.core.resource.ModelUtils;
-import org.eclipse.papyrus.infra.core.resource.NotFoundException;
-import org.eclipse.papyrus.uml.profile.externalresource.Activator;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.IStereotypeApplicationLocationStrategy;
-import org.eclipse.papyrus.uml.profile.externalresource.helper.PapyrusStereotypeApplicationHelper;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
-import org.eclipse.uml2.uml.resource.UMLResource;
-
-/**
- * Model to manage stereotype applications in external resources.
- */
-public class StereotypeApplicationExternalResourceModel extends AbstractModel implements IModel {
-
- /** identifier of this IModel */
- public static final String ID = "ExternalStereotypeApplicationModel";
-
- /** list of resources for stereotype applications */
- protected List<Resource> profileApplicationResources = new ArrayList<Resource>();
-
- /** stores the root URI that was used to load all the manage resources */
- protected URI rootURI;
-
- /**
- * {@inheritDoc}
- */
- @Override
- public String getIdentifier() {
- return ID;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void createModel(IPath fullPath) {
- // throw new UnsupportedOperationException("CreateModel_IPath is not supported for " + getClass().getCanonicalName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void createModel(URI uri) {
- // throw new UnsupportedOperationException("CreateModel_URI is not supported for " + getClass().getCanonicalName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void loadModel(IPath path) {
- loadModel(getPlatformURI(path));
- }
-
- /**
- * Returns a platform resource URI of the given path
- *
- * @param path
- * the path
- * @return the uri
- */
- protected URI getPlatformURI(IPath path) {
- return URI.createPlatformResourceURI(path.toString(), true);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void loadModel(URI uri) {
- rootURI = uri;
- List<Resource> resources = getResources(true);
- for(Resource resource : resources) {
- try {
- if(!resource.isLoaded()) {
- resource.load(null);
- }
- configureResource(resource);
- profileApplicationResources.add(resource);
- } catch (IOException e) {
- Activator.log.error(e);
- }
- }
- // call registered snippets
- snippets.performStart(this);
- }
-
- /**
- * Returns the dynamically computed list of resources in which stereotype applications should be located
- *
- * @return the list of resources in which stereotype applications should be located
- */
- protected List<Resource> getResources(boolean loadOnDemand) {
- List<Resource> resources = new ArrayList<Resource>();
- // get all profile applications resource to load from the strategy. do not care of the URI ?
- UmlModel umlModel = (UmlModel)modelSet.getModel(UmlModel.MODEL_ID);
-
- // should retrieve ALL uml files that contains elements that are owned directly or indirectly by the main model
- try {
- if(umlModel != null && umlModel.lookupRoot() != null) {
- EObject root = umlModel.lookupRoot();
- IStereotypeApplicationLocationStrategy strategy = PapyrusStereotypeApplicationHelper.getCurrentLocationStrategy(root);
- if(strategy != null) {
- Set<URI> profileApplicationResourceURIs = strategy.getProfileApplicationResourceURIs(root);
- for(URI resourceURI : profileApplicationResourceURIs) {
- Resource resource = ModelUtils.getOrCreateResource(modelSet, loadOnDemand, resourceURI, UMLResource.UML_CONTENT_TYPE_IDENTIFIER);
- resources.add(resource);
- }
- }
- }
- } catch (NotFoundException e) {
- Activator.log.debug(e.getMessage());
- return Collections.emptyList();
- }
- return resources;
- }
-
- protected void configureResource(Resource resource) {
- if(resource instanceof XMIResource) {
- ((XMIResource)resource).getDefaultSaveOptions().putAll(getSaveOptions());
- ((XMIResource)resource).setEncoding(AbstractBaseModel.ENCODING);
- }
- }
-
- protected Map<Object, Object> getSaveOptions() {
- Map<Object, Object> saveOptions = new HashMap<Object, Object>();
- // default save options.
- saveOptions.put(XMIResource.OPTION_DECLARE_XML, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_PROCESS_DANGLING_HREF, XMIResource.OPTION_PROCESS_DANGLING_HREF_DISCARD);
- saveOptions.put(XMIResource.OPTION_SCHEMA_LOCATION, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_USE_XMI_TYPE, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_SAVE_TYPE_INFORMATION, Boolean.TRUE);
- saveOptions.put(XMIResource.OPTION_SKIP_ESCAPE_URI, Boolean.FALSE);
- saveOptions.put(XMIResource.OPTION_ENCODING, "UTF-8");
- //see bug 397987: [Core][Save] The referenced plugin models are saved using relative path
- saveOptions.put(XMIResource.OPTION_URI_HANDLER, new org.eclipse.emf.ecore.xmi.impl.URIHandlerImpl.PlatformSchemeAware());
- return saveOptions;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void importModel(IPath path) {
- throw new UnsupportedOperationException("ImportModel_IPath is not supported for " + getClass().getCanonicalName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void importModel(URI uri) {
- throw new UnsupportedOperationException("ImportModel_URI is not supported for " + getClass().getCanonicalName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void saveModel() throws IOException {
- List<Resource> resources = getResources(true);
- for(Resource resource : resources) {
- if(!getModelManager().getTransactionalEditingDomain().isReadOnly(resource) && !ModelUtils.resourceFailedOnLoad(resource)) {
- resource.save(getSaveOptions());
- }
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void changeModelPath(IPath fullPath) {
- throw new UnsupportedOperationException("changeModelPath is not supported for " + getClass().getCanonicalName());
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void setModelURI(URI uri) {
- List<Resource> resources = getResources(true);
- for(Resource resource : resources) {
- if(!ModelUtils.resourceFailedOnLoad(resource)) {
- String fileExtension = resource.getURI().fileExtension();
- URI newURI = uri.appendFileExtension(fileExtension);
- resource.setURI(newURI);
- }
- }
- rootURI = uri;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void unload() {
- // call registered snippets
- snippets.performDispose(this);
- List<Resource> resources = getResources(false);
- for(Resource resource : resources) {
- resource.unload();
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void addModelSnippet(IModelSnippet snippet) {
- snippets.add(snippet);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Set<URI> getModifiedURIs() {
- return Collections.emptySet();
- }
-}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java
index 44cc9fcf3a8..7d67230b111 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/tests/AllTests.java
@@ -11,6 +11,8 @@
* Christian W. Damus (CEA LIST) - add test for AdapterUtils
* Christian W. Damus (CEA) - bug 402525
* Christian W. Damus (CEA) - bug 422257
+ * Christian W. Damus (CEA) - bug 399859
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.core.tests;
@@ -23,6 +25,7 @@ import org.eclipse.papyrus.infra.core.resource.ResourceAdapterTest;
import org.eclipse.papyrus.infra.core.services.ComposedServiceTest;
import org.eclipse.papyrus.infra.core.services.ServicesRegistryTest;
import org.eclipse.papyrus.infra.core.utils.AdapterUtilsTest;
+import org.eclipse.papyrus.infra.core.utils.JobBasedFutureTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
@@ -31,19 +34,19 @@ import org.junit.runners.Suite.SuiteClasses;
@RunWith(Suite.class)
@SuiteClasses({
-// {oep.resource}
-ModelSetTest.class, AbstractModelWithSharedResourceTest.class, NestingTransactionalCommandStackTest.class, ResourceAdapterTest.class,
-// {oep}.core.services
-ComposedServiceTest.class, ServicesRegistryTest.class,
-// {oep}.core.lifecycleevents
-/* SaveAndDirtyServiceTest.class, */LifeCycleEventsProviderTest.class,
-NestedEditorDelegatedOutlinePageTest.class,
-//{oep}.core.utils
-AdapterUtilsTest.class
+ // {oep.resource}
+ ModelSetTest.class, AbstractModelWithSharedResourceTest.class, NestingTransactionalCommandStackTest.class, ResourceAdapterTest.class,
+ // {oep}.core.services
+ ComposedServiceTest.class, ServicesRegistryTest.class,
+ // {oep}.core.lifecycleevents
+ /* SaveAndDirtyServiceTest.class, */LifeCycleEventsProviderTest.class,
+ NestedEditorDelegatedOutlinePageTest.class,
+ // {oep}.core.utils
+ AdapterUtilsTest.class, JobBasedFutureTest.class
})
/**
* Suite Class for all tests in the plugin
*/
public class AllTests {
- //Junit 4 Test suite
+ // Junit 4 Test suite
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java
new file mode 100644
index 00000000000..c8adaa17210
--- /dev/null
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/utils/JobBasedFutureTest.java
@@ -0,0 +1,330 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.utils;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.ExecutionException;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Executors;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.jobs.ISchedulingRule;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.papyrus.junit.matchers.MoreMatchers;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+import com.google.common.util.concurrent.FutureCallback;
+import com.google.common.util.concurrent.Futures;
+
+/**
+ * JUnit tests for the {@link JobBasedFuture} class.
+ */
+public class JobBasedFutureTest {
+ private static final long FUTURE_DURATION = 3L;
+
+ private static final TimeUnit FUTURE_DURATION_UNIT = TimeUnit.SECONDS;
+
+ private static final int CONCURRENT_THREAD_COUNT = 3;
+
+ private static ExecutorService exec;
+
+ private long startedWhen;
+
+ public JobBasedFutureTest() {
+ super();
+ }
+
+ @Test
+ public void normalCompletion() {
+ runGetterThreads(Fixture.returning(true));
+ assertRunningTimeAtLeast(2L, TimeUnit.SECONDS);
+ }
+
+ @Test
+ public void normalCompletionWithSchedulingRule() {
+ runGetterThreads(Fixture.returning(true), new RuleSupplier());
+ assertRunningTimeAtLeast(2L, TimeUnit.SECONDS);
+ }
+
+ @Test
+ public void timeOut() {
+ runGetterThreads(Fixture.returning(true, 5L, TimeUnit.SECONDS), 2L, TimeUnit.SECONDS);
+ }
+
+ @Test
+ public void timeOutWithSchedulingRule() {
+ runGetterThreads(Fixture.returning(true, 5L, TimeUnit.SECONDS), 2L, TimeUnit.SECONDS, new RuleSupplier());
+ }
+
+ @Test
+ public void computeFails() {
+ runGetterThreads(Fixture.throwing(TestException.class), TestException.class);
+ assertRunningTimeAtLeast(2L, TimeUnit.SECONDS);
+ }
+
+ @Test
+ public void cancel() {
+ runGetterThreads(Fixture.returning(true), true);
+ }
+
+ @Test
+ public void listen_success() {
+ addListeners(Fixture.returning(true));
+ }
+
+ @Test
+ public void listen_failure() {
+ addListeners(Fixture.throwing(TestException.class), TestException.class);
+ }
+
+ //
+ // Test framework
+ //
+
+ @BeforeClass
+ public static void createExecutor() {
+ exec = Executors.newCachedThreadPool();
+ }
+
+ @AfterClass
+ public static void shutDownExecutor() {
+ exec.shutdown();
+ exec = null;
+ }
+
+ @Before
+ public void starting() {
+ startedWhen = System.currentTimeMillis();
+ }
+
+ void assertRunningTimeAtLeast(long time, TimeUnit unit) {
+ assertThat("Test running time too short", System.currentTimeMillis() - startedWhen, MoreMatchers.greaterThan(unit.toMillis(time)));
+ }
+
+ void runGetterThreads(final Fixture fixture) {
+ runGetterThreads(fixture, 0L, null, null, false, true, null);
+ }
+
+ void runGetterThreads(final Fixture fixture, Supplier<? extends ISchedulingRule> rule) {
+ runGetterThreads(fixture, 0L, null, rule, false, true, null);
+ }
+
+ void runGetterThreads(final Fixture fixture, long timeout, TimeUnit unit) {
+ runGetterThreads(fixture, timeout, unit, null, false, null, TimeoutException.class);
+ }
+
+ void runGetterThreads(final Fixture fixture, long timeout, TimeUnit unit, Supplier<? extends ISchedulingRule> rule) {
+ runGetterThreads(fixture, timeout, unit, rule, false, null, null);
+ }
+
+ void runGetterThreads(final Fixture fixture, Boolean expected) {
+ runGetterThreads(fixture, 0L, null, null, false, expected, null);
+ }
+
+ void runGetterThreads(final Fixture fixture, boolean cancel) {
+ runGetterThreads(fixture, 0L, null, null, true, null, null);
+ }
+
+ void runGetterThreads(final Fixture fixture, Class<? extends Throwable> expectedException) {
+ runGetterThreads(fixture, 0L, null, null, false, null, expectedException);
+ }
+
+ private void runGetterThreads(final Fixture fixture, final long timeout, final TimeUnit unit, final Supplier<? extends ISchedulingRule> rule, final boolean cancel, Boolean expected, Class<? extends Throwable> expectedException) {
+ final List<Boolean> results = Lists.newCopyOnWriteArrayList();
+ final List<Throwable> thrown = Lists.newCopyOnWriteArrayList();
+ final CountDownLatch latch = new CountDownLatch(CONCURRENT_THREAD_COUNT);
+
+ Runnable reader = new Runnable() {
+
+ public void run() {
+ ISchedulingRule rule_ = (rule == null) ? null : rule.get();
+
+ try {
+ if (rule_ != null) {
+ Job.getJobManager().beginRule(rule_, null);
+ }
+
+ if (cancel) {
+ fixture.cancel(true);
+ } else if (timeout <= 0L) {
+ results.add(fixture.get());
+ } else {
+ results.add(fixture.get(timeout, unit));
+ }
+ } catch (InterruptedException e) {
+ thrown.add(e);
+ } catch (TimeoutException e) {
+ thrown.add(e);
+ } catch (ExecutionException e) {
+ thrown.add(e.getCause());
+ } finally {
+ latch.countDown();
+
+ if (rule_ != null) {
+ Job.getJobManager().endRule(rule_);
+ }
+ }
+ }
+ };
+
+ for (int i = 0; i < CONCURRENT_THREAD_COUNT; i++) {
+ exec.submit(reader);
+ }
+
+ try {
+ assertThat("Test timed out", latch.await(10L, TimeUnit.MINUTES), is(true));
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ fail("Interrupted waiting for test threads");
+ }
+
+ assertThat(results, is((expected == null) ? Collections.<Boolean> emptyList() : Collections.nCopies(CONCURRENT_THREAD_COUNT, expected)));
+
+ if (expectedException != null) {
+ assertThat(Iterables.size(Iterables.filter(thrown, expectedException)), is(CONCURRENT_THREAD_COUNT));
+ }
+ }
+
+ void addListeners(final Fixture fixture) {
+ addListeners(fixture, true, null);
+ }
+
+ void addListeners(final Fixture fixture, Class<? extends Throwable> expectedException) {
+ addListeners(fixture, null, expectedException);
+ }
+
+ private void addListeners(final Fixture fixture, Boolean expected, Class<? extends Throwable> expectedException) {
+ final List<Boolean> results = Lists.newCopyOnWriteArrayList();
+ final List<Throwable> thrown = Lists.newCopyOnWriteArrayList();
+ final CountDownLatch latch = new CountDownLatch(CONCURRENT_THREAD_COUNT);
+
+ for (int i = 0; i < CONCURRENT_THREAD_COUNT; i++) {
+ Futures.addCallback(fixture, new FutureCallback<Boolean>() {
+ public void onSuccess(Boolean result) {
+ results.add(result);
+ latch.countDown();
+ }
+
+ public void onFailure(Throwable t) {
+ thrown.add(t);
+ latch.countDown();
+ }
+ });
+ }
+
+ try {
+ assertThat("Test timed out", latch.await(1L, TimeUnit.MINUTES), is(true));
+ } catch (InterruptedException e) {
+ e.printStackTrace();
+ fail("Interrupted waiting for test listeners");
+ }
+
+ assertThat(results, is((expected == null) ? Collections.<Boolean> emptyList() : Collections.nCopies(CONCURRENT_THREAD_COUNT, expected)));
+
+ if (expectedException != null) {
+ assertThat(Iterables.size(Iterables.filter(thrown, expectedException)), is(CONCURRENT_THREAD_COUNT));
+ }
+
+ }
+
+ private static class Fixture extends JobBasedFuture<Boolean> {
+ private final long delay;
+ private final TimeUnit delayUnit;
+
+ private boolean value = true;
+ private Class<? extends Throwable> exception;
+
+ Fixture(long delay, TimeUnit delayUnit) {
+ super("Test fixture");
+
+ this.delay = delay;
+ this.delayUnit = delayUnit;
+ }
+
+ @Override
+ protected Boolean compute(IProgressMonitor monitor) throws Exception {
+ if (delay > 0L) {
+ delayUnit.sleep(delay);
+ }
+
+ if (exception != null) {
+ if (Exception.class.isAssignableFrom(exception)) {
+ throw (Exception) exception.newInstance();
+ } else if (Error.class.isAssignableFrom(exception)) {
+ throw (Error) exception.newInstance();
+ }
+ }
+
+ return value;
+ }
+
+ static Fixture returning(boolean value) {
+ return returning(value, FUTURE_DURATION, FUTURE_DURATION_UNIT);
+ }
+
+ static Fixture returning(boolean value, long delay, TimeUnit unit) {
+ Fixture result = new Fixture(delay, unit);
+ result.value = value;
+ result.schedule();
+ return result;
+ }
+
+ static Fixture throwing(Class<? extends Throwable> exception) {
+ return throwing(exception, FUTURE_DURATION, FUTURE_DURATION_UNIT);
+ }
+
+ static Fixture throwing(Class<? extends Throwable> exception, long delay, TimeUnit unit) {
+ Fixture result = new Fixture(delay, unit);
+ result.exception = exception;
+ result.schedule();
+ return result;
+ }
+ }
+
+ static class TestException extends Exception {
+ private static final long serialVersionUID = 1L;
+
+ public TestException() {
+ super();
+ }
+ }
+
+ static class RuleSupplier implements Supplier<ISchedulingRule> {
+ public ISchedulingRule get() {
+ return new ISchedulingRule() {
+ public boolean isConflicting(ISchedulingRule rule) {
+ return rule == this;
+ }
+
+ public boolean contains(ISchedulingRule rule) {
+ return rule == this;
+ }
+ };
+ }
+ }
+}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index 96ea9ff1b97..e214ba890ce 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -1,90 +1,92 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.core.runtime,
- org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.common.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.service.types;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.clazz.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.bundles.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.views.modelexplorer.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.activity.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.deployment.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.component.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.statemachine.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.communication.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.diagram.requirement.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.1.0",
- org.eclipse.papyrus.customization.properties.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.labelprovider.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.timing.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.editor.integration.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.search.tests;bundle-version="1.1.0",
- org.junit;bundle-version="4.10.0",
- org.eclipse.papyrus.uml.tools.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.tools.utils.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.nattable.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.extendedtypes.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.tools.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.wizards.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.modelrepair;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.diagram.profile.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.services.controlmode.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.nattable.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.nattable.allocation.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.infra.nattable.views.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.nattable.generic.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.modelexplorer.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.modelexplorer.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.sysml.nattable.requirement.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.textedit.port.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.textedit.property.tests;bundle-version="1.1.0",
- org.eclipse.papyrus.uml.textedit.parameter.tests;bundle-version="1.1.0"
-Bundle-Vendor: %providerName
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.1.0.qualifier
-Bundle-Name: %pluginName
-Bundle-Localization: plugin
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.tests.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.tests
-Import-Package: org.eclipse.papyrus.infra.core.sasheditor.di.tests,
- org.eclipse.papyrus.infra.core.sasheditor.tests,
- org.eclipse.papyrus.infra.core.tests,
- org.eclipse.papyrus.infra.emf.readonly.tests,
- org.eclipse.papyrus.infra.emf.tests,
- org.eclipse.papyrus.infra.gmfdiag.commands.tests,
- org.eclipse.papyrus.infra.gmfdiag.common.tests,
- org.eclipse.papyrus.infra.services.edit.tests,
- org.eclipse.papyrus.infra.services.resourceloading.tests,
- org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites,
- org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites,
- org.eclipse.papyrus.sysml.diagram.parametric.tests.suites,
- org.eclipse.papyrus.sysml.service.types.tests.suites,
- org.eclipse.papyrus.uml.modelrepair.tests,
- org.eclipse.papyrus.uml.service.types.tests.suites
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.common.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.resourceloading;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.service.types;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.service.types;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.clazz.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.bundles.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.views.modelexplorer.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.activity.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.deployment.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.component.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.usecase.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.statemachine.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.communication.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.dnd.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.diagram.blockdefinition;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.diagram.internalblock;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.diagram.requirement.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.modelexplorer;bundle-version="1.1.0",
+ org.eclipse.papyrus.customization.properties.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.labelprovider.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.timing.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.editor.integration.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.search.tests;bundle-version="1.1.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.tools.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools.utils.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.nattable.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.nattable.model.editor.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.sequence.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.interactionoverview.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.composite.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.css.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.extendedtypes.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.tools.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.wizards.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.modelrepair;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.diagram.profile.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.services.controlmode.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.nattable.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.nattable.allocation.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.nattable.views.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.nattable.generic.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.modelexplorer.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.modelexplorer.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.sysml.nattable.requirement.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.textedit.port.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.textedit.property.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.textedit.parameter.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.decoratormodel.tests;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;bundle-version="1.1.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.1.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.tests.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.tests
+Import-Package: org.eclipse.papyrus.infra.core.sasheditor.di.tests,
+ org.eclipse.papyrus.infra.core.sasheditor.tests,
+ org.eclipse.papyrus.infra.core.tests,
+ org.eclipse.papyrus.infra.emf.readonly.tests,
+ org.eclipse.papyrus.infra.emf.tests,
+ org.eclipse.papyrus.infra.gmfdiag.commands.tests,
+ org.eclipse.papyrus.infra.gmfdiag.common.tests,
+ org.eclipse.papyrus.infra.services.edit.tests,
+ org.eclipse.papyrus.infra.services.resourceloading.tests,
+ org.eclipse.papyrus.sysml.diagram.blockdefinition.tests.suites,
+ org.eclipse.papyrus.sysml.diagram.internalblock.tests.suites,
+ org.eclipse.papyrus.sysml.diagram.parametric.tests.suites,
+ org.eclipse.papyrus.sysml.service.types.tests.suites,
+ org.eclipse.papyrus.uml.modelrepair.tests,
+ org.eclipse.papyrus.uml.service.types.tests.suites
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index 61386d7eb51..ecb013d2e08 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2014 CEA LIST and others.
+ * Copyright (c) 2010, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
* Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bugs 402525, 323802, 431953, 433310, 434993
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
package org.eclipse.papyrus.tests;
@@ -106,6 +107,8 @@ public class AllTests {
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.stereotypeproperty.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.wizards.AllTests.class));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.uml.modelrepair.Activator.PLUGIN_ID, "org.eclipse.papyrus.uml.modelrepair.tests.AllTests"));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.decoratormodel.tests.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.AllTests.class));
/* uml diagrams */
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.uml.diagram.clazz.test.AllTests.class));
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.classpath b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.classpath
index 14c329f3779..980f30e6722 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.classpath
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.classpath
@@ -1,7 +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 kind="src" path="tests"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="tests"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.settings/org.eclipse.jdt.core.prefs
index 0de02b374f2..6285ded23e0 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,14 +1,14 @@
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.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF
index bc238a57750..6354f46b8aa 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/META-INF/MANIFEST.MF
@@ -1,5 +1,6 @@
Manifest-Version: 1.0
Export-Package: org.eclipse.papyrus.infra.emf.advice,
+ org.eclipse.papyrus.infra.emf.resource.index,
org.eclipse.papyrus.infra.emf.tests,
org.eclipse.papyrus.infra.emf.utils
Require-Bundle: org.eclipse.emf.ecore.xmi;bundle-version="2.8.0",
@@ -14,5 +15,5 @@ Bundle-Name: %pluginName
Bundle-Localization: plugin
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.emf.tests
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referenced.uml b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referenced.uml
new file mode 100644
index 00000000000..4eb552d1867
--- /dev/null
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referenced.uml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Zo00wEsEEeS6FPDplqwzlA" name="referencedModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_f4mwwEsEEeS6FPDplqwzlA" name="referencedPackage"/>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referencing.uml b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referencing.uml
new file mode 100644
index 00000000000..89e3ffcb56c
--- /dev/null
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/resources/index/referencing.uml
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Model xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_Zo00wEsEEeS6FPDplqwzlA" name="referencingModel">
+ <packagedElement xmi:type="uml:Package" xmi:id="_f4mwwEsEEeS6FPDplqwzlA" name="referencingPackage">
+ <packageImport xmi:id="_v-9wUEsEEeS6FPDplqwzlA">
+ <importedPackage href="../referencedProject/referenced.uml#_f4mwwEsEEeS6FPDplqwzlA"/>
+ </packageImport>
+ </packagedElement>
+</uml:Model>
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexTest.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexTest.java
new file mode 100644
index 00000000000..8c68d158822
--- /dev/null
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/resource/index/WorkspaceModelIndexTest.java
@@ -0,0 +1,443 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.emf.resource.index;
+
+import static org.eclipse.papyrus.junit.matchers.MoreMatchers.greaterThan;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.CountDownLatch;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Path;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+import org.eclipse.core.runtime.jobs.Job;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EStructuralFeature;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
+
+/**
+ * Test suite for the {@link WorkspaceModelIndex} class.
+ */
+public class WorkspaceModelIndexTest extends AbstractPapyrusTest {
+
+ private static final CrossReferenceIndexer index = new CrossReferenceIndexer();
+ private static WorkspaceModelIndex<CrossReferenceIndex> fixture;
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ private IProject referencingProject;
+ private IFile referencingFile;
+ private URI referencingURI;
+ private IProject referencedProject;
+ private IFile referencedFile;
+ private URI referencedURI;
+
+ public WorkspaceModelIndexTest() {
+ super();
+ }
+
+ @Test
+ public void indexBuilt() throws Exception {
+ Map<IFile, CrossReferenceIndex> index = fixture.getIndex().get();
+
+ assertIndex(index);
+ }
+
+ @Test
+ public void indexRebuiltOnChanges() throws Exception {
+ // Initial build
+ Map<IFile, CrossReferenceIndex> index = fixture.getIndex().get();
+
+ final String newFileName = "the_referencing_model.uml";
+
+ RenameJob rename = new RenameJob(referencingFile, newFileName);
+
+ // Update the identity of the file
+ referencingFile = referencingProject.getFile(new Path(newFileName));
+ referencingURI = uri(referencingFile);
+
+ // Rename it
+ rename.go();
+
+ long requestIndex = System.currentTimeMillis();
+
+ // Check the index
+ index = fixture.getIndex().get();
+
+ long gotIndex = System.currentTimeMillis();
+
+ assertThat("Didn't have to wait for the index to be rebuilt", (gotIndex - requestIndex), greaterThan(1000L));
+
+ assertIndex(index);
+ }
+
+ @Test
+ public void indexRebuiltOnDeletion() throws Exception {
+ // Initial build
+ Map<IFile, CrossReferenceIndex> index = fixture.getIndex().get();
+
+ DeleteJob delete = new DeleteJob(referencingFile);
+
+ // Delete it
+ delete.go();
+
+ long requestIndex = System.currentTimeMillis();
+
+ // Check the index
+ index = fixture.getIndex().get();
+
+ long gotIndex = System.currentTimeMillis();
+
+ assertThat("Didn't have to wait for the index to be rebuilt", (gotIndex - requestIndex), greaterThan(1000L));
+
+ assertIndex(index, true, Collections.<URI> emptySet(), Collections.<URI> emptySet(), false, null, null);
+ }
+
+ @Test
+ public void indexRebuiltOnProjectClose() throws Exception {
+ // Initial build
+ Map<IFile, CrossReferenceIndex> index = fixture.getIndex().get();
+
+ referencingFile.getProject().close(null);
+
+ // Check the index
+ index = fixture.getIndex().get();
+
+ assertIndex(index, true, Collections.<URI> emptySet(), Collections.<URI> emptySet(), false, null, null);
+
+ referencingFile.getProject().open(null);
+
+ index = fixture.getIndex().get();
+ assertIndex(index);
+ }
+
+ @Test
+ public void indexRebuiltOnProjectDelete() throws Exception {
+ // Initial build
+ Map<IFile, CrossReferenceIndex> index = fixture.getIndex().get();
+
+ referencingFile.getProject().delete(true, true, null);
+
+ // Check the index
+ index = fixture.getIndex().get();
+
+ assertIndex(index, true, Collections.<URI> emptySet(), Collections.<URI> emptySet(), false, null, null);
+ }
+
+ @Test
+ public void indexNotifiesOnReindex() throws Exception {
+ // Initial build
+ fixture.getIndex().get();
+
+ class TestListener extends WorkspaceModelIndexAdapter {
+ volatile int started;
+ volatile int ended;
+
+ @Override
+ protected void indexAboutToCalculateOrRecalculate(WorkspaceModelIndexEvent event) {
+ if (referencingProject.equals(event.getProject())) {
+ started++;
+ }
+ }
+
+ @Override
+ protected void indexCalculatedOrRecalculated(WorkspaceModelIndexEvent event) {
+ if (referencingProject.equals(event.getProject())) {
+ ended++;
+ }
+ }
+ }
+
+ TestListener listener = attach(new TestListener());
+
+ referencingFile.delete(true, null);
+
+ // Access the index again to synchronize
+ fixture.getIndex().get();
+
+ assertThat(listener.started, is(1));
+ assertThat(listener.ended, is(1));
+ }
+
+ //
+ // Test framework
+ //
+
+ @BeforeClass
+ public static void createFixture() {
+ fixture = new WorkspaceModelIndex<CrossReferenceIndex>("test", UMLResource.UML_CONTENT_TYPE_IDENTIFIER, index, 2);
+ }
+
+ @AfterClass
+ public static void destroyFixture() {
+ fixture.dispose();
+ fixture = null;
+ }
+
+ @Before
+ public void createProjects() throws Exception {
+ referencedProject = houseKeeper.createProject("referencedProject");
+ referencingProject = houseKeeper.createProject("referencingProject");
+
+ referencedFile = referencedProject.getFile("referenced.uml");
+ InputStream input = getTestResource("resources/index/referenced.uml");
+ try {
+ referencedFile.create(input, true, null);
+ } finally {
+ input.close();
+ }
+ referencedURI = uri(referencedFile);
+
+ referencingFile = referencingProject.getFile("referencing.uml");
+ input = getTestResource("resources/index/referencing.uml");
+ try {
+ referencingFile.create(input, true, null);
+ } finally {
+ input.close();
+ }
+ referencingURI = uri(referencingFile);
+ }
+
+ static URI uri(IFile file) {
+ return URI.createPlatformResourceURI(file.getFullPath().toString(), true);
+ }
+
+ private InputStream getTestResource(String path) throws IOException {
+ return Platform.getBundle("org.eclipse.papyrus.infra.emf.tests").getEntry(path).openStream();
+ }
+
+ void assertIndex(Map<IFile, CrossReferenceIndex> index) {
+ assertIndex(index, true, Collections.<URI> emptySet(), Collections.singleton(referencingURI), true, Collections.<URI> emptySet(), Collections.singleton(referencedURI));
+ }
+
+ void assertIndex(Map<IFile, CrossReferenceIndex> index, boolean expectReferenced, Set<URI> referencedImports, Set<URI> referencedExports, boolean expectReferencing, Set<URI> referencingImports, Set<URI> referencingExports) {
+ CrossReferenceIndex referenced = index.get(referencedFile);
+ assertThat(referenced, expectReferenced ? notNullValue() : nullValue());
+ if (referenced != null) {
+ assertThat(referenced.imports, is(referencedImports));
+ assertThat(referenced.exports, is(referencedExports));
+ }
+
+ CrossReferenceIndex referencing = index.get(referencingFile);
+ assertThat(referencing, expectReferencing ? notNullValue() : nullValue());
+
+ if (referencing != null) {
+ assertThat(referencing.exports, is(referencingImports));
+ assertThat(referencing.imports, is(referencingExports));
+ }
+ }
+
+ <T extends IWorkspaceModelIndexListener> T attach(T listener) {
+ fixture.addListener(houseKeeper.cleanUpLater(listener, new HouseKeeper.Disposer<T>() {
+ @Override
+ public void dispose(T object) {
+ fixture.removeListener(object);
+ }
+ }));
+
+ return listener;
+ }
+
+ //
+ // Nested types
+ //
+
+ static class CrossReferenceIndexer implements WorkspaceModelIndex.IndexHandler<CrossReferenceIndex> {
+ private final Map<IFile, CrossReferenceIndex> index = Maps.newHashMap();
+
+ private CrossReferenceIndex get(IFile file) {
+ CrossReferenceIndex result;
+
+ synchronized (index) {
+ result = index.get(file);
+ if (result == null) {
+ result = new CrossReferenceIndex();
+ index.put(file, result);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public CrossReferenceIndex index(IFile file) {
+ final CrossReferenceIndex result = get(file);
+
+ Set<URI> imports = result.imports;
+
+ ResourceSet resourceSet = new IndexingResourceSet();
+
+ try {
+ URI uri = uri(file);
+
+ Resource resource = resourceSet.getResource(uri, true);
+ for (Map.Entry<EObject, Collection<EStructuralFeature.Setting>> next : EcoreUtil.ProxyCrossReferencer.find(resource).entrySet()) {
+ for (EStructuralFeature.Setting setting : next.getValue()) {
+ Object references = setting.get(false);
+
+ if (references instanceof EObject) {
+ EObject ref = (EObject) references;
+ if (ref.eIsProxy()) {
+ URI href = EcoreUtil.getURI(ref).trimFragment();
+ if (href.isPlatformResource() && imports.add(href)) {
+ // add the corresponding export
+ IFile other = file.getWorkspace().getRoot().getFile(new Path(href.toPlatformString(true)));
+ get(other).exports.add(uri);
+ }
+ }
+ }
+ }
+ }
+ } finally {
+ EMFHelper.unload(resourceSet);
+ }
+
+ return result;
+ }
+
+ @Override
+ public void unindex(IFile file) {
+ URI uri = uri(file);
+
+ synchronized (index) {
+ // Remove this file from the index
+ index.remove(file);
+
+ // Remove exports because the deleted resource no longer imports resources
+ for (CrossReferenceIndex next : index.values()) {
+ next.exports.remove(uri);
+ }
+
+ // DO NOT remove imports because resources that still exist will still have
+ // proxies referencing the resource, despite that it is deleted
+ }
+ }
+ }
+
+ static class CrossReferenceIndex {
+ final Set<URI> imports = Sets.newConcurrentHashSet();
+ final Set<URI> exports = Sets.newConcurrentHashSet();
+ }
+
+ static class IndexingResourceSet extends ResourceSetImpl {
+ @Override
+ public EObject getEObject(URI uri, boolean loadOnDemand) {
+ // Don't resolve any proxies
+ return null;
+ }
+ }
+
+ static abstract class FileManipulationJob extends Job {
+ private final IFile file;
+
+ private final CountDownLatch latch = new CountDownLatch(1);
+
+ FileManipulationJob(String jobName, IFile file) {
+ super(jobName);
+
+ this.file = file;
+
+ setRule(file.getProject());
+ }
+
+ @Override
+ protected IStatus run(IProgressMonitor monitor) {
+ try {
+ manipulateFile(file, monitor);
+
+ // Release the test case
+ latch.countDown();
+
+ // Delay a bit to ensure that the test case has to wait for the index to update
+ Thread.sleep(TimeUnit.SECONDS.toMillis(3));
+ } catch (InterruptedException e) {
+ return Status.CANCEL_STATUS;
+ } catch (CoreException e) {
+ return e.getStatus();
+ }
+
+ return Status.OK_STATUS;
+ }
+
+ protected abstract void manipulateFile(IFile file, IProgressMonitor monitor) throws CoreException;
+
+ void go() throws InterruptedException {
+ schedule();
+ await();
+ }
+
+ void await() throws InterruptedException {
+ latch.await();
+ }
+
+ }
+
+ static class RenameJob extends FileManipulationJob {
+ private final String newName;
+
+ RenameJob(IFile file, String name) {
+ super(String.format("Rename %s as %s", file.getFullPath(), name), file);
+
+ this.newName = name;
+ }
+
+ @Override
+ protected void manipulateFile(IFile file, IProgressMonitor monitor) throws CoreException {
+ file.move(file.getFullPath().removeLastSegments(1).append(newName), true, monitor);
+ }
+ }
+
+ static class DeleteJob extends FileManipulationJob {
+ DeleteJob(IFile file) {
+ super(String.format("Delete %s", file.getFullPath()), file);
+ }
+
+ @Override
+ protected void manipulateFile(IFile file, IProgressMonitor monitor) throws CoreException {
+ file.delete(true, monitor);
+ }
+ }
+}
diff --git a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/tests/AllTests.java b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/tests/AllTests.java
index 29d5a3ca529..ae3b4e37eee 100644
--- a/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/tests/AllTests.java
+++ b/tests/junit/plugins/infra/emf/org.eclipse.papyrus.infra.emf.tests/tests/org/eclipse/papyrus/infra/emf/tests/AllTests.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,11 +8,13 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.infra.emf.tests;
import org.eclipse.papyrus.infra.emf.advice.ReadOnlyObjectEditAdviceTest;
+import org.eclipse.papyrus.infra.emf.resource.index.WorkspaceModelIndexTest;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceTest;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -24,10 +26,13 @@ import org.junit.runners.Suite.SuiteClasses;
*/
@RunWith(Suite.class)
@SuiteClasses({
-// oep.infra.emf.advice
-ReadOnlyObjectEditAdviceTest.class,
-// oep.infra.emf.utils
-ServiceUtilsForResourceTest.class })
+ // oep.infra.emf.advice
+ ReadOnlyObjectEditAdviceTest.class,
+ // oep.infra.emf.utils
+ ServiceUtilsForResourceTest.class,
+ // oep.infra.emf.resource.index
+ WorkspaceModelIndexTest.class
+})
public class AllTests {
public AllTests() {
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/MoreMatchers.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/MoreMatchers.java
new file mode 100644
index 00000000000..6d87a16b113
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/matchers/MoreMatchers.java
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.junit.matchers;
+
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * Some useful matchers that Hamcrest doesn't provide.
+ */
+public class MoreMatchers {
+
+ private MoreMatchers() {
+ super();
+ }
+
+ public static <N extends Number & Comparable<N>> Matcher<N> greaterThan(final N minimum) {
+ return new BaseMatcher<N>() {
+ public void describeTo(Description description) {
+ description.appendText("greater than ").appendValue(minimum);
+ }
+
+ @SuppressWarnings("unchecked")
+ public boolean matches(Object item) {
+ return ((N) item).compareTo(minimum) > 0;
+ }
+ };
+ }
+
+ public static Matcher<Iterable<?>> isEmpty() {
+ return new BaseMatcher<Iterable<?>>() {
+ public void describeTo(Description description) {
+ description.appendText("is empty");
+ }
+
+ public boolean matches(Object item) {
+ return Iterables.isEmpty((Iterable<?>) item);
+ }
+ };
+ }
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/SynchronousExecutorService.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/SynchronousExecutorService.java
new file mode 100644
index 00000000000..a6cddd29d97
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/SynchronousExecutorService.java
@@ -0,0 +1,188 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.junit.utils;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.concurrent.AbstractExecutorService;
+import java.util.concurrent.ConcurrentLinkedQueue;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.FutureTask;
+import java.util.concurrent.RejectedExecutionException;
+import java.util.concurrent.RunnableFuture;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.concurrent.locks.Condition;
+import java.util.concurrent.locks.Lock;
+import java.util.concurrent.locks.ReentrantLock;
+
+import org.eclipse.core.runtime.IStatus;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.core.runtime.Status;
+
+import com.google.common.collect.ImmutableList;
+
+/**
+ * A convenient {@link ExecutorService} implementation for test cases where we want to control
+ * when asynchronous tasks run.
+ */
+public class SynchronousExecutorService extends AbstractExecutorService {
+
+ /**
+ * A runnable to post to me to cause me to run all pending tasks. This lets the caller
+ * synchronize with me, to run and/or wait for all tasks up to that point.
+ *
+ * @see #flush()
+ */
+ public static final Runnable FLUSH = new Runnable() {
+ public void run() {
+ // Pass
+ }
+ };
+
+ private final AtomicBoolean isShutdown = new AtomicBoolean();
+ private final ConcurrentLinkedQueue<Runnable> queue = new ConcurrentLinkedQueue<Runnable>();
+
+ private final Lock lock = new ReentrantLock();
+ private final Condition done = lock.newCondition();
+
+ /**
+ * Constructor.
+ */
+ public SynchronousExecutorService() {
+ super();
+ }
+
+ public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedException {
+ lock.lockInterruptibly();
+ try {
+ long now = System.currentTimeMillis();
+ long deadline = now + unit.toMillis(timeout);
+ while (!isTerminated()) {
+ if (done.await(deadline - now, TimeUnit.MILLISECONDS)) {
+ break;
+ }
+ now = System.currentTimeMillis();
+ if (now >= deadline) {
+ break;
+ }
+ }
+ } finally {
+ lock.unlock();
+ }
+
+ return isTerminated();
+ }
+
+ public boolean isShutdown() {
+ return isShutdown.get();
+ }
+
+ public boolean isTerminated() {
+ return isShutdown() && queue.isEmpty();
+ }
+
+ public void shutdown() {
+ if (isShutdown.compareAndSet(false, true)) {
+ queue.clear();
+ }
+ }
+
+ public List<Runnable> shutdownNow() {
+ List<Runnable> result;
+
+ lock.lock();
+ try {
+ if (isShutdown.compareAndSet(false, true)) {
+ result = ImmutableList.copyOf(queue);
+ queue.clear();
+ done.signalAll();
+ } else {
+ result = Collections.emptyList();
+ }
+ } finally {
+ lock.unlock();
+ }
+
+ return result;
+ }
+
+ public void execute(Runnable command) {
+ final boolean flush = isFlush(command);
+
+ lock.lock();
+ try {
+ if (isShutdown()) {
+ throw new RejectedExecutionException("executor is shut down");
+ }
+
+ // Even if it's FLUSH, enqueue it because somebody may be synchronizing on a Future wrapping it
+ queue.add(command);
+ } finally {
+ lock.unlock();
+ }
+
+ if (flush) {
+ flush();
+ }
+ }
+
+ public void flush() {
+ lock.lock();
+ try {
+ for (Runnable next = queue.poll(); next != null; next = queue.poll()) {
+ lock.unlock();
+
+ try {
+ next.run();
+ } catch (Exception e) {
+ final String bsn = "org.eclipse.papyrus.junit.utils";
+ IStatus status = new Status(IStatus.ERROR, bsn, "Uncaught exception in async runnable.", e);
+ Platform.getLog(Platform.getBundle(bsn)).log(status);
+ } finally {
+ lock.lock();
+ }
+ }
+
+ if (isShutdown()) {
+ done.signalAll();
+ }
+ } finally {
+ lock.unlock();
+ }
+ }
+
+ @Override
+ protected <T> RunnableFuture<T> newTaskFor(Runnable task, T value) {
+ return new MyFutureTask<T>(task, value);
+ }
+
+ boolean isFlush(Runnable task) {
+ return (task == FLUSH) || ((task instanceof MyFutureTask<?>) && ((MyFutureTask<?>) task).task == FLUSH);
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class MyFutureTask<V> extends FutureTask<V> {
+ final Runnable task;
+
+ MyFutureTask(Runnable task, V value) {
+ super(task, value);
+
+ this.task = task;
+ }
+ }
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
index 5d0da4a751d..dd5fc65b021 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.junit.utils.rules;
@@ -16,6 +17,7 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.junit.Assert.fail;
+import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.lang.annotation.Annotation;
@@ -25,8 +27,11 @@ import java.util.Enumeration;
import java.util.HashSet;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
import java.util.Queue;
import java.util.Set;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -47,6 +52,7 @@ import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.uml2.uml.Package;
import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Rule;
import org.junit.rules.TestWatcher;
import org.junit.runner.Description;
@@ -54,10 +60,15 @@ import org.junit.runners.model.Statement;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;
+import com.google.common.base.Charsets;
import com.google.common.base.Predicates;
import com.google.common.collect.Iterables;
import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+import com.google.common.collect.Sets;
import com.google.common.io.ByteStreams;
+import com.google.common.io.CharStreams;
+import com.google.common.io.Resources;
/**
@@ -65,15 +76,12 @@ import com.google.common.io.ByteStreams;
* <ul>
* <li>an editing domain of some kind (subclasses must create it)</li>
* <li>a test project in the workspace, exposed via a nested {@link ProjectFixture} rule</li>
- * <li>a test {@link Package} loaded from a resource in the plug-in and saved as <tt>model.uml</tt> in the test project. This model is specified using
- * an annotation on the test, as described below</li>
+ * <li>a test {@link Package} loaded from a resource in the plug-in and saved as <tt>model.uml</tt> in the test project. This model is specified using an annotation on the test, as described below</li>
* </ul>
* The test model template to load into the editing domain and project must be specified by one of the following annotations:
* <ul>
- * <li>{@link JavaResource @JavaResource}: specifies the path to a resource to be loaded from the test class's classpath, using the
- * {@link Class#getResource(String)} API</li>
- * <li>{@link PluginResource @PluginResource}: specifies a path relative to the root of the OSGi bundle containing the test class, to be loaded via
- * the {@link Bundle#getEntry(String)} API</li>
+ * <li>{@link JavaResource @JavaResource}: specifies the path to a resource to be loaded from the test class's classpath, using the {@link Class#getResource(String)} API</li>
+ * <li>{@link PluginResource @PluginResource}: specifies a path relative to the root of the OSGi bundle containing the test class, to be loaded via the {@link Bundle#getEntry(String)} API</li>
* </ul>
* The resource annotation may be specified either on the test method, in which case it applies to that test case, or on the test
* class, in which case it applies to all test methods in the class that do not have a resource annotation of their own (method
@@ -95,6 +103,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
super();
}
+ @Override
public Statement apply(Statement base, Description description) {
testClass = description.getTestClass();
@@ -124,8 +133,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
}
/**
- * Obtains the test model, which is resident in the <tt>model.uml</tt> file in the test project (as indicated by its
- * {@linkplain #getModelResourceURI() URI}).
+ * Obtains the test model, which is resident in the <tt>model.uml</tt> file in the test project (as indicated by its {@linkplain #getModelResourceURI() URI}).
*
* @return the test model
*/
@@ -150,36 +158,46 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
@Override
protected void starting(Description description) {
domain = createEditingDomain();
- model = (Package)Iterables.getFirst(initModelResources(description), null).getContents().get(0);
-
+
+ Resource main = Iterables.getFirst(initModelResources(description), null);
+ assertThat("No main UML resource in model fixture", main, notNullValue());
+
+ model = (Package) main.getContents().get(0);
+
// We have finished initializing
initialResourceURIs = null;
+
+ didLoadResourceSet();
+ }
+
+ protected void didLoadResourceSet() {
+ // Pass
}
protected Iterable<Resource> initModelResources(Description description) {
List<Resource> result;
// Don't initialize the resources more than once (subclasses such as PapyrusEditorFixture can repeat this)
- if(initialResourceURIs == null) {
+ if (initialResourceURIs == null) {
Annotation resourceAnnotation = getResourceAnnotation(description);
ResourceKind kind = ResourceKind.getResourceKind(resourceAnnotation);
final String[] paths = kind.getResourcePaths(resourceAnnotation);
result = Lists.newArrayListWithCapacity(paths.length);
- for(String path : paths) {
+ for (String path : paths) {
result.add(initModelResource(new Path(path), kind));
}
List<URI> uris = Lists.newArrayListWithCapacity(result.size());
- for(Resource next : result) {
+ for (Resource next : result) {
uris.add(next.getURI());
}
initialResourceURIs = uris;
} else {
ResourceSet rset = getResourceSet();
result = Lists.newArrayList();
- for(URI next : initialResourceURIs) {
+ for (URI next : initialResourceURIs) {
result.add(rset.getResource(next, true));
}
}
@@ -189,7 +207,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
private Resource initModelResource(IPath resourcePath, ResourceKind kind) {
String targetResourceName = "model";
- if(isDIModel(resourcePath)) {
+ if (isDIModel(resourcePath)) {
// We will be initializing all three resources, and they have cross-references, so must not change
// resource name
targetResourceName = resourcePath.removeFileExtension().lastSegment();
@@ -204,61 +222,68 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
}
protected Resource initModelResource(String targetPath, ResourceKind resourceKind, String resourcePath) {
- Resource result;
+ Resource result = null;
ResourceSet resourceSet = getResourceSet();
final boolean bootstrapResourceSet = resourceSet == null;
- if(bootstrapResourceSet) {
+ if (bootstrapResourceSet) {
// Bootstrap the initialization of the test model with a plain resource set
resourceSet = new ResourceSetImpl();
resourceSet.getLoadOptions().put(XMLResource.OPTION_RECORD_UNKNOWN_FEATURE, true);
resourceSet.getLoadOptions().put(XMLResource.OPTION_LAX_FEATURE_PROCESSING, true);
}
+ Set<Resource> toUnload = Sets.newHashSet();
try {
IPath resourceIPath = new Path(resourcePath);
- if(isDIModel(resourceIPath)) {
- // Try to initialize the triumvirate of files
+ if (isDIModel(resourceIPath)) {
+ // Try to initialize the entire collection of files
resourceIPath = resourceIPath.removeFileExtension();
- // The UML resource must exist for any sane test
- result = doInitModelResource(resourceSet, targetPath, resourceKind, resourceIPath.addFileExtension(UmlModel.UML_FILE_EXTENSION));
+ Map<IPath, Boolean> manifest = loadManifest(resourceKind, resourceIPath);
+ for (Map.Entry<IPath, Boolean> next : manifest.entrySet()) {
+ Resource resource = doInitModelResource(resourceSet, targetPath, resourceKind, next.getKey());
- // Both of these are optional
- IPath notationPath = resourceIPath.addFileExtension(NotationModel.NOTATION_FILE_EXTENSION);
- if(resourceKind.exists(testClass, notationPath)) {
- doInitModelResource(resourceSet, targetPath, resourceKind, notationPath);
- }
- IPath diPath = resourceIPath.addFileExtension(DiModel.DI_FILE_EXTENSION);
- if(resourceKind.exists(testClass, diPath)) {
- doInitModelResource(resourceSet, targetPath, resourceKind, diPath);
+ if ((result == null) && UmlModel.UML_FILE_EXTENSION.equals(next.getKey().getFileExtension())) {
+ // We should always have this one, at least, and it's the one we most care about
+ result = resource;
+ }
+
+ if (!next.getValue()) {
+ // Unload this resource
+ toUnload.add(resource);
+ }
}
} else {
result = doInitModelResource(resourceSet, targetPath, resourceKind, resourceIPath);
}
+ if (result == null) {
+ fail("No UML resource in test model");
+ }
+
// Look for any other dependencies (libraries, profiles, etc.) that also need to be copied
Queue<Resource> dependents = new LinkedList<Resource>();
Set<Resource> scanned = new HashSet<Resource>();
dependents.add(result);
boolean loadedProfiles = false;
- for(Resource dependent = dependents.poll(); dependent != null; dependent = dependents.poll()) {
- if(scanned.add(dependent)) {
+ for (Resource dependent = dependents.poll(); dependent != null; dependent = dependents.poll()) {
+ if (scanned.add(dependent)) {
URI baseURI = result.getURI().trimSegments(1);
- if(!baseURI.isPrefix()) {
+ if (!baseURI.isPrefix()) {
baseURI = baseURI.appendSegment("");
}
- for(EObject proxy : EcoreUtil.UnresolvedProxyCrossReferencer.find(dependent).keySet()) {
+ for (EObject proxy : EcoreUtil.UnresolvedProxyCrossReferencer.find(dependent).keySet()) {
URI dependencyURI = EcoreUtil.getURI(proxy).trimFragment();
- if(dependencyURI.toString().startsWith(baseURI.toString())) {
+ if (dependencyURI.toString().startsWith(baseURI.toString())) {
Resource dependency = resourceSet.getResource(dependencyURI, false);
- if((dependency == null) || !dependency.isLoaded() || !dependency.getErrors().isEmpty()) {
+ if ((dependency == null) || !dependency.isLoaded() || !dependency.getErrors().isEmpty()) {
// It should be available in the test bundle. Try to get it
URI relative = dependencyURI.deresolve(baseURI);
IPath depPath = resourceIPath.removeLastSegments(1).append(URI.decode(relative.toString()));
- if(resourceKind.exists(testClass, depPath)) {
- if(dependency == null) {
+ if (resourceKind.exists(testClass, depPath)) {
+ if (dependency == null) {
dependency = resourceSet.createResource(dependencyURI);
} else {
dependency.unload();
@@ -278,7 +303,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
// If we depend on profiles, then we may have stereotype applications that need to resolve against that schema.
// In such case, re-load the model resource to resolve the stereotype schema
- if(loadedProfiles && Iterables.any(result.getContents(), Predicates.instanceOf(AnyType.class))) {
+ if (loadedProfiles && Iterables.any(result.getContents(), Predicates.instanceOf(AnyType.class))) {
try {
result.unload();
result.load(null);
@@ -287,8 +312,15 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
fail("Error re-loading resource to resolve stereotype schema: " + e.getLocalizedMessage());
}
}
+
+ // Now unload resources that the manifest indicates should not be loaded initially
+ for (Resource next : toUnload) {
+ next.unload();
+ next.getResourceSet().getResources().remove(next);
+ next.eAdapters().clear();
+ }
} finally {
- if(bootstrapResourceSet) {
+ if (bootstrapResourceSet) {
EMFHelper.unload(resourceSet);
}
}
@@ -296,23 +328,85 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
return result;
}
+ private Map<IPath, Boolean> loadManifest(ResourceKind resourceKind, IPath resourceIPath) {
+ Map<IPath, Boolean> result = null;
+ IPath manifestPath = resourceIPath.addFileExtension("manifest");
+
+ URL manifestURL = resourceKind.getResourceURL(testClass, manifestPath);
+ if (manifestURL != null) {
+ try {
+ result = parseManifest(manifestPath.removeLastSegments(1), manifestURL);
+ } catch (IOException e) {
+ e.printStackTrace();
+ // Create a default manifest
+ }
+ }
+
+ if (result == null) {
+ // Default manifest
+ result = Maps.newHashMap();
+ IPath basePath = manifestPath.removeFileExtension();
+ result.put(basePath.addFileExtension(DiModel.DI_FILE_EXTENSION), true);
+ result.put(basePath.addFileExtension(UmlModel.UML_FILE_EXTENSION), true);
+ result.put(basePath.addFileExtension(NotationModel.NOTATION_FILE_EXTENSION), true);
+ }
+
+ return result;
+ }
+
+ private Map<IPath, Boolean> parseManifest(IPath baseResourcePath, URL manifestURL) throws IOException {
+ Map<IPath, Boolean> result = Maps.newLinkedHashMap();
+
+ List<String> lines = CharStreams.readLines(CharStreams.newReaderSupplier(Resources.newInputStreamSupplier(manifestURL), Charsets.UTF_8));
+ Pattern pattern = Pattern.compile("([^=]+)(?:=(true|false))?");
+ Matcher m = pattern.matcher("");
+ for (String line : lines) {
+ m.reset(line);
+ if (m.matches()) {
+ IPath path = baseResourcePath.append(m.group(1));
+
+ boolean load = true;
+ if (m.group(2) != null) {
+ load = Boolean.valueOf(m.group(2));
+ }
+
+ result.put(path, load);
+ }
+ }
+
+ return result;
+ }
+
private Resource doInitModelResource(ResourceSet resourceSet, String targetPath, ResourceKind resourceKind, IPath resourceIPath) {
IPath targetIPath = new Path(targetPath);
- if(!resourceIPath.getFileExtension().equals(targetIPath.getFileExtension())) {
+ if (!resourceIPath.getFileExtension().equals(targetIPath.getFileExtension())) {
targetIPath = targetIPath.addFileExtension(resourceIPath.getFileExtension());
}
+ // If the file name is different from the core model name, then use it as is. It's an extra resource for some purpose
+ // (perhaps such as a library model)
+ if (!targetIPath.lastSegment().equals(resourceIPath.lastSegment())) {
+ targetIPath = targetIPath.removeLastSegments(1).append(resourceIPath.lastSegment());
+ }
+
final URI modelURI = project.getURI(targetIPath);
Resource result = resourceSet.getResource(modelURI, false);
- if(result == null) {
- result = resourceSet.createResource(modelURI);
+ if (result == null) {
+ String extension = modelURI.fileExtension();
+ if (DiModel.DI_FILE_EXTENSION.equals(extension) || UmlModel.UML_FILE_EXTENSION.equals(extension) || NotationModel.NOTATION_FILE_EXTENSION.equals(extension)) {
+ // Default load behaviour
+ result = resourceSet.createResource(modelURI);
+ } else {
+ // Assume it's a fragment of UML content (such as a profile-application resource)
+ result = resourceSet.createResource(modelURI, UMLPackage.eCONTENT_TYPE);
+ }
}
- if(!result.isLoaded()) {
- if(resourceSet instanceof ModelSet) {
- ModelSet modelSet = (ModelSet)resourceSet;
- if(modelSet.getURIWithoutExtension() == null) {
+ if (!result.isLoaded()) {
+ if (resourceSet instanceof ModelSet) {
+ ModelSet modelSet = (ModelSet) resourceSet;
+ if (modelSet.getURIWithoutExtension() == null) {
modelSet.getInternal().setPrimaryModelResourceURI(modelURI);
}
}
@@ -345,12 +439,12 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
initialResourceURIs = null;
model = null;
- if(domain instanceof TransactionalEditingDomain) {
- ((TransactionalEditingDomain)domain).dispose();
+ if (domain instanceof TransactionalEditingDomain) {
+ ((TransactionalEditingDomain) domain).dispose();
}
domain = null;
- if(resourceSet != null) {
+ if (resourceSet != null) {
EMFHelper.unload(resourceSet);
}
}
@@ -368,15 +462,15 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
fail("Could not access test method via JUnit framework.");
}
- if(testMethod.isAnnotationPresent(JavaResource.class)) {
+ if (testMethod.isAnnotationPresent(JavaResource.class)) {
result = testMethod.getAnnotation(JavaResource.class);
- } else if(testMethod.isAnnotationPresent(PluginResource.class)) {
+ } else if (testMethod.isAnnotationPresent(PluginResource.class)) {
result = testMethod.getAnnotation(PluginResource.class);
} else {
// The class must have an annotation
- if(testClass.isAnnotationPresent(JavaResource.class)) {
+ if (testClass.isAnnotationPresent(JavaResource.class)) {
result = testClass.getAnnotation(JavaResource.class);
- } else if(testClass.isAnnotationPresent(PluginResource.class)) {
+ } else if (testClass.isAnnotationPresent(PluginResource.class)) {
result = testClass.getAnnotation(PluginResource.class);
}
}
@@ -394,11 +488,11 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
}
String[] getResourcePaths(Annotation resourceAnnotation) {
- switch(this) {
+ switch (this) {
case JAVA:
- return ((JavaResource)resourceAnnotation).value();
+ return ((JavaResource) resourceAnnotation).value();
case BUNDLE:
- return ((PluginResource)resourceAnnotation).value();
+ return ((PluginResource) resourceAnnotation).value();
}
fail("Not a resource annotation: " + resourceAnnotation);
@@ -412,7 +506,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
URL getResourceURL(Class<?> context, IPath path) {
URL result = null;
- switch(this) {
+ switch (this) {
case JAVA:
result = context.getResource(path.toString());
break;
@@ -429,13 +523,13 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
String pattern = resourcePath.lastSegment();
IPath search;
- if(resourcePath.segmentCount() > 1) {
+ if (resourcePath.segmentCount() > 1) {
search = resourcePath.removeLastSegments(1);
} else {
search = Path.ROOT;
}
Enumeration<URL> urls = FrameworkUtil.getBundle(testClass).findEntries(search.toPortableString(), pattern, false);
- if((urls != null) && urls.hasMoreElements()) {
+ if ((urls != null) && urls.hasMoreElements()) {
result = urls.nextElement();
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java
index 991d7963095..f8477d18d74 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA and others.
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,6 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*/
package org.eclipse.papyrus.junit.utils.rules;
@@ -19,6 +20,7 @@ import java.util.Collections;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
import org.eclipse.papyrus.infra.core.resource.EditingDomainServiceFactory;
+import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceDescriptor;
import org.eclipse.papyrus.infra.core.services.ServiceDescriptor.ServiceTypeKind;
@@ -39,13 +41,14 @@ public class ModelSetFixture extends AbstractModelFixture<TransactionalEditingDo
@Override
public ModelSet getResourceSet() {
- return (ModelSet)super.getResourceSet();
+ return (ModelSet) super.getResourceSet();
}
+ @Override
protected TransactionalEditingDomain createEditingDomain() {
try {
ServicesRegistry services = createServiceRegistry();
- return (TransactionalEditingDomain)services.getService(ModelSet.class).getTransactionalEditingDomain();
+ return services.getService(ModelSet.class).getTransactionalEditingDomain();
} catch (Exception e) {
e.printStackTrace();
fail("Failed to initialize service registry and/or editing domain: " + e.getLocalizedMessage());
@@ -71,7 +74,7 @@ public class ModelSetFixture extends AbstractModelFixture<TransactionalEditingDo
ServicesRegistry result = new ServicesRegistry();
result.add(ModelSet.class, 10, new ModelSet());
-
+
ServiceDescriptor desc = new ServiceDescriptor(TransactionalEditingDomain.class, EditingDomainServiceFactory.class.getName(), ServiceStartKind.STARTUP, 10, Collections.singletonList(ModelSet.class.getName()));
desc.setServiceTypeKind(ServiceTypeKind.serviceFactory);
desc.setClassBundleID(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
@@ -81,4 +84,15 @@ public class ModelSetFixture extends AbstractModelFixture<TransactionalEditingDo
return result;
}
+
+ @Override
+ protected void didLoadResourceSet() {
+ try {
+ getResourceSet().loadModels(getModelResourceURI());
+ } catch (ModelMultiException e) {
+ e.printStackTrace();
+
+ fail("Failed to initialize ModelSet fixture: " + e.getLocalizedMessage());
+ }
+ }
}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ServiceRegistryModelSetFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ServiceRegistryModelSetFixture.java
new file mode 100644
index 00000000000..cf90e0274b2
--- /dev/null
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ServiceRegistryModelSetFixture.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ */
+package org.eclipse.papyrus.junit.utils.rules;
+
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+
+
+/**
+ * A model-set fixture that uses a fully configured service registry to provide the model set.
+ */
+public class ServiceRegistryModelSetFixture extends ModelSetFixture {
+
+ public ServiceRegistryModelSetFixture() {
+ super();
+ }
+
+ @Override
+ protected ServicesRegistry createServiceRegistry() throws Exception {
+ ServicesRegistry result = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+
+ try {
+ result.startRegistry();
+ } catch (ServiceException e) {
+ // Try to continue with the test, anyways. This is expected in the test environment
+ }
+
+ return result;
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.classpath b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.project b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.project
new file mode 100644
index 00000000000..f1713df9477
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.decoratormodel.controlmode.tests</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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..94d61f00da6
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..e86fa0e4e68
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,31 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.emf.ecore;bundle-version="2.10.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.core.resources;bundle-version="3.8.100",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.pde;bundle-version="3.8.100",
+ org.eclipse.pde.ui;bundle-version="3.8.0",
+ org.eclipse.papyrus.uml.decoratormodel;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.core.expressions;bundle-version="3.4.600",
+ org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.decoratormodel.controlmode;bundle-version="1.1.0"
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.decoratormodel.controlmode.tests
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/about.html b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/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/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/build.properties b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/build.properties
index 99c582ea623..071a645751e 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.properties/build.properties
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/build.properties
@@ -2,6 +2,7 @@ source.. = src/
output.. = bin/
bin.includes = META-INF/,\
.,\
- plugin.xml,\
resources/,\
- OSGI-INF/
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/org.eclipse.papyrus.uml.profile.externalresource.tests.launch b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.launch
index d5620191059..8b845a31489 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/org.eclipse.papyrus.uml.profile.externalresource.tests.launch
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.launch
@@ -9,12 +9,15 @@
<booleanAttribute key="clearConfig" value="true"/>
<booleanAttribute key="clearws" value="true"/>
<booleanAttribute key="clearwslog" value="false"/>
+<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
+<listEntry value="=org.eclipse.papyrus.uml.decoratormodel.controlmode/src"/>
+</listAttribute>
<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
<booleanAttribute key="default" value="true"/>
<booleanAttribute key="includeOptional" value="true"/>
<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AllTests.java"/>
+<listEntry value="/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AllTests.java"/>
</listAttribute>
<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
<listEntry value="1"/>
@@ -23,12 +26,13 @@
<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.profile.externalresource.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.AllTests"/>
<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.profile.externalresource.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.decoratormodel.controlmode.tests"/>
<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
-<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Dhelp.lucene.tokenizer=standard -Xms768m -Xmx1200m -XX:PermSize=256M -XX:MaxPermSize=512M -Dorg.eclipse.uml2.uml.util.UMLUtil$StereotypeApplicationHelper.INSTANCE=org.eclipse.papyrus.uml.profile.externalresource:org.eclipse.papyrus.uml.profile.externalresource.helper.PapyrusStereotypeApplicationHelper"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms128m -Xmx1200m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
<stringAttribute key="pde.version" value="3.3"/>
<stringAttribute key="product" value="org.eclipse.platform.ide"/>
<booleanAttribute key="run_in_ui_thread" value="false"/>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/plugin.properties b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/plugin.properties
new file mode 100644
index 00000000000..aa208d0865c
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/plugin.properties
@@ -0,0 +1,12 @@
+# Copyright (c) 2014 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+
+pluginName = Papyrus Decorator Models Control Mode Extensions Tests
+providerName = Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/pom.xml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/pom.xml
new file mode 100644
index 00000000000..66a4a765268
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../../../../releng/top-pom-main-tests.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel.controlmode.tests</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.di
index 9bddb6f752a..cac982021da 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/Package1.di
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.di
@@ -1,6 +1,5 @@
-<?xml version="1.0" encoding="ASCII"?>
+<?xml version="1.0" encoding="UTF-8"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList/>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder"/>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation
index bf9abab340f..bf9abab340f 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/Package1.notation
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.uml
new file mode 100644
index 00000000000..51f7628263d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.uml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Package xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_S6oEkFuxEeScCN6--znlYw" name="Package1_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_ajodUFuxEeScCN6--znlYw" name="Class1_1"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_tZkrwFu1EeS7QeHGh_E2zA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tbWNYFu1EeS7QeHGh_E2zA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tbW0cFu1EeS7QeHGh_E2zA" source="duplicatedProfile"/>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_tbW0cVu1EeS7QeHGh_E2zA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tcZWQFu1EeS7QeHGh_E2zA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_tcZ9UFu1EeS7QeHGh_E2zA" source="duplicatedProfile"/>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+</uml:Package>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.di
index 94f0ac19f7f..71fa9dbcd7d 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourceforAllProfiles/oneProfileApplied.di
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.di
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList>
- <availablePage>
- <emfPageIdentifier href="oneProfileApplied.notation#_LLO-QPVCEeKaxaN6QZe_iw"/>
- </availablePage>
- </pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
- <emfPageIdentifier href="oneProfileApplied.notation#_LLO-QPVCEeKaxaN6QZe_iw"/>
+ <emfPageIdentifier href="testmodel.notation#_JrKD4EijEeSKm9FE-lgkJg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
</children>
</children>
</windows>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.manifest
new file mode 100644
index 00000000000..8975fda497a
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.manifest
@@ -0,0 +1,6 @@
+package2.decorator.di
+package2.decorator.notation
+package2.decorator.uml
+testmodel.di=false
+testmodel.notation=false
+testmodel.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.notation
new file mode 100644
index 00000000000..9aadd161e3e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.notation
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_JrKD4EijEeSKm9FE-lgkJg" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_MLvC4EimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hR5u4EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_XMCuoEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4UinEeSYXMOYgqfvhA" key="tooltip_text" value="package1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u40inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMEimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMUimEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MLyGMkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLyGM0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLvC4UimEeSYXMOYgqfvhA" x="39" y="94"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Nb8GgEimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kIsV0EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_YakXQEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0UinEeSYXMOYgqfvhA" key="tooltip_text" value="package2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV00inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8GgkimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8Gg0imEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Nb8GhEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GhUimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GgUimEeSYXMOYgqfvhA" x="372" y="94"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_JrKD4UijEeSKm9FE-lgkJg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_JrKD4kijEeSKm9FE-lgkJg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_JrKD40ijEeSKm9FE-lgkJg">
+ <owner xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosEimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosUimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.finder,profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0UimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0kimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Finder"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx00imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1EimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1UimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8EimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8UimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="369" y="96"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTsUimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTskimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTs0imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtUimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.35)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.4796747967479675)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_JlbSgEinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kEinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kUinEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kkinEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5k0inEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsIb4EinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8EinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8UinEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8kinEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC80inEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB40UinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB40kinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB400inEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB41EinEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB41UinEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.uml
new file mode 100644
index 00000000000..4f1722b1736
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.uml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg http:///profile1/relationships.ecore profile/profile1.profile.uml#_AJoDUkijEeSKm9FE-lgkJg">
+ <uml:Package xmi:id="_plgxkEisEeSYXMOYgqfvhA" name="profile_applications">
+ <packagedElement xmi:type="uml:Package" xmi:id="_plwCIEisEeSYXMOYgqfvhA" name="testmodelpackage2">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_plwpMEisEeSYXMOYgqfvhA" supplier="_plwCIEisEeSYXMOYgqfvhA">
+ <client xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwUimEeSYXMOYgqfvhA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kwkimEeSYXMOYgqfvhA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kw0imEeSYXMOYgqfvhA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxEimEeSYXMOYgqfvhA" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxUimEeSYXMOYgqfvhA" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxkimEeSYXMOYgqfvhA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_plvbEEisEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_plvbEUisEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_plx3UEisEeSYXMOYgqfvhA" base_Dependency="_plwpMEisEeSYXMOYgqfvhA"/>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA">
+ <base_Dependency xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ </profile1.relationships:Import>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" kind="messagedriven">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_IpoHIFu3EeS7QeHGh_E2zA" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_B7fNcFuyEeScCN6--znlYw"/>
+ </profile1:Bean>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.ecore.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.ecore.uml
new file mode 100644
index 00000000000..8a11771a268
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.ecore.uml
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg http:///profile1/relationships.ecore profile/profile1.profile.uml#_AJoDUkijEeSKm9FE-lgkJg">
+ <uml:Package xmi:id="_plgxkEisEeSYXMOYgqfvhA" name="profile_applications">
+ <packagedElement xmi:type="uml:Package" xmi:id="_plwCIEisEeSYXMOYgqfvhA" name="testmodelpackage2">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_plwpMEisEeSYXMOYgqfvhA" supplier="_plwCIEisEeSYXMOYgqfvhA">
+ <client xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwUimEeSYXMOYgqfvhA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kwkimEeSYXMOYgqfvhA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kw0imEeSYXMOYgqfvhA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxEimEeSYXMOYgqfvhA" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxUimEeSYXMOYgqfvhA" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxkimEeSYXMOYgqfvhA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_1sMngFPZEeS4xLjmPOovdQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1tK34FPZEeS4xLjmPOovdQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_plvbEEisEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_plvbEUisEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_plx3UEisEeSYXMOYgqfvhA" base_Dependency="_plwpMEisEeSYXMOYgqfvhA"/>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA">
+ <base_Dependency xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ </profile1.relationships:Import>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" kind="messagedriven">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <Ecore:EClass xmi:id="_4VJmwFPZEeS4xLjmPOovdQ" xmlName="bean" className="MyBean">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ </Ecore:EClass>
+ <Ecore:EClass xmi:id="_cqSWUFPmEeSXr7NzpYqd8A">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ </Ecore:EClass>
+ <profile1:Bean xmi:id="_5wUtYFuyEeS7QeHGh_E2zA">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_B7fNcFuyEeScCN6--znlYw"/>
+ </profile1:Bean>
+ <Ecore:EClass xmi:id="_5xEUQFuyEeS7QeHGh_E2zA">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_B7fNcFuyEeScCN6--znlYw"/>
+ </Ecore:EClass>
+</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.di
index f8aefec2d0d..f6570c8e340 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/SimpleTestModel.di
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.di
@@ -1,15 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList>
- <availablePage>
- <emfPageIdentifier href="SimpleTestModel.notation#_YTWm4PLYEeKxdJFsMzlLJA"/>
- </availablePage>
- </pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
- <emfPageIdentifier href="SimpleTestModel.notation#_YTWm4PLYEeKxdJFsMzlLJA"/>
+ <emfPageIdentifier href="profile1.profile.notation#_rdgrcEigEeSRp-p9nf2EsA"/>
</children>
</children>
</windows>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.notation
new file mode 100644
index 00000000000..fd544c38cca
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.notation
@@ -0,0 +1,218 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_rdgrcEigEeSRp-p9nf2EsA" type="PapyrusUMLProfileDiagram" name="stereotypes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_33LW0EigEeSRp-p9nf2EsA" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_33PoQEigEeSRp-p9nf2EsA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoQUigEeSRp-p9nf2EsA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoQkigEeSRp-p9nf2EsA" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoQ0igEeSRp-p9nf2EsA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoREigEeSRp-p9nf2EsA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoRUigEeSRp-p9nf2EsA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_33OaIEigEeSRp-p9nf2EsA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_33OaIUigEeSRp-p9nf2EsA" x="88" y="41"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_6kXV0EigEeSRp-p9nf2EsA" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6kX84EigEeSRp-p9nf2EsA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX84UigEeSRp-p9nf2EsA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX84kigEeSRp-p9nf2EsA" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX840igEeSRp-p9nf2EsA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX85EigEeSRp-p9nf2EsA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX85UigEeSRp-p9nf2EsA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_6kXV0kigEeSRp-p9nf2EsA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6kXV00igEeSRp-p9nf2EsA" x="443" y="36"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_AYAIYEihEeSRp-p9nf2EsA" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AYAvcUihEeSRp-p9nf2EsA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYAvckihEeSRp-p9nf2EsA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWgEihEeSRp-p9nf2EsA" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWgUihEeSRp-p9nf2EsA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWgkihEeSRp-p9nf2EsA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWg0ihEeSRp-p9nf2EsA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AYAIYkihEeSRp-p9nf2EsA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AYAvcEihEeSRp-p9nf2EsA" x="275" y="41"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_BfLy4EihEeSRp-p9nf2EsA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_BfLy4kihEeSRp-p9nf2EsA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BfLy40ihEeSRp-p9nf2EsA" type="1071">
+ <children xmi:type="notation:Node" xmi:id="_btXXAEihEeSRp-p9nf2EsA" type="3002">
+ <element xmi:type="uml:Property" href="profile1.profile.uml#_btMX4EihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_btXXAUihEeSRp-p9nf2EsA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_BfLy5EihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BfLy5UihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BfMZ8EihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BfMZ8UihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BfMZ8kihEeSRp-p9nf2EsA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_BfMZ80ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BfMZ9EihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BfMZ9UihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BfMZ9kihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profile1.profile.uml#_Be-XgEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BfLy4UihEeSRp-p9nf2EsA" x="48" y="197"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_DNfu0EihEeSRp-p9nf2EsA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DNgV4EihEeSRp-p9nf2EsA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DNgV4UihEeSRp-p9nf2EsA" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DNgV4kihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DNgV40ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DNgV5EihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNgV5UihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DNgV5kihEeSRp-p9nf2EsA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DNgV50ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DNgV6EihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DNgV6UihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNgV6kihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profile1.profile.uml#_DNegsEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNfu0UihEeSRp-p9nf2EsA" x="287" y="197"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_WA6KgEihEeSRp-p9nf2EsA" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_WA6xkEihEeSRp-p9nf2EsA" type="5023"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_WA6xkUihEeSRp-p9nf2EsA" type="1063">
+ <children xmi:type="notation:Node" xmi:id="_XMi3MEihEeSRp-p9nf2EsA" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="profile1.profile.uml#_XMd-sEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XMi3MUihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_YztCQEihEeSRp-p9nf2EsA" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="profile1.profile.uml#_Yzr0IEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YztCQUihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Zg3qQEihEeSRp-p9nf2EsA" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="profile1.profile.uml#_Zg2cIEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Zg3qQUihEeSRp-p9nf2EsA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_WA6xkkihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_WA6xk0ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_WA6xlEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WA6xlUihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="profile1.profile.uml#_WA1SAEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WA6KgUihEeSRp-p9nf2EsA" x="73" y="339"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_oQBJ0EiiEeSKm9FE-lgkJg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_oQC_AEiiEeSKm9FE-lgkJg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oQC_AUiiEeSKm9FE-lgkJg" type="1005">
+ <children xmi:type="notation:Shape" xmi:id="_EpBRoEihEeSRp-p9nf2EsA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_EpBRokihEeSRp-p9nf2EsA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_EpBRo0ihEeSRp-p9nf2EsA" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EpBRpEihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EpBRpUihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EpBRpkihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EpBRp0ihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_EpBRqEihEeSRp-p9nf2EsA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EpBRqUihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EpBRqkihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EpBRq0ihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EpBRrEihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profile1.profile.uml#_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EpBRoUihEeSRp-p9nf2EsA" x="42" y="22"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_oQC_AkiiEeSKm9FE-lgkJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQC_A0iiEeSKm9FE-lgkJg"/>
+ </children>
+ <element xmi:type="uml:Package" href="profile1.profile.uml#_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQBJ0UiiEeSKm9FE-lgkJg" x="412" y="141" width="210" height="176"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_nHtZIF73EeSxyrN35sh8XQ" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_nHxDgF73EeSxyrN35sh8XQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nHxDgV73EeSxyrN35sh8XQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nHxqkF73EeSxyrN35sh8XQ" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nHxqkV73EeSxyrN35sh8XQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nHxqkl73EeSxyrN35sh8XQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_nHxqk173EeSxyrN35sh8XQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_nHvOUF73EeSxyrN35sh8XQ" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_nHvOUV73EeSxyrN35sh8XQ" x="272" y="350"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_rdgrcUigEeSRp-p9nf2EsA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_rdgrckigEeSRp-p9nf2EsA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_rdgrc0igEeSRp-p9nf2EsA">
+ <owner xmi:type="uml:Profile" href="profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_Gi8AoEihEeSRp-p9nf2EsA" type="1013" source="_BfLy4EihEeSRp-p9nf2EsA" target="_33LW0EigEeSRp-p9nf2EsA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Gi8AoUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Extension" href="profile1.profile.uml#_Gi3IIEihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Gi8AokihEeSRp-p9nf2EsA" points="[-2, -15, 14, 131]$[-14, -171, 2, -25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GjASEEihEeSRp-p9nf2EsA" id="(0.6083916083916084,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JshAsUihEeSRp-p9nf2EsA" id="(0.47,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_HDzSAEihEeSRp-p9nf2EsA" type="1013" source="_DNfu0EihEeSRp-p9nf2EsA" target="_AYAIYEihEeSRp-p9nf2EsA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_HDzSAUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Extension" href="profile1.profile.uml#_HDyD4EihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HDzSAkihEeSRp-p9nf2EsA" points="[-4, -50, 8, 131]$[-12, -156, 0, 25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6G7hAEiiEeSKm9FE-lgkJg" id="(0.43,0.02)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6G8IEEiiEeSKm9FE-lgkJg" id="(0.46,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_HjdCcEihEeSRp-p9nf2EsA" type="1013" source="_EpBRoEihEeSRp-p9nf2EsA" target="_6kXV0EigEeSRp-p9nf2EsA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_HjdCcUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Extension" href="profile1.profile.uml#_HjbNQUihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HjdCckihEeSRp-p9nf2EsA" points="[-2, -12, 1, 139]$[-53, -152, -50, -1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Hjgs0EihEeSRp-p9nf2EsA" id="(0.49,0.01)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6HJjcEiiEeSKm9FE-lgkJg" id="(0.65,0.82)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Iw5tAEihEeSRp-p9nf2EsA" type="4001" source="_BfLy4EihEeSRp-p9nf2EsA" target="_DNfu0EihEeSRp-p9nf2EsA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw6UEEihEeSRp-p9nf2EsA" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw6UEUihEeSRp-p9nf2EsA" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw6UEkihEeSRp-p9nf2EsA" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw6UE0ihEeSRp-p9nf2EsA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw67IEihEeSRp-p9nf2EsA" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw67IUihEeSRp-p9nf2EsA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw67IkihEeSRp-p9nf2EsA" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw67I0ihEeSRp-p9nf2EsA" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw67JEihEeSRp-p9nf2EsA" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw7iMEihEeSRp-p9nf2EsA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw7iMUihEeSRp-p9nf2EsA" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw7iMkihEeSRp-p9nf2EsA" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_Iw5tAUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Association" href="profile1.profile.uml#_IwZ9wEihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Iw5tAkihEeSRp-p9nf2EsA" points="[50, -8, -144, -8]$[144, -8, -50, -8]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JsgZoEihEeSRp-p9nf2EsA" id="(1.0,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JshAsEihEeSRp-p9nf2EsA" id="(0.0,0.5)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_oY1p0F73EeSxyrN35sh8XQ" type="4001" source="_BfLy4EihEeSRp-p9nf2EsA" target="_nHtZIF73EeSxyrN35sh8XQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_oY2Q4F73EeSxyrN35sh8XQ" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oY2Q4V73EeSxyrN35sh8XQ" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oY238F73EeSxyrN35sh8XQ" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oY238V73EeSxyrN35sh8XQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oY238l73EeSxyrN35sh8XQ" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oY238173EeSxyrN35sh8XQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oY3fAF73EeSxyrN35sh8XQ" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oY3fAV73EeSxyrN35sh8XQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oY3fAl73EeSxyrN35sh8XQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oY4GEF73EeSxyrN35sh8XQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oY4GEV73EeSxyrN35sh8XQ" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_oY4GEl73EeSxyrN35sh8XQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_oY1p0V73EeSxyrN35sh8XQ"/>
+ <element xmi:type="uml:Association" href="profile1.profile.uml#_oX_8UF73EeSxyrN35sh8XQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_oY1p0l73EeSxyrN35sh8XQ" points="[34, 25, -96, -73]$[118, 95, -12, -3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oZDsQF73EeSxyrN35sh8XQ" id="(0.7571428571428571,0.73)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_oZDsQV73EeSxyrN35sh8XQ" id="(0.12,0.36)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_x0-j0EigEeSRp-p9nf2EsA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.uml
new file mode 100644
index 00000000000..d6f4788c669
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.uml
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_raLqoEigEeSRp-p9nf2EsA" name="profile1" metaclassReference="_33I6kEigEeSRp-p9nf2EsA _6kVgoEigEeSRp-p9nf2EsA _AX-6QEihEeSRp-p9nf2EsA _nEyoAF73EeSxyrN35sh8XQ" metamodelReference="_raLqoUigEeSRp-p9nf2EsA">
+ <eAnnotations xmi:id="_0O4lAEihEeSRp-p9nf2EsA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_AJoDQEijEeSKm9FE-lgkJg" name="profile1" nsURI="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" nsPrefix="profile1">
+ <eAnnotations xmi:id="_AJrGkEijEeSKm9FE-lgkJg" source="PapyrusVersion">
+ <details xmi:id="_AJrGkUijEeSKm9FE-lgkJg" key="Version" value="0.0.1"/>
+ <details xmi:id="_AJrGkkijEeSKm9FE-lgkJg" key="Comment" value=""/>
+ <details xmi:id="_AJrGk0ijEeSKm9FE-lgkJg" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:id="_AJrGlEijEeSKm9FE-lgkJg" key="Date" value="2014-09-30"/>
+ <details xmi:id="_AJrGlUijEeSKm9FE-lgkJg" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDQUijEeSKm9FE-lgkJg" name="Bean">
+ <eAnnotations xmi:id="_AJoDQkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDQ0ijEeSKm9FE-lgkJg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDRUijEeSKm9FE-lgkJg" name="finder" ordered="false" eType="_AJoDSUijEeSKm9FE-lgkJg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AJoDR0ijEeSKm9FE-lgkJg" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_5AmtWl73EeSxyrN35sh8XQ" name="key" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Property"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDSUijEeSKm9FE-lgkJg" name="Finder">
+ <eAnnotations xmi:id="_AJoDSkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDS0ijEeSKm9FE-lgkJg" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_AJoDTUijEeSKm9FE-lgkJg" name="BeanKind">
+ <eAnnotations xmi:id="_AJoDTkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:id="_AJoDT0ijEeSKm9FE-lgkJg" name="entity"/>
+ <eLiterals xmi:id="_AJoDUEijEeSKm9FE-lgkJg" name="session" value="1"/>
+ <eLiterals xmi:id="_AJoDUUijEeSKm9FE-lgkJg" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:id="_AJoDUkijEeSKm9FE-lgkJg" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:id="_AJoDU0ijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDVEijEeSKm9FE-lgkJg" name="Import">
+ <eAnnotations xmi:id="_AJoDVUijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDVkijEeSKm9FE-lgkJg" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:id="_33I6kEigEeSRp-p9nf2EsA" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:id="_6kVgoEigEeSRp-p9nf2EsA" alias="Dependency">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </elementImport>
+ <elementImport xmi:id="_AX-6QEihEeSRp-p9nf2EsA" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <elementImport xmi:id="_nEyoAF73EeSxyrN35sh8XQ" alias="Property">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ </elementImport>
+ <packageImport xmi:id="_raLqoUigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:id="_raLqokigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Be-XgEihEeSRp-p9nf2EsA" name="Bean">
+ <ownedAttribute xmi:id="_Gi2hEEihEeSRp-p9nf2EsA" name="base_Class" association="_Gi3IIEihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_IwZWsEihEeSRp-p9nf2EsA" name="finder" type="_DNegsEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZWsUihEeSRp-p9nf2EsA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZWskihEeSRp-p9nf2EsA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:id="_btMX4EihEeSRp-p9nf2EsA" name="kind" type="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <ownedAttribute xmi:id="_oX_VQF73EeSxyrN35sh8XQ" name="key" association="_oX_8UF73EeSxyrN35sh8XQ">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Property"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_oX_VQV73EeSxyrN35sh8XQ"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_oX_VQl73EeSxyrN35sh8XQ" value="*"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_DNegsEihEeSRp-p9nf2EsA" name="Finder">
+ <ownedAttribute xmi:id="_HDxc0EihEeSRp-p9nf2EsA" name="base_Operation" association="_HDyD4EihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_Gi3IIEihEeSRp-p9nf2EsA" name="E_Bean_Class1" memberEnd="_Gi3IIUihEeSRp-p9nf2EsA _Gi2hEEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Gi3IIUihEeSRp-p9nf2EsA" name="extension_Bean" type="_Be-XgEihEeSRp-p9nf2EsA" aggregation="composite" association="_Gi3IIEihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HDyD4EihEeSRp-p9nf2EsA" name="E_Finder_Operation1" memberEnd="_HDyD4UihEeSRp-p9nf2EsA _HDxc0EihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HDyD4UihEeSRp-p9nf2EsA" name="extension_Finder" type="_DNegsEihEeSRp-p9nf2EsA" aggregation="composite" association="_HDyD4EihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_IwZ9wEihEeSRp-p9nf2EsA" name="bean_finder_1" memberEnd="_IwZ9wUihEeSRp-p9nf2EsA _IwZWsEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:id="_IwZ9wUihEeSRp-p9nf2EsA" name="bean" type="_Be-XgEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZ9wkihEeSRp-p9nf2EsA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZ9w0ihEeSRp-p9nf2EsA" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_WA1SAEihEeSRp-p9nf2EsA" name="BeanKind">
+ <ownedLiteral xmi:id="_XMd-sEihEeSRp-p9nf2EsA" name="entity"/>
+ <ownedLiteral xmi:id="_Yzr0IEihEeSRp-p9nf2EsA" name="session"/>
+ <ownedLiteral xmi:id="_Zg2cIEihEeSRp-p9nf2EsA" name="messagedriven"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_oOlmcEiiEeSKm9FE-lgkJg" name="relationships">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Eo_ccEihEeSRp-p9nf2EsA" name="Import">
+ <ownedAttribute xmi:id="_HjbNQEihEeSRp-p9nf2EsA" name="base_Dependency" association="_HjbNQUihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HjbNQUihEeSRp-p9nf2EsA" name="E_Import_Dependency1" memberEnd="_HjbNQkihEeSRp-p9nf2EsA _HjbNQEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HjbNQkihEeSRp-p9nf2EsA" name="extension_Import" type="_Eo_ccEihEeSRp-p9nf2EsA" aggregation="composite" association="_HjbNQUihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_oX_8UF73EeSxyrN35sh8XQ" name="" memberEnd="_oX_8UV73EeSxyrN35sh8XQ _oX_VQF73EeSxyrN35sh8XQ">
+ <ownedEnd xmi:id="_oX_8UV73EeSxyrN35sh8XQ" name="bean" type="_Be-XgEihEeSRp-p9nf2EsA" association="_oX_8UF73EeSxyrN35sh8XQ">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_oX_8Ul73EeSxyrN35sh8XQ"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_oX_8U173EeSxyrN35sh8XQ" value="*"/>
+ </ownedEnd>
+ </packagedElement>
+</uml:Profile>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.di
index 94f0ac19f7f..71fa9dbcd7d 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/OneResourcePerProfile/oneProfileApplied.di
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.di
@@ -1,15 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList>
- <availablePage>
- <emfPageIdentifier href="oneProfileApplied.notation#_LLO-QPVCEeKaxaN6QZe_iw"/>
- </availablePage>
- </pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
- <emfPageIdentifier href="oneProfileApplied.notation#_LLO-QPVCEeKaxaN6QZe_iw"/>
+ <emfPageIdentifier href="testmodel.notation#_JrKD4EijEeSKm9FE-lgkJg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
</children>
</children>
</windows>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.manifest
new file mode 100644
index 00000000000..b4ac1af087a
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.manifest
@@ -0,0 +1,7 @@
+testmodel.di
+testmodel.notation
+testmodel.uml
+package2.decorator.di=false
+package2.decorator.notation=false
+package2.decorator.uml=false
+package2.ecore.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.notation
new file mode 100644
index 00000000000..8a594ad445d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.notation
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_JrKD4EijEeSKm9FE-lgkJg" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_MLvC4EimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hR5u4EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_XMCuoEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4UinEeSYXMOYgqfvhA" key="tooltip_text" value="package1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u40inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMEimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMUimEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MLyGMkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLyGM0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLvC4UimEeSYXMOYgqfvhA" x="39" y="94"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Nb8GgEimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kIsV0EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_YakXQEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0UinEeSYXMOYgqfvhA" key="tooltip_text" value="package2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV00inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8GgkimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8Gg0imEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Nb8GhEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GhUimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GgUimEeSYXMOYgqfvhA" x="372" y="94"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_JrKD4UijEeSKm9FE-lgkJg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_JrKD4kijEeSKm9FE-lgkJg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_JrKD40ijEeSKm9FE-lgkJg">
+ <owner xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosEimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosUimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.finder,profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0UimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0kimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Finder"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx00imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1EimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1UimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8EimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8UimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="369" y="96"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTsUimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTskimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTs0imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtUimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.35)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.4796747967479675)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1hhQFuxEeScCN6--znlYw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1hhQVuxEeScCN6--znlYw" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1iIUFuxEeScCN6--znlYw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1iIUVuxEeScCN6--znlYw" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1iIUluxEeScCN6--znlYw" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1qrMFuxEeScCN6--znlYw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1qrMVuxEeScCN6--znlYw" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1qrMluxEeScCN6--znlYw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1qrM1uxEeScCN6--znlYw" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1qrNFuxEeScCN6--znlYw" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1mZwFuxEeScCN6--znlYw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1mZwVuxEeScCN6--znlYw" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1mZwluxEeScCN6--znlYw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1mZw1uxEeScCN6--znlYw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_J1nA0FuxEeScCN6--znlYw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.uml
new file mode 100644
index 00000000000..70800aee681
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.uml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg http:///profile1/relationships.ecore profile/profile1.profile.uml#_AJoDUkijEeSKm9FE-lgkJg">
+ <uml:Model xmi:id="_Jqf8kEijEeSKm9FE-lgkJg" name="testmodel">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Jqf8kUijEeSKm9FE-lgkJg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_MLPToEimEeSYXMOYgqfvhA" name="package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_aipeEEimEeSYXMOYgqfvhA" name="Entity1">
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_d-B_0EimEeSYXMOYgqfvhA" name="find">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_jv5QwEimEeSYXMOYgqfvhA" name="id">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_npgmoEimEeSYXMOYgqfvhA" name="BusinessRules"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_qnlhUEimEeSYXMOYgqfvhA" client="_aipeEEimEeSYXMOYgqfvhA" supplier="_npgmoEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" href="Package1_1.uml#_S6oEkFuxEeScCN6--znlYw"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_RpH4oEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpdP0EimEeSYXMOYgqfvhA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP0UimEeSYXMOYgqfvhA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP0kimEeSYXMOYgqfvhA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP00imEeSYXMOYgqfvhA" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP1EimEeSYXMOYgqfvhA" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP1UimEeSYXMOYgqfvhA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpcowEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_Nb6RUEimEeSYXMOYgqfvhA" name="package2">
+ <packagedElement xmi:type="uml:Class" xmi:id="_8I2YoEimEeSYXMOYgqfvhA" name="Bean2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_-9S2MEimEeSYXMOYgqfvhA" name="MessageProcessor"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_ANhH8EinEeSYXMOYgqfvhA" client="_8I2YoEimEeSYXMOYgqfvhA" supplier="_-9S2MEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="__xCvIFuxEeScCN6--znlYw" name="Package2_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_B7fNcFuyEeScCN6--znlYw" name="Class2_1"/>
+ </packagedElement>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4CRaQEilEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4CutQEilEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Model>
+ <profile1:Bean xmi:id="_b2GC8EimEeSYXMOYgqfvhA" base_Class="_aipeEEimEeSYXMOYgqfvhA" finder="_fYVaoEimEeSYXMOYgqfvhA"/>
+ <profile1:Finder xmi:id="_fYVaoEimEeSYXMOYgqfvhA" base_Operation="_d-B_0EimEeSYXMOYgqfvhA"/>
+ <profile1.relationships:Import xmi:id="_rjJKoEimEeSYXMOYgqfvhA" base_Dependency="_qnlhUEimEeSYXMOYgqfvhA"/>
+ <profile1:Bean xmi:id="_t8BGgEimEeSYXMOYgqfvhA" base_Class="_npgmoEimEeSYXMOYgqfvhA" kind="session"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AbstractDecoratorModelControlModeTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AbstractDecoratorModelControlModeTest.java
new file mode 100644
index 00000000000..a089f7aa5f5
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AbstractDecoratorModelControlModeTest.java
@@ -0,0 +1,633 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.ExecutorService;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.TimeoutException;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IResource;
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.edit.command.ChangeCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.emf.workspace.IWorkspaceCommandStack;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeManager;
+import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.SynchronousExecutorService;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.junit.utils.rules.ServiceRegistryModelSetFixture;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.model.DecoratorModel;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * Common test infrastructure for profile application externalization "control mode" tests.
+ */
+public abstract class AbstractDecoratorModelControlModeTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ @Rule
+ public final ModelSetFixture modelSet = new ServiceRegistryModelSetFixture();
+
+ @Rule
+ public final TestName testName = new TestName();
+
+ private EditingDomain testContext;
+
+ public AbstractDecoratorModelControlModeTest() {
+ super();
+ }
+
+ @SuppressWarnings("restriction")
+ @Before
+ public final void setUpAsyncExecutor() {
+ final ExecutorService oldExecutor = org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator.getDefault().getExecutorService();
+ org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator.getDefault().setExecutorService(houseKeeper.cleanUpLater(new SynchronousExecutorService(), new HouseKeeper.Disposer<ExecutorService>() {
+ @Override
+ public void dispose(ExecutorService object) {
+ try {
+ org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator.getDefault().getExecutorService().shutdownNow();
+ } finally {
+ org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator.getDefault().setExecutorService(oldExecutor);
+ }
+ }
+ }));
+ }
+
+ protected final void syncWithControlModeExecutorService() {
+ @SuppressWarnings("restriction")
+ Future<?> future = org.eclipse.papyrus.uml.decoratormodel.internal.controlmode.Activator.getDefault().getExecutorService().submit(SynchronousExecutorService.FLUSH);
+
+ try {
+ future.get(5L, TimeUnit.SECONDS);
+ } catch (TimeoutException e) {
+ fail("Test timed out synchronizing with control-mode executor service");
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to synchronize with control-mode executor service: " + e.getLocalizedMessage());
+ }
+ }
+
+ protected Resource control(Package package_, String fragmentName) {
+ ControlModeRequest request = request(package_, fragmentName);
+ ICommand control = ControlModeManager.getInstance().getControlCommand(request);
+
+ execute(control);
+ assertThat("Cannot undo control command", getTestContext().getCommandStack().canUndo(), is(true));
+
+ return request.getTargetResource(UmlModel.UML_FILE_EXTENSION);
+ }
+
+ private ControlModeRequest request(EObject objectToControl, String fragmentName) {
+ ControlModeRequest result = null;
+
+ if (!fragmentName.endsWith(".uml")) {
+ fragmentName = fragmentName + ".uml";
+ }
+
+ try {
+ URI fragmentURI = objectToControl.eResource().getURI().trimSegments(1).appendSegment(fragmentName);
+ result = new ControlModeRequest((TransactionalEditingDomain) getTestContext(), objectToControl, fragmentURI);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to create ControlModeRequest: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ protected void uncontrol(Package package_) {
+ ICommand uncontrol = ControlModeManager.getInstance().getUncontrolCommand(request(package_));
+
+ execute(uncontrol);
+ assertThat("Cannot undo control command", getTestContext().getCommandStack().canUndo(), is(true));
+ }
+
+ private ControlModeRequest request(EObject objectToUncontrol) {
+ ControlModeRequest result = null;
+
+ try {
+ result = new ControlModeRequest((TransactionalEditingDomain) getTestContext(), objectToUncontrol);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to create ControlModeRequest: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ protected URI createDecoratorModelURI(String resourceKey) {
+ return createDecoratorModelURI(modelSet.getModelResourceURI(), resourceKey);
+ }
+
+ protected URI createDecoratorModelURI(URI modelURI, String resourceKey) {
+ String fileName = (resourceKey.indexOf('.') >= 0) ? resourceKey + ".uml" : resourceKey + ".decorator.uml";
+ return modelURI.trimSegments(1).appendSegment(fileName);
+ }
+
+ protected Resource loadDecoratorModel(String resourceKey) {
+ Resource result = null;
+ ResourceSet context = getTestContextResourceSet();
+
+ if (context instanceof ModelSet) {
+ DecoratorModel model = DecoratorModel.getInstance((ModelSet) context);
+ if (model != null) {
+ result = model.loadDecoratorModel(createDecoratorModelURI(modelSet.getModelResourceURI(), resourceKey));
+ }
+ } else {
+ URI resourceURI = createDecoratorModelURI(resourceKey);
+ if (context.getURIConverter().exists(resourceURI, null)) {
+ result = context.getResource(resourceURI, true);
+ } else {
+ result = context.createResource(resourceURI, UMLPackage.eCONTENT_TYPE);
+ }
+ }
+
+ // Ensure that proxies are resolved so that, e.g., refactoring of sub-units can be reflected in this resource's cross-references
+ EcoreUtil.resolveAll(result);
+
+ return result;
+ }
+
+ protected void unloadDecoratorModel(String resourceKey) {
+ Resource resource = getTestContextResourceSet().getResource(createDecoratorModelURI(resourceKey), false);
+ assertThat(resource, notNullValue());
+ assertThat(resource.isLoaded(), is(true));
+
+ resource.unload();
+ resource.getResourceSet().getResources().remove(resource);
+ resource.eAdapters().clear();
+ }
+
+ protected void deleteDecoratorModel(String resourceKey) {
+ try {
+ modelSet.getResourceSet().getURIConverter().delete(createDecoratorModelURI(resourceKey), null);
+ modelSet.getProject().getProject().refreshLocal(IResource.DEPTH_INFINITE, null);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to delete decorator model resource: " + e.getLocalizedMessage());
+ }
+ }
+
+ protected URI externalize(Package applyingPackage, Profile appliedProfile, String resourceKey) {
+ final URI result = createDecoratorModelURI(resourceKey);
+
+ ProfileApplication application = applyingPackage.getProfileApplication(appliedProfile);
+ assertThat(application, notNullValue());
+ Command command = DecoratorModelUtils.createSeparateProfileApplicationsCommand(Collections.singleton(application), result, testName.getMethodName());
+ assertThat(command.canExecute(), is(true));
+
+ try {
+ execute(command);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to externalize profile application: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ protected void internalize(Package applyingPackage, Profile appliedProfile) {
+ ProfileApplication application = applyingPackage.getProfileApplication(appliedProfile, true);
+ assertThat(application, notNullValue());
+ Command command = DecoratorModelUtils.createReclaimProfileApplicationsCommand(Collections.singleton(application));
+ assertThat(command.canExecute(), is(true));
+
+ try {
+ execute(command);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to internalize profile application: " + e.getLocalizedMessage());
+ }
+ }
+
+ protected void execute(final Runnable write) {
+ Command command;
+
+ if (getTestContext() instanceof TransactionalEditingDomain) {
+ command = new RecordingCommand((TransactionalEditingDomain) getTestContext()) {
+
+ @Override
+ protected void doExecute() {
+ write.run();
+ }
+ };
+ } else {
+ command = new ChangeCommand(getTestContextResourceSet()) {
+ @Override
+ protected void doExecute() {
+ write.run();
+ }
+ };
+ }
+
+ execute(command);
+ }
+
+ protected <V> V execute(final Callable<V> write) {
+ final List<V> result = Lists.newArrayListWithCapacity(1);
+ Command command;
+
+ if (getTestContext() instanceof TransactionalEditingDomain) {
+ command = new RecordingCommand((TransactionalEditingDomain) getTestContext()) {
+
+ @Override
+ protected void doExecute() {
+ try {
+ result.add(write.call());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception in write operation: " + e.getLocalizedMessage());
+ }
+ }
+ };
+ } else {
+ command = new ChangeCommand(getTestContextResourceSet()) {
+ @Override
+ protected void doExecute() {
+ try {
+ result.add(write.call());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception in write operation: " + e.getLocalizedMessage());
+ }
+ }
+ };
+ }
+
+ execute(command);
+
+ return result.get(0);
+ }
+
+ protected void execute(ICommand command) {
+ try {
+ IWorkspaceCommandStack stack = (IWorkspaceCommandStack) getTestContext().getCommandStack();
+ command.addContext(stack.getDefaultUndoContext());
+ stack.getOperationHistory().execute(command, new NullProgressMonitor(), null);
+ } catch (ExecutionException e) {
+ e.printStackTrace();
+ fail("Failed to execute GMF command: " + e.getLocalizedMessage());
+ } finally {
+ // In case of executing a control command, flush its asynchronous runnables
+ syncWithControlModeExecutorService();
+ }
+ }
+
+ protected void execute(Command command) {
+ getTestContext().getCommandStack().execute(command);
+ }
+
+ protected void undo() {
+ try {
+ getTestContext().getCommandStack().undo();
+ } finally {
+ // In case of undoing a control command, flush its asynchronous runnables
+ syncWithControlModeExecutorService();
+ }
+ }
+
+ protected void redo() {
+ try {
+ getTestContext().getCommandStack().redo();
+ } finally {
+ // In case of redoing a control command, flush its asynchronous runnables
+ syncWithControlModeExecutorService();
+ }
+ }
+
+ protected void save() {
+ ResourceSet context = getTestContextResourceSet();
+
+ try {
+ if (context instanceof ModelSet) {
+ ((ModelSet) context).save(new NullProgressMonitor());
+ } else {
+ Map<String, Object> options = Maps.newHashMap();
+ options.put(XMLResource.OPTION_SAVE_ONLY_IF_CHANGED, XMLResource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+
+ for (Resource next : context.getResources()) {
+ if (next.getURI().isPlatformResource()) {
+ next.save(options);
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to save test model: " + e.getLocalizedMessage());
+ }
+ }
+
+ private EditingDomain getTestContext() {
+ return (testContext != null) ? testContext : modelSet.getEditingDomain();
+ }
+
+ private ResourceSet getTestContextResourceSet() {
+ return (testContext != null) ? testContext.getResourceSet() : modelSet.getResourceSet();
+ }
+
+ protected final void setTestContext(EditingDomain context) {
+ this.testContext = context;
+ }
+
+ protected Profile getProfileExternalizationProfile() {
+ return (Profile) getTestContextResourceSet().getEObject(DecoratorModelUtils.PROFILE_URI, true);
+ }
+
+ protected Profile getTestProfile() {
+ URI uri = modelSet.getModelResourceURI().trimSegments(1).appendSegment("profile").appendSegment("profile1.profile.uml");
+ return (Profile) UML2Util.load(getTestContextResourceSet(), uri, UMLPackage.Literals.PROFILE);
+ }
+
+ protected URI getTestProfileURI() {
+ return EcoreUtil.getURI(getTestProfile());
+ }
+
+ protected Package getModel() {
+ return (Package) getTestContextResourceSet().getEObject(modelSet.getModelURI(), true);
+ }
+
+ protected Package getPackage1() {
+ return getModel().getNestedPackage("package1");
+ }
+
+ protected Class getEntity1() {
+ return (Class) getPackage1().getOwnedType("Entity1");
+ }
+
+ protected Operation getEntity1Find() {
+ return getEntity1().getOwnedOperation("find", null, null);
+ }
+
+ protected Dependency getEntity1Import() {
+ return getEntity1().getClientDependencies().get(0);
+ }
+
+ protected Class getBusinessRules() {
+ return (Class) getPackage1().getOwnedType("BusinessRules");
+ }
+
+ protected Package getPackage1_1() {
+ return getPackage1().getNestedPackage("Package1_1");
+ }
+
+ protected Class getClass1_1() {
+ return (Class) getPackage1_1().getOwnedType("Class1_1");
+ }
+
+ protected Package getPackage2() {
+ return getModel().getNestedPackage("package2");
+ }
+
+ protected Class getBean2() {
+ return (Class) getPackage2().getOwnedType("Bean2");
+ }
+
+ protected Dependency getBean2Import() {
+ return getBean2().getClientDependencies().get(0);
+ }
+
+ protected Class getMessageProcessor() {
+ return (Class) getPackage2().getOwnedType("MessageProcessor");
+ }
+
+ protected Package getPackage2_1() {
+ return getPackage2().getNestedPackage("Package2_1");
+ }
+
+ protected Class getClass2_1() {
+ return (Class) getPackage2_1().getOwnedType("Class2_1");
+ }
+
+ protected Stereotype getBeanStereotype() {
+ return getTestProfile().getOwnedStereotype("Bean");
+ }
+
+ protected Stereotype getImportStereotype() {
+ return getTestProfile().getNestedPackage("relationships").getOwnedStereotype("Import");
+ }
+
+ protected Stereotype getFinderStereotype() {
+ return getTestProfile().getOwnedStereotype("Finder");
+ }
+
+ protected Enumeration getBeanKindEnumeration() {
+ return (Enumeration) getTestProfile().getOwnedType("BeanKind");
+ }
+
+ protected EnumerationLiteral getEntityLiteral() {
+ return getBeanKindEnumeration().getOwnedLiteral("entity");
+ }
+
+ protected EnumerationLiteral getSessionLiteral() {
+ return getBeanKindEnumeration().getOwnedLiteral("session");
+ }
+
+ protected EnumerationLiteral getMessageDrivenLiteral() {
+ return getBeanKindEnumeration().getOwnedLiteral("messagedriven");
+ }
+
+ protected Profile getEcoreProfile() {
+ return UML2Util.load(modelSet.getResourceSet(), URI.createURI(UMLResource.ECORE_PROFILE_URI), UMLPackage.Literals.PROFILE);
+ }
+
+ protected URI getEcoreProfileURI() {
+ return EcoreUtil.getURI(getEcoreProfile());
+ }
+
+ protected Stereotype getEClassStereotype() {
+ return getEcoreProfile().getOwnedStereotype("EClass");
+ }
+
+ protected Stereotype getApplyProfilesStereotype() {
+ return getProfileExternalizationProfile().getOwnedStereotype("ApplyProfiles");
+ }
+
+ protected boolean isDefinedIn(Stereotype stereotype, Profile profile) {
+ return EcoreUtil.isAncestor(profile, stereotype);
+ }
+
+ @SuppressWarnings("restriction")
+ protected Set<URI> getExternalProfiles(Package package_, String decoratorResourceKey) {
+ final URI packageURI = EcoreUtil.getURI(getPackage2_1());
+ try {
+ return org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex.getInstance().getAppliedProfiles(packageURI, createDecoratorModelURI(decoratorResourceKey));
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Failed to access decorator model index: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ protected <V> V get(Future<V> future, boolean first) {
+ try {
+ // Time out faster on subsequent accesses because the index shouldn't have churned in the mean-time
+ return future.get(1L, first ? TimeUnit.MINUTES : TimeUnit.SECONDS);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to get future result: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ protected void assertNotApplied(Package package_, Profile profile) {
+ assertThat(package_.getProfileApplication(profile, true), nullValue());
+
+ for (Iterator<Element> iter = Iterators.filter(UML2Util.getAllContents(package_, true, false), Element.class); iter.hasNext();) {
+ for (EObject application : iter.next().getStereotypeApplications()) {
+ Stereotype stereotype = UMLUtil.getStereotype(application);
+ assertThat(stereotype, notNullValue());
+ assertThat(isDefinedIn(stereotype, profile), is(false));
+ }
+ }
+ }
+
+ protected void assertInternalApplication(Package applyingPackage, Profile appliedProfile, int stereotypeCount) {
+ Resource resource = applyingPackage.eResource();
+ assertThat(resource, notNullValue());
+
+ assertApplication(applyingPackage, appliedProfile, stereotypeCount, resource);
+ }
+
+ private void assertApplication(Package applyingPackage, Profile appliedProfile, int stereotypeCount, Resource expectedResource) {
+ ProfileApplication profileApplication = applyingPackage.getProfileApplication(appliedProfile, true);
+ assertThat("Profile not applied", profileApplication, notNullValue());
+
+ assertThat(profileApplication.eResource(), is(expectedResource));
+
+ int stereotypesFound = 0;
+ for (Iterator<Element> iter = Iterators.filter(UML2Util.getAllContents(applyingPackage, true, false), Element.class); iter.hasNext();) {
+ for (EObject application : iter.next().getStereotypeApplications()) {
+ Stereotype stereotype = UMLUtil.getStereotype(application);
+ assertThat(stereotype, notNullValue());
+ if (isDefinedIn(stereotype, appliedProfile)) {
+ assertThat(application.eResource(), is(expectedResource));
+ stereotypesFound++;
+ }
+ }
+ }
+
+ assertThat("Wrong number of stereotypes found", stereotypesFound, is(stereotypeCount));
+ }
+
+ protected void assertExternalApplication(Package applyingPackage, Profile appliedProfile, String resourceKey, int stereotypeCount) {
+ URI uri = createDecoratorModelURI(applyingPackage.eResource().getURI(), resourceKey);
+ Resource resource = getTestContextResourceSet().getResource(uri, false);
+ assertThat(resource, notNullValue());
+ assertThat(resource.isLoaded(), is(true));
+
+ assertApplication(applyingPackage, appliedProfile, stereotypeCount, resource);
+ }
+
+ protected <E> Set<E> set(E... elements) {
+ return ImmutableSet.copyOf(elements);
+ }
+
+ protected Matcher<Element> isApplied(final Stereotype stereotype) {
+ return new BaseMatcher<Element>() {
+ @Override
+ public boolean matches(Object item) {
+ return ((Element) item).isStereotypeApplied(stereotype);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText(String.format("has stereotype <<%s>> applied", stereotype.getName()));
+ }
+ };
+ }
+
+ protected Matcher<Element> isApplicable(final Stereotype stereotype) {
+ return new BaseMatcher<Element>() {
+ @Override
+ public boolean matches(Object item) {
+ return ((Element) item).isStereotypeApplicable(stereotype);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText(String.format("can apply stereotype <<%s>>", stereotype.getName()));
+ }
+ };
+ }
+
+ protected Matcher<URI> exists() {
+ return new BaseMatcher<URI>() {
+ @Override
+ public boolean matches(Object item) {
+ return getTestContextResourceSet().getURIConverter().exists((URI) item, null);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("exists");
+ }
+ };
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java
new file mode 100644
index 00000000000..eed43c313b2
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AdditionalModelStructuresTest.java
@@ -0,0 +1,121 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.Collections;
+
+import org.eclipse.emf.common.util.EList;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Property;
+import org.junit.Test;
+
+/**
+ * Tests the externalization of profiles.
+ */
+@PluginResource("/resources/testmodel.di")
+public class AdditionalModelStructuresTest extends AbstractDecoratorModelControlModeTest {
+
+ public AdditionalModelStructuresTest() {
+ super();
+ }
+
+ /**
+ * Scenario: control a package in which the externalized profile application has a stereotype application
+ * with a one-to-many reference to model elements that needs refactoring.
+ */
+ @Test
+ public void nonBaseElementStereotypeCrossReferences() {
+ // Add some cross-references from a multi-value stereotype property to elements in the model.
+ execute(new Runnable() {
+
+ @Override
+ public void run() {
+ Resource decorator = loadDecoratorModel("package2");
+
+ Class bean = getClass2_1();
+ Property name = bean.createOwnedAttribute("name", null);
+ Property address = bean.createOwnedAttribute("address", null);
+
+ @SuppressWarnings("unchecked")
+ EList<EObject> keys = (EList<EObject>) bean.getValue(getBeanStereotype(), "key");
+ keys.add(name);
+ keys.add(address);
+
+ try {
+ decorator.save(null);
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail("Failed to save test decorator model: " + e.getLocalizedMessage());
+ }
+
+ unloadDecoratorModel("package2");
+ }
+ });
+
+ control(getPackage2_1(), "Package2_1");
+
+ Property name = getClass2_1().getOwnedAttribute("name", null);
+ Property address = getClass2_1().getOwnedAttribute("address", null);
+
+ loadDecoratorModel("package2");
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "key"), is((Object) Arrays.asList(name, address)));
+ }
+
+ /**
+ * Scenario: control a package that contains nested packages, which all inherit profile applications
+ * from the parent unit. Verify that only the root package of the new unit copies externalized
+ * profile applications.
+ */
+ @Test
+ public void nestedPackagesInheritingExternalProfileApplications() {
+ // Add some cross-references from a multi-value stereotype property to elements in the model.
+ execute(new Runnable() {
+
+ @Override
+ public void run() {
+ getPackage2_1().createNestedPackage("package2_1_1");
+ getPackage2_1().createNestedPackage("package2_1_2").createNestedPackage("2_1_2_1");
+ }
+ });
+
+ save();
+
+ control(getPackage2_1(), "Package2_1");
+
+ Package package2_1_1 = getPackage2_1().getNestedPackage("package2_1_1");
+ Package package2_1_2 = getPackage2_1().getNestedPackage("package2_1_2");
+ Package package2_1_2_1 = getPackage2_1().getNestedPackage("package2_1_2_1");
+
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+
+ // These inherited the externalized profile application from Package2_1
+ assertThat(getExternalProfiles(package2_1_1, "package2_1"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(package2_1_2, "package2_1"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(package2_1_2_1, "package2_1"), is(Collections.<URI> emptySet()));
+ }
+}
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AllTests.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AllTests.java
index 60160a0ead2..b3839b3b974 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/src/org/eclipse/papyrus/uml/profile/externalresource/tests/AllTests.java
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AllTests.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,9 +8,10 @@
*
* Contributors:
* Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
*
*****************************************************************************/
-package org.eclipse.papyrus.uml.profile.externalresource.tests;
+package org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
@@ -22,9 +23,8 @@ import org.junit.runners.Suite.SuiteClasses;
*/
@RunWith(Suite.class)
@SuiteClasses({
- org.eclipse.papyrus.uml.profile.externalresource.tests.standardstrategy.StandardStrategyTests.class,
- org.eclipse.papyrus.uml.profile.externalresource.tests.resourceperprofile.ResourcePerProfileTests.class,
- org.eclipse.papyrus.uml.profile.externalresource.tests.oneresourceforallprofiles.OneResourceForAllProfilesTests.class,
+ ControlModeWithDecoratorModelsTest.class, AdditionalModelStructuresTest.class
})
public class AllTests {
+ // Test suite
}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/ControlModeWithDecoratorModelsTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/ControlModeWithDecoratorModelsTest.java
new file mode 100644
index 00000000000..58f5de01aa3
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/ControlModeWithDecoratorModelsTest.java
@@ -0,0 +1,407 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.controlmode.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Collections;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.uml2.uml.Profile;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Tests the externalization of profiles.
+ */
+@PluginResource("/resources/testmodel.di")
+public class ControlModeWithDecoratorModelsTest extends AbstractDecoratorModelControlModeTest {
+
+ public ControlModeWithDecoratorModelsTest() {
+ super();
+ }
+
+ /**
+ * Scenario: control a package that has two decorator models currently unloaded.
+ */
+ @Test
+ public void control_allDecoratorsUnloaded() {
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ control(getPackage2_1(), "Package2_1");
+
+ // We had to save because of the unloaded decorator models
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ loadDecoratorModel("package2");
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+
+ unloadDecoratorModel("package2");
+ loadDecoratorModel("package2.ecore");
+
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+ }
+
+ /**
+ * Scenario: control a package that has some decorator models currently loaded and some not.
+ */
+ @Test
+ public void control_someDecoratorsLoaded() {
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2.ecore");
+ control(getPackage2_1(), "Package2_1");
+
+ // We had to save because of the unloaded decorator model
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+
+ loadDecoratorModel("package2");
+
+ unloadDecoratorModel("package2.ecore");
+ loadDecoratorModel("package2");
+
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+
+ /**
+ * Scenario: control a package that has all decorator models currently loaded.
+ */
+ @Test
+ public void control_allDecoratorsLoaded() throws CoreException {
+ deleteDecoratorModel("package2.ecore");
+
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2");
+ control(getPackage2_1(), "Package2_1");
+
+ // We did not have to save because of any unloaded decorator models
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1()), hasItem(getTestProfile()));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+
+ /**
+ * Scenario: control a package that has two decorator models currently unloaded, then undo and redo.
+ */
+ @Test
+ public void control_undo_redo_allDecoratorsUnloaded() {
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ control(getPackage2_1(), "Package2_1");
+
+ // We had to save because of the unloaded decorator models
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ undo();
+
+ // Once again, we have no direct profile applications
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ redo();
+
+ // And they're back
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ loadDecoratorModel("package2.ecore");
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+ }
+
+ /**
+ * Scenario: control a package that has some decorator models currently loaded and some not, then undo and redo.
+ */
+ @Test
+ public void control_undo_redo_someDecoratorsLoaded() {
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2.ecore");
+ control(getPackage2_1(), "Package2_1");
+
+ // We had to save because of the unloaded decorator model
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ undo();
+
+ // Once again, we have no direct profile applications
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ redo();
+
+ // And they're back
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+ }
+
+ /**
+ * Scenario: control a package that has all decorator models currently loaded, then undo and redo.
+ */
+ @Test
+ public void control_undo_redo_allDecoratorsLoaded() throws CoreException {
+ deleteDecoratorModel("package2.ecore");
+
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2");
+ control(getPackage2_1(), "Package2_1");
+
+ // We did not have to save because of any unloaded decorator models
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1()), hasItem(getTestProfile()));
+
+ undo();
+
+ // Once again, we have no direct profile application
+ assertThat(ImmutableSet.copyOf(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1())), is(Collections.<Profile> emptySet()));
+
+ redo();
+
+ // And it's back
+ assertThat(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1()), hasItem(getTestProfile()));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+
+ /**
+ * Scenario: uncontrol a package that has two decorator models currently unloaded.
+ */
+ @Test
+ public void uncontrol_allDecoratorsUnloaded() {
+ control(getPackage2_1(), "Package2_1");
+
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ uncontrol(getPackage2_1());
+
+ // The external profile applications are gone
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2");
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+
+ unloadDecoratorModel("package2");
+ loadDecoratorModel("package2.ecore");
+
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+ }
+
+ /**
+ * Scenario: uncontrol a package that has some decorator models currently loaded and some not.
+ */
+ @Test
+ public void uncontrol_someDecoratorsLoaded() {
+ loadDecoratorModel("package2.ecore");
+ control(getPackage2_1(), "Package2_1");
+
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ uncontrol(getPackage2_1());
+
+ // The external profile applications are gone
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+
+ loadDecoratorModel("package2");
+
+ unloadDecoratorModel("package2.ecore");
+ loadDecoratorModel("package2");
+
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+
+ /**
+ * Scenario: uncontrol a package that has all decorator models currently loaded.
+ */
+ @Test
+ public void uncontrol_allDecoratorsLoaded() throws CoreException {
+ deleteDecoratorModel("package2.ecore");
+ loadDecoratorModel("package2");
+ control(getPackage2_1(), "Package2_1");
+
+ // Control test (haha)
+ assertThat(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1()), hasItem(getTestProfile()));
+
+ uncontrol(getPackage2_1());
+
+ // The external profile application is gone
+ assertThat(ImmutableSet.copyOf(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1())), is(Collections.<Profile> emptySet()));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+
+ /**
+ * Scenario: uncontrol a package that has two decorator models currently unloaded, then undo and redo.
+ */
+ @Test
+ public void uncontrol_undo_redo_allDecoratorsUnloaded() {
+ control(getPackage2_1(), "Package2_1");
+ uncontrol(getPackage2_1());
+
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ undo();
+
+ // And they're back
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ redo();
+
+ // And they're gone again
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2");
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+
+ unloadDecoratorModel("package2");
+ loadDecoratorModel("package2.ecore");
+
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getEntityLiteral()));
+ assertThat(getClass2_1(), isApplied(getEClassStereotype()));
+ }
+
+ /**
+ * Scenario: uncontrol a package that has some decorator models currently loaded and some not, then undo and redo.
+ */
+ @Test
+ public void uncontrol_undo_redo_someDecoratorsLoaded() {
+ loadDecoratorModel("package2.ecore");
+ control(getPackage2_1(), "Package2_1");
+ uncontrol(getPackage2_1());
+
+ // Control test (haha)
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ undo();
+
+ // And they're back
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(set(getTestProfileURI())));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(set(getTestProfileURI(), getEcoreProfileURI())));
+
+ redo();
+
+ // And they're gone again
+ assertThat(getExternalProfiles(getPackage2_1(), "package2"), is(Collections.<URI> emptySet()));
+ assertThat(getExternalProfiles(getPackage2_1(), "package2.ecore"), is(Collections.<URI> emptySet()));
+
+ loadDecoratorModel("package2");
+
+ unloadDecoratorModel("package2.ecore");
+ loadDecoratorModel("package2");
+
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+
+ /**
+ * Scenario: uncontrol a package that has all decorator models currently loaded, then undo and redo.
+ */
+ @Test
+ public void uncontrol_undo_redo_allDecoratorsLoaded() throws CoreException {
+ deleteDecoratorModel("package2.ecore");
+ loadDecoratorModel("package2");
+ control(getPackage2_1(), "Package2_1");
+ uncontrol(getPackage2_1());
+
+ // Control test (haha)
+ assertThat(ImmutableSet.copyOf(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1())), is(Collections.<Profile> emptySet()));
+
+ undo();
+
+ // And it's back
+ assertThat(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1()), hasItem(getTestProfile()));
+
+ redo();
+
+ // And it's gone again
+ assertThat(ImmutableSet.copyOf(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2_1())), is(Collections.<Profile> emptySet()));
+
+ // these were refactored
+ assertThat(getClass2_1(), isApplied(getBeanStereotype()));
+ assertThat(getClass2_1().getValue(getBeanStereotype(), "kind"), is((Object) getSessionLiteral()));
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.classpath b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.classpath
new file mode 100644
index 00000000000..ad32c83a788
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.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/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.project b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.project
new file mode 100644
index 00000000000..9c337c4642b
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.decoratormodel.tests</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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..94d61f00da6
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..88cc30b35c0
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,33 @@
+Manifest-Version: 1.0
+Bundle-ManifestVersion: 2
+Bundle-Name: %pluginName
+Bundle-SymbolicName: org.eclipse.papyrus.uml.decoratormodel.tests;singleton:=true
+Bundle-Version: 1.1.0.qualifier
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.emf.ecore;bundle-version="2.10.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.1.0",
+ org.eclipse.core.resources;bundle-version="3.8.100",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.1.0",
+ org.eclipse.ui.ide;bundle-version="3.9.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.1.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.1.0",
+ org.eclipse.pde;bundle-version="3.8.100",
+ org.eclipse.pde.ui;bundle-version="3.8.0",
+ org.eclipse.papyrus.uml.decoratormodel;bundle-version="1.1.0",
+ org.eclipse.gmf.runtime.emf.commands.core;bundle-version="1.7.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.1.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.1.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.1.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.core.expressions;bundle-version="3.4.600",
+ org.eclipse.papyrus.uml.modelrepair
+Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-ActivationPolicy: lazy
+Export-Package: org.eclipse.papyrus.uml.decoratormodel.helper.tests,
+ org.eclipse.papyrus.uml.decoratormodel.internal.expressions.tests,
+ org.eclipse.papyrus.uml.decoratormodel.internal.resource.tests,
+ org.eclipse.papyrus.uml.decoratormodel.tests
+Bundle-Vendor: %providerName
+Bundle-Localization: plugin
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/about.html b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/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/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/build.properties b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/build.properties
index f15497ee40c..071a645751e 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/build.properties
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/build.properties
@@ -3,4 +3,6 @@ output.. = bin/
bin.includes = META-INF/,\
.,\
resources/,\
- plugin.xml
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/org.eclipse.papyrus.uml.decoratormodel.tests.launch b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/org.eclipse.papyrus.uml.decoratormodel.tests.launch
new file mode 100644
index 00000000000..6172ac73f5e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/org.eclipse.papyrus.uml.decoratormodel.tests.launch
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<booleanAttribute key="askclear" value="false"/>
+<booleanAttribute key="automaticAdd" value="true"/>
+<booleanAttribute key="automaticValidate" value="false"/>
+<stringAttribute key="bootstrap" value=""/>
+<stringAttribute key="checked" value="[NONE]"/>
+<booleanAttribute key="clearConfig" value="true"/>
+<booleanAttribute key="clearws" value="true"/>
+<booleanAttribute key="clearwslog" value="false"/>
+<listAttribute key="com.mountainminds.eclemma.core.SCOPE_IDS">
+<listEntry value="=org.eclipse.papyrus.uml.decoratormodel/src"/>
+</listAttribute>
+<stringAttribute key="configLocation" value="${workspace_loc}/.metadata/.plugins/org.eclipse.pde.core/pde-junit"/>
+<booleanAttribute key="default" value="true"/>
+<booleanAttribute key="includeOptional" value="true"/>
+<stringAttribute key="location" value="${workspace_loc}/../junit-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.uml.decoratormodel.tests.AllTests"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-os ${target.os} -ws ${target.ws} -arch ${target.arch} -nl ${target.nl} -consoleLog"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="org.eclipse.papyrus.uml.decoratormodel.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.6 -Xms128m -Xmx1200m -XX:PermSize=256M -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.platform.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="true"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/plugin.properties b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/plugin.properties
new file mode 100644
index 00000000000..eb1d5b7636b
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/plugin.properties
@@ -0,0 +1,12 @@
+# Copyright (c) 2014 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+
+pluginName = Papyrus Decorator Models Tests
+providerName = Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/pom.xml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/pom.xml
new file mode 100644
index 00000000000..a0b8b80d0d9
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <relativePath>../../../../../../releng/top-pom-main-tests.xml</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.decoratormodel.tests</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.1.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/package1.decorator.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/package1.decorator.uml
new file mode 100644
index 00000000000..56cd2fc4fa4
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/package1.decorator.uml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2 profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw">
+ <uml:Package xmi:id="_WG_4oFg9EeSTy5tPYyanVg" name="bean variant 1">
+ <packagedElement xmi:type="uml:Package" xmi:id="_WIr6sFg9EeSTy5tPYyanVg" name="testmodelpackage1">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_WIshwFg9EeSTy5tPYyanVg" supplier="_WIr6sFg9EeSTy5tPYyanVg">
+ <client xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_WHSzkFg9EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WIrToFg9EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_WItv4Fg9EeSTy5tPYyanVg" base_Dependency="_WIshwFg9EeSTy5tPYyanVg"/>
+ <profile1:Bean xmi:id="_kVTm4Fg8EeSTy5tPYyanVg" finder="_l4jiUFg8EeSTy5tPYyanVg">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Finder xmi:id="_l4jiUFg8EeSTy5tPYyanVg">
+ <base_Operation xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ </profile1:Finder>
+ <profile1:Bean xmi:id="_o52wIFg8EeSTy5tPYyanVg" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_p-z3AFnyEeSuUcVwVEa2BQ">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_sl9KUFnwEeSuUcVwVEa2BQ"/>
+ </profile1:Bean>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/profile/profile1.profile.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/profile/profile1.profile.uml
new file mode 100644
index 00000000000..a14c7a8a438
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/profile/profile1.profile.uml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_raLqoEigEeSRp-p9nf2EsA" name="profile1" metaclassReference="_33I6kEigEeSRp-p9nf2EsA _6kVgoEigEeSRp-p9nf2EsA _AX-6QEihEeSRp-p9nf2EsA" metamodelReference="_raLqoUigEeSRp-p9nf2EsA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_0O4lAEihEeSRp-p9nf2EsA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_2SDt8GEcEeSRDpkdeXfJuw" name="profile1" nsURI="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt8WEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/4.1.0/UML" references="_EI2eAF8BEeSsV7omcbT1SA"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SGxQWEcEeSRDpkdeXfJuw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxQmEcEeSRDpkdeXfJuw" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxQ2EcEeSRDpkdeXfJuw" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRGEcEeSRDpkdeXfJuw" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRWEcEeSRDpkdeXfJuw" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRmEcEeSRDpkdeXfJuw" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDt8mEcEeSRDpkdeXfJuw" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt82EcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt9GEcEeSRDpkdeXfJuw" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt9mEcEeSRDpkdeXfJuw" name="finder" ordered="false" eType="_2SDt_GEcEeSRDpkdeXfJuw"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_2SDt-GEcEeSRDpkdeXfJuw" name="kind" ordered="false" lowerBound="1" eType="_EI2eDl8BEeSsV7omcbT1SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_2SDt-mEcEeSRDpkdeXfJuw" name="isManaged" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDt_GEcEeSRDpkdeXfJuw" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt_WEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt_mEcEeSRDpkdeXfJuw" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_2SDuAGEcEeSRDpkdeXfJuw" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuAWEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuAmEcEeSRDpkdeXfJuw" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuA2EcEeSRDpkdeXfJuw" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuBGEcEeSRDpkdeXfJuw" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_2SDuBWEcEeSRDpkdeXfJuw" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuBmEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDuB2EcEeSRDpkdeXfJuw" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuCGEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDuCWEcEeSRDpkdeXfJuw" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_EI2eAF8BEeSsV7omcbT1SA" name="profile1" nsURI="http:///schemas/profile1/_EIyzoF8BEeSsV7omcbT1SA/1" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eAV8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/4.1.0/UML" references="_AJoDQEijEeSKm9FE-lgkJg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI46QV8BEeSsV7omcbT1SA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Ql8BEeSsV7omcbT1SA" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Q18BEeSsV7omcbT1SA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46RF8BEeSsV7omcbT1SA" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46RV8BEeSsV7omcbT1SA" key="Date" value="2014-10-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Rl8BEeSsV7omcbT1SA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eAl8BEeSsV7omcbT1SA" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eA18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eBF8BEeSsV7omcbT1SA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eBl8BEeSsV7omcbT1SA" name="finder" ordered="false" eType="_EI2eCl8BEeSsV7omcbT1SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_EI2eCF8BEeSsV7omcbT1SA" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eCl8BEeSsV7omcbT1SA" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eC18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eDF8BEeSsV7omcbT1SA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_EI2eDl8BEeSsV7omcbT1SA" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eD18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEF8BEeSsV7omcbT1SA" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEV8BEeSsV7omcbT1SA" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEl8BEeSsV7omcbT1SA" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_EI2eE18BEeSsV7omcbT1SA" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eFF8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eFV8BEeSsV7omcbT1SA" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eFl8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eF18BEeSsV7omcbT1SA" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_AJoDQEijEeSKm9FE-lgkJg" name="profile1" nsURI="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJrGkEijEeSKm9FE-lgkJg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkUijEeSKm9FE-lgkJg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkkijEeSKm9FE-lgkJg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGk0ijEeSKm9FE-lgkJg" key="Copyright" value="Copyright (c) 2014 CEA LIST and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; CEA LIST - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlEijEeSKm9FE-lgkJg" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlUijEeSKm9FE-lgkJg" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDQUijEeSKm9FE-lgkJg" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDQkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDQ0ijEeSKm9FE-lgkJg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDRUijEeSKm9FE-lgkJg" name="finder" ordered="false" eType="_AJoDSUijEeSKm9FE-lgkJg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AJoDR0ijEeSKm9FE-lgkJg" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDSUijEeSKm9FE-lgkJg" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDSkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDS0ijEeSKm9FE-lgkJg" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_AJoDTUijEeSKm9FE-lgkJg" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDTkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDT0ijEeSKm9FE-lgkJg" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUEijEeSKm9FE-lgkJg" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUUijEeSKm9FE-lgkJg" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_AJoDUkijEeSKm9FE-lgkJg" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDU0ijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDVEijEeSKm9FE-lgkJg" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDVUijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDVkijEeSKm9FE-lgkJg" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_33I6kEigEeSRp-p9nf2EsA" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_6kVgoEigEeSRp-p9nf2EsA" alias="Dependency">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_AX-6QEihEeSRp-p9nf2EsA" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqoUigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqokigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Be-XgEihEeSRp-p9nf2EsA" name="Bean">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Gi2hEEihEeSRp-p9nf2EsA" name="base_Class" association="_Gi3IIEihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_IwZWsEihEeSRp-p9nf2EsA" name="finder" type="_DNegsEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZWsUihEeSRp-p9nf2EsA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZWskihEeSRp-p9nf2EsA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_btMX4EihEeSRp-p9nf2EsA" name="kind" type="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_wZ9SIGEcEeSRDpkdeXfJuw" name="isManaged">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_DNegsEihEeSRp-p9nf2EsA" name="Finder">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HDxc0EihEeSRp-p9nf2EsA" name="base_Operation" association="_HDyD4EihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_Gi3IIEihEeSRp-p9nf2EsA" name="E_Bean_Class1" memberEnd="_Gi3IIUihEeSRp-p9nf2EsA _Gi2hEEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Gi3IIUihEeSRp-p9nf2EsA" name="extension_Bean" type="_Be-XgEihEeSRp-p9nf2EsA" aggregation="composite" association="_Gi3IIEihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HDyD4EihEeSRp-p9nf2EsA" name="E_Finder_Operation1" memberEnd="_HDyD4UihEeSRp-p9nf2EsA _HDxc0EihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HDyD4UihEeSRp-p9nf2EsA" name="extension_Finder" type="_DNegsEihEeSRp-p9nf2EsA" aggregation="composite" association="_HDyD4EihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_IwZ9wEihEeSRp-p9nf2EsA" name="bean_finder_1" memberEnd="_IwZ9wUihEeSRp-p9nf2EsA _IwZWsEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_IwZ9wUihEeSRp-p9nf2EsA" name="bean" type="_Be-XgEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZ9wkihEeSRp-p9nf2EsA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZ9w0ihEeSRp-p9nf2EsA" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_WA1SAEihEeSRp-p9nf2EsA" name="BeanKind">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_XMd-sEihEeSRp-p9nf2EsA" name="entity"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Yzr0IEihEeSRp-p9nf2EsA" name="session"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Zg2cIEihEeSRp-p9nf2EsA" name="messagedriven"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_oOlmcEiiEeSKm9FE-lgkJg" name="relationships">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Eo_ccEihEeSRp-p9nf2EsA" name="Import">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HjbNQEihEeSRp-p9nf2EsA" name="base_Dependency" association="_HjbNQUihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HjbNQUihEeSRp-p9nf2EsA" name="E_Import_Dependency1" memberEnd="_HjbNQkihEeSRp-p9nf2EsA _HjbNQEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HjbNQkihEeSRp-p9nf2EsA" name="extension_Import" type="_Eo_ccEihEeSRp-p9nf2EsA" aggregation="composite" association="_HjbNQUihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.di
new file mode 100644
index 00000000000..d97941f4167
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.di
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_qVmRQFnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="Package2_1.notation#_z6F0YFnyEeSuUcVwVEa2BQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.manifest
new file mode 100644
index 00000000000..9341b822d16
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.manifest
@@ -0,0 +1,4 @@
+testmodel.di
+testmodel.notation
+testmodel.uml
+package1.decorator.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.notation
new file mode 100644
index 00000000000..168e10b6392
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.notation
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwFhBEeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwVhBEeSTy5tPYyanVg" key="StereotypeList" value=",Ecore::EClass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwlhBEeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mw1hBEeSTy5tPYyanVg" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mxFhBEeSTy5tPYyanVg" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCcFg9EeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCcVg9EeSTy5tPYyanVg" key="StereotypeList" value=",Ecore::EOperation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCclg9EeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCc1g9EeSTy5tPYyanVg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCdFg9EeSTy5tPYyanVg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92XmUFg8EeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92XmUVg8EeSTy5tPYyanVg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYFg8EeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYVg8EeSTy5tPYyanVg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYlg8EeSTy5tPYyanVg" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="340" y="104"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4Eo5EeSdoezNrgfebw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4Uo5EeSdoezNrgfebw" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4ko5EeSdoezNrgfebw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT40o5EeSdoezNrgfebw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT5Eo5EeSdoezNrgfebw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.4)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.47)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW-r4EjHEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8EjHEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8UjHEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8kjHEeSy4af1pQVJyQ" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_6AEjHEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_L8BesGT8EeSGc9cekwP_1g" type="3012">
+ <element xmi:type="uml:Property" href="testmodel.uml#_L7JU8GT8EeSGc9cekwP_1g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_L8BesWT8EeSGc9cekwP_1g"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XClNoEjHEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XClNoUjHEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0sEjHEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0sUjHEeSy4af1pQVJyQ" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0skjHEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQEjGEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQUjGEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQkjGEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQ0jGEeSy4af1pQVJyQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAREjGEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+ <notation:Diagram xmi:id="_qVmRQFnwEeSuUcVwVEa2BQ" type="PapyrusUMLClassDiagram" name="package1_1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_snDWgFnwEeSuUcVwVEa2BQ" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_v5ohkFnwEeSuUcVwVEa2BQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfrm8FwuEeSgh-cRKLLZYg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAFwuEeSgh-cRKLLZYg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAVwuEeSgh-cRKLLZYg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAlwuEeSgh-cRKLLZYg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOA1wuEeSgh-cRKLLZYg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_snEkoFnwEeSuUcVwVEa2BQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snEkoVnwEeSuUcVwVEa2BQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snEkolnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snEko1nwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snEkpFnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snEkpVnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snEkplnwEeSuUcVwVEa2BQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snFLsFnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snFLsVnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snFLslnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snFLs1nwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snFLtFnwEeSuUcVwVEa2BQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snFLtVnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snFLtlnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snFLt1nwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snFLuFnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_sl9KUFnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snDWgVnwEeSuUcVwVEa2BQ" x="106" y="93"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_qVmRQVnwEeSuUcVwVEa2BQ" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_qVmRQlnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_qVmRQ1nwEeSuUcVwVEa2BQ">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_j6w70FnwEeSuUcVwVEa2BQ"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_j6w70FnwEeSuUcVwVEa2BQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_z6F0YFnyEeSuUcVwVEa2BQ" type="PapyrusUMLClassDiagram" name="package2_1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_18X1MFnyEeSuUcVwVEa2BQ" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6pcoUFnyEeSuUcVwVEa2BQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoUVnyEeSuUcVwVEa2BQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoUlnyEeSuUcVwVEa2BQ" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoU1nyEeSuUcVwVEa2BQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoVFnyEeSuUcVwVEa2BQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoVVnyEeSuUcVwVEa2BQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_18X1MlnyEeSuUcVwVEa2BQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18X1M1nyEeSuUcVwVEa2BQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18X1NFnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18X1NVnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18X1NlnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18X1N1nyEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18YcQFnyEeSuUcVwVEa2BQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18YcQVnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18YcQlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18YcQ1nyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18YcRFnyEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18YcRVnyEeSuUcVwVEa2BQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18YcRlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18YcR1nyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18YcSFnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18YcSVnyEeSuUcVwVEa2BQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_18WnEFnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18X1MVnyEeSuUcVwVEa2BQ" x="26" y="43"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_z6F0YVnyEeSuUcVwVEa2BQ" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_z6F0YlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_z6F0Y1nyEeSuUcVwVEa2BQ">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_vvBiIFnyEeSuUcVwVEa2BQ"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_vvBiIFnyEeSuUcVwVEa2BQ"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.uml
new file mode 100644
index 00000000000..6b84fe437d3
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingProfileApplication/testmodel.uml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2 profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw http:///profile1/relationships.ecore profile/profile1.profile.uml#_2SDuBWEcEeSRDpkdeXfJuw">
+ <uml:Model xmi:id="_Jqf8kEijEeSKm9FE-lgkJg" name="testmodel">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Jqf8kUijEeSKm9FE-lgkJg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_MLPToEimEeSYXMOYgqfvhA" name="package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_aipeEEimEeSYXMOYgqfvhA" name="Entity1">
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_d-B_0EimEeSYXMOYgqfvhA" name="find">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_jv5QwEimEeSYXMOYgqfvhA" name="id">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_npgmoEimEeSYXMOYgqfvhA" name="BusinessRules"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_qnlhUEimEeSYXMOYgqfvhA" client="_aipeEEimEeSYXMOYgqfvhA" supplier="_npgmoEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_j6w70FnwEeSuUcVwVEa2BQ" name="Package1_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sl9KUFnwEeSuUcVwVEa2BQ" name="Bean1_1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_xZP-UFg8EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xaiXwFg8EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_Nb6RUEimEeSYXMOYgqfvhA" name="package2">
+ <packagedElement xmi:type="uml:Class" xmi:id="_8I2YoEimEeSYXMOYgqfvhA" name="Bean2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_L7JU8GT8EeSGc9cekwP_1g" name="ref1" type="_18WnEFnyEeSuUcVwVEa2BQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_-9S2MEimEeSYXMOYgqfvhA" name="MessageProcessor"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_ANhH8EinEeSYXMOYgqfvhA" client="_8I2YoEimEeSYXMOYgqfvhA" supplier="_-9S2MEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_vvBiIFnyEeSuUcVwVEa2BQ" name="Package2_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_18WnEFnyEeSuUcVwVEa2BQ" name="Bean2_1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xlFqoGRgEeSELtX3oECTeQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlFqoWRgEeSELtX3oECTeQ" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlFqomRgEeSELtX3oECTeQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsGRgEeSELtX3oECTeQ" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsWRgEeSELtX3oECTeQ" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsmRgEeSELtX3oECTeQ" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4CRaQEilEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4CutQEilEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Model>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA" base_Dependency="_ANhH8EinEeSYXMOYgqfvhA"/>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" base_Class="_8I2YoEimEeSYXMOYgqfvhA" kind="messagedriven"/>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" base_Class="_-9S2MEimEeSYXMOYgqfvhA" kind="session"/>
+ <css:ModelStyleSheets xmi:id="_dqMxwEr_EeSCH8H2QypBWw"/>
+ <Ecore:EClass xmi:id="_yiIR8Fg8EeSTy5tPYyanVg" base_Class="_aipeEEimEeSYXMOYgqfvhA"/>
+ <Ecore:EOperation xmi:id="_zlsAsFg8EeSTy5tPYyanVg" base_Operation="_d-B_0EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/package1.decorator.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/package1.decorator.uml
new file mode 100644
index 00000000000..b4b4be44615
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/package1.decorator.uml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/XXX/0" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/XXX/0 profile/profile1.profile.uml#XXX">
+ <uml:Package xmi:id="_WG_4oFg9EeSTy5tPYyanVg" name="bean variant 1">
+ <packagedElement xmi:type="uml:Package" xmi:id="_WIr6sFg9EeSTy5tPYyanVg" name="testmodelpackage1">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_WIshwFg9EeSTy5tPYyanVg" supplier="_WIr6sFg9EeSTy5tPYyanVg">
+ <client xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_h_5OsFg8EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9BzwIGRhEeSELtX3oECTeQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwIWRhEeSELtX3oECTeQ" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwImRhEeSELtX3oECTeQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwI2RhEeSELtX3oECTeQ" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwJGRhEeSELtX3oECTeQ" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwJWRhEeSELtX3oECTeQ" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iBRHsFg8EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#XXX"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_WHSzkFg9EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WIrToFg9EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_WItv4Fg9EeSTy5tPYyanVg" base_Dependency="_WIshwFg9EeSTy5tPYyanVg"/>
+ <profile1:Bean xmi:id="_kVTm4Fg8EeSTy5tPYyanVg" finder="_l4jiUFg8EeSTy5tPYyanVg">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Finder xmi:id="_l4jiUFg8EeSTy5tPYyanVg">
+ <base_Operation xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ </profile1:Finder>
+ <profile1:Bean xmi:id="_o52wIFg8EeSTy5tPYyanVg" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_p-z3AFnyEeSuUcVwVEa2BQ">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_sl9KUFnwEeSuUcVwVEa2BQ"/>
+ </profile1:Bean>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/profile/profile1.profile.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/profile/profile1.profile.uml
new file mode 100644
index 00000000000..a14c7a8a438
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/profile/profile1.profile.uml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_raLqoEigEeSRp-p9nf2EsA" name="profile1" metaclassReference="_33I6kEigEeSRp-p9nf2EsA _6kVgoEigEeSRp-p9nf2EsA _AX-6QEihEeSRp-p9nf2EsA" metamodelReference="_raLqoUigEeSRp-p9nf2EsA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_0O4lAEihEeSRp-p9nf2EsA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_2SDt8GEcEeSRDpkdeXfJuw" name="profile1" nsURI="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt8WEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/4.1.0/UML" references="_EI2eAF8BEeSsV7omcbT1SA"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SGxQWEcEeSRDpkdeXfJuw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxQmEcEeSRDpkdeXfJuw" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxQ2EcEeSRDpkdeXfJuw" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRGEcEeSRDpkdeXfJuw" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRWEcEeSRDpkdeXfJuw" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRmEcEeSRDpkdeXfJuw" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDt8mEcEeSRDpkdeXfJuw" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt82EcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt9GEcEeSRDpkdeXfJuw" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt9mEcEeSRDpkdeXfJuw" name="finder" ordered="false" eType="_2SDt_GEcEeSRDpkdeXfJuw"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_2SDt-GEcEeSRDpkdeXfJuw" name="kind" ordered="false" lowerBound="1" eType="_EI2eDl8BEeSsV7omcbT1SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_2SDt-mEcEeSRDpkdeXfJuw" name="isManaged" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDt_GEcEeSRDpkdeXfJuw" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt_WEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt_mEcEeSRDpkdeXfJuw" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_2SDuAGEcEeSRDpkdeXfJuw" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuAWEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuAmEcEeSRDpkdeXfJuw" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuA2EcEeSRDpkdeXfJuw" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuBGEcEeSRDpkdeXfJuw" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_2SDuBWEcEeSRDpkdeXfJuw" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuBmEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDuB2EcEeSRDpkdeXfJuw" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuCGEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDuCWEcEeSRDpkdeXfJuw" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_EI2eAF8BEeSsV7omcbT1SA" name="profile1" nsURI="http:///schemas/profile1/_EIyzoF8BEeSsV7omcbT1SA/1" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eAV8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/4.1.0/UML" references="_AJoDQEijEeSKm9FE-lgkJg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI46QV8BEeSsV7omcbT1SA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Ql8BEeSsV7omcbT1SA" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Q18BEeSsV7omcbT1SA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46RF8BEeSsV7omcbT1SA" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46RV8BEeSsV7omcbT1SA" key="Date" value="2014-10-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Rl8BEeSsV7omcbT1SA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eAl8BEeSsV7omcbT1SA" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eA18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eBF8BEeSsV7omcbT1SA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eBl8BEeSsV7omcbT1SA" name="finder" ordered="false" eType="_EI2eCl8BEeSsV7omcbT1SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_EI2eCF8BEeSsV7omcbT1SA" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eCl8BEeSsV7omcbT1SA" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eC18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eDF8BEeSsV7omcbT1SA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_EI2eDl8BEeSsV7omcbT1SA" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eD18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEF8BEeSsV7omcbT1SA" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEV8BEeSsV7omcbT1SA" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEl8BEeSsV7omcbT1SA" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_EI2eE18BEeSsV7omcbT1SA" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eFF8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eFV8BEeSsV7omcbT1SA" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eFl8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eF18BEeSsV7omcbT1SA" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_AJoDQEijEeSKm9FE-lgkJg" name="profile1" nsURI="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJrGkEijEeSKm9FE-lgkJg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkUijEeSKm9FE-lgkJg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkkijEeSKm9FE-lgkJg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGk0ijEeSKm9FE-lgkJg" key="Copyright" value="Copyright (c) 2014 CEA LIST and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; CEA LIST - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlEijEeSKm9FE-lgkJg" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlUijEeSKm9FE-lgkJg" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDQUijEeSKm9FE-lgkJg" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDQkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDQ0ijEeSKm9FE-lgkJg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDRUijEeSKm9FE-lgkJg" name="finder" ordered="false" eType="_AJoDSUijEeSKm9FE-lgkJg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AJoDR0ijEeSKm9FE-lgkJg" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDSUijEeSKm9FE-lgkJg" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDSkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDS0ijEeSKm9FE-lgkJg" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_AJoDTUijEeSKm9FE-lgkJg" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDTkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDT0ijEeSKm9FE-lgkJg" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUEijEeSKm9FE-lgkJg" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUUijEeSKm9FE-lgkJg" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_AJoDUkijEeSKm9FE-lgkJg" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDU0ijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDVEijEeSKm9FE-lgkJg" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDVUijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDVkijEeSKm9FE-lgkJg" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_33I6kEigEeSRp-p9nf2EsA" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_6kVgoEigEeSRp-p9nf2EsA" alias="Dependency">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_AX-6QEihEeSRp-p9nf2EsA" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqoUigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqokigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Be-XgEihEeSRp-p9nf2EsA" name="Bean">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Gi2hEEihEeSRp-p9nf2EsA" name="base_Class" association="_Gi3IIEihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_IwZWsEihEeSRp-p9nf2EsA" name="finder" type="_DNegsEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZWsUihEeSRp-p9nf2EsA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZWskihEeSRp-p9nf2EsA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_btMX4EihEeSRp-p9nf2EsA" name="kind" type="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_wZ9SIGEcEeSRDpkdeXfJuw" name="isManaged">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_DNegsEihEeSRp-p9nf2EsA" name="Finder">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HDxc0EihEeSRp-p9nf2EsA" name="base_Operation" association="_HDyD4EihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_Gi3IIEihEeSRp-p9nf2EsA" name="E_Bean_Class1" memberEnd="_Gi3IIUihEeSRp-p9nf2EsA _Gi2hEEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Gi3IIUihEeSRp-p9nf2EsA" name="extension_Bean" type="_Be-XgEihEeSRp-p9nf2EsA" aggregation="composite" association="_Gi3IIEihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HDyD4EihEeSRp-p9nf2EsA" name="E_Finder_Operation1" memberEnd="_HDyD4UihEeSRp-p9nf2EsA _HDxc0EihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HDyD4UihEeSRp-p9nf2EsA" name="extension_Finder" type="_DNegsEihEeSRp-p9nf2EsA" aggregation="composite" association="_HDyD4EihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_IwZ9wEihEeSRp-p9nf2EsA" name="bean_finder_1" memberEnd="_IwZ9wUihEeSRp-p9nf2EsA _IwZWsEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_IwZ9wUihEeSRp-p9nf2EsA" name="bean" type="_Be-XgEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZ9wkihEeSRp-p9nf2EsA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZ9w0ihEeSRp-p9nf2EsA" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_WA1SAEihEeSRp-p9nf2EsA" name="BeanKind">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_XMd-sEihEeSRp-p9nf2EsA" name="entity"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Yzr0IEihEeSRp-p9nf2EsA" name="session"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Zg2cIEihEeSRp-p9nf2EsA" name="messagedriven"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_oOlmcEiiEeSKm9FE-lgkJg" name="relationships">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Eo_ccEihEeSRp-p9nf2EsA" name="Import">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HjbNQEihEeSRp-p9nf2EsA" name="base_Dependency" association="_HjbNQUihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HjbNQUihEeSRp-p9nf2EsA" name="E_Import_Dependency1" memberEnd="_HjbNQkihEeSRp-p9nf2EsA _HjbNQEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HjbNQkihEeSRp-p9nf2EsA" name="extension_Import" type="_Eo_ccEihEeSRp-p9nf2EsA" aggregation="composite" association="_HjbNQUihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.di
new file mode 100644
index 00000000000..d97941f4167
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.di
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_qVmRQFnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="Package2_1.notation#_z6F0YFnyEeSuUcVwVEa2BQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.manifest
new file mode 100644
index 00000000000..9341b822d16
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.manifest
@@ -0,0 +1,4 @@
+testmodel.di
+testmodel.notation
+testmodel.uml
+package1.decorator.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.notation
new file mode 100644
index 00000000000..168e10b6392
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.notation
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwFhBEeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwVhBEeSTy5tPYyanVg" key="StereotypeList" value=",Ecore::EClass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwlhBEeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mw1hBEeSTy5tPYyanVg" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mxFhBEeSTy5tPYyanVg" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCcFg9EeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCcVg9EeSTy5tPYyanVg" key="StereotypeList" value=",Ecore::EOperation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCclg9EeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCc1g9EeSTy5tPYyanVg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCdFg9EeSTy5tPYyanVg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92XmUFg8EeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92XmUVg8EeSTy5tPYyanVg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYFg8EeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYVg8EeSTy5tPYyanVg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYlg8EeSTy5tPYyanVg" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="340" y="104"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4Eo5EeSdoezNrgfebw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4Uo5EeSdoezNrgfebw" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4ko5EeSdoezNrgfebw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT40o5EeSdoezNrgfebw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT5Eo5EeSdoezNrgfebw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.4)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.47)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW-r4EjHEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8EjHEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8UjHEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8kjHEeSy4af1pQVJyQ" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_6AEjHEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_L8BesGT8EeSGc9cekwP_1g" type="3012">
+ <element xmi:type="uml:Property" href="testmodel.uml#_L7JU8GT8EeSGc9cekwP_1g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_L8BesWT8EeSGc9cekwP_1g"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XClNoEjHEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XClNoUjHEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0sEjHEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0sUjHEeSy4af1pQVJyQ" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0skjHEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQEjGEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQUjGEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQkjGEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQ0jGEeSy4af1pQVJyQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAREjGEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+ <notation:Diagram xmi:id="_qVmRQFnwEeSuUcVwVEa2BQ" type="PapyrusUMLClassDiagram" name="package1_1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_snDWgFnwEeSuUcVwVEa2BQ" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_v5ohkFnwEeSuUcVwVEa2BQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfrm8FwuEeSgh-cRKLLZYg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAFwuEeSgh-cRKLLZYg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAVwuEeSgh-cRKLLZYg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAlwuEeSgh-cRKLLZYg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOA1wuEeSgh-cRKLLZYg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_snEkoFnwEeSuUcVwVEa2BQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snEkoVnwEeSuUcVwVEa2BQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snEkolnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snEko1nwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snEkpFnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snEkpVnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snEkplnwEeSuUcVwVEa2BQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snFLsFnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snFLsVnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snFLslnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snFLs1nwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snFLtFnwEeSuUcVwVEa2BQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snFLtVnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snFLtlnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snFLt1nwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snFLuFnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_sl9KUFnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snDWgVnwEeSuUcVwVEa2BQ" x="106" y="93"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_qVmRQVnwEeSuUcVwVEa2BQ" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_qVmRQlnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_qVmRQ1nwEeSuUcVwVEa2BQ">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_j6w70FnwEeSuUcVwVEa2BQ"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_j6w70FnwEeSuUcVwVEa2BQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_z6F0YFnyEeSuUcVwVEa2BQ" type="PapyrusUMLClassDiagram" name="package2_1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_18X1MFnyEeSuUcVwVEa2BQ" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6pcoUFnyEeSuUcVwVEa2BQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoUVnyEeSuUcVwVEa2BQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoUlnyEeSuUcVwVEa2BQ" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoU1nyEeSuUcVwVEa2BQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoVFnyEeSuUcVwVEa2BQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoVVnyEeSuUcVwVEa2BQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_18X1MlnyEeSuUcVwVEa2BQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18X1M1nyEeSuUcVwVEa2BQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18X1NFnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18X1NVnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18X1NlnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18X1N1nyEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18YcQFnyEeSuUcVwVEa2BQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18YcQVnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18YcQlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18YcQ1nyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18YcRFnyEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18YcRVnyEeSuUcVwVEa2BQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18YcRlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18YcR1nyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18YcSFnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18YcSVnyEeSuUcVwVEa2BQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_18WnEFnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18X1MVnyEeSuUcVwVEa2BQ" x="26" y="43"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_z6F0YVnyEeSuUcVwVEa2BQ" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_z6F0YlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_z6F0Y1nyEeSuUcVwVEa2BQ">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_vvBiIFnyEeSuUcVwVEa2BQ"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_vvBiIFnyEeSuUcVwVEa2BQ"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.uml
new file mode 100644
index 00000000000..6b84fe437d3
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/missingSchema/testmodel.uml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2 profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw http:///profile1/relationships.ecore profile/profile1.profile.uml#_2SDuBWEcEeSRDpkdeXfJuw">
+ <uml:Model xmi:id="_Jqf8kEijEeSKm9FE-lgkJg" name="testmodel">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Jqf8kUijEeSKm9FE-lgkJg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_MLPToEimEeSYXMOYgqfvhA" name="package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_aipeEEimEeSYXMOYgqfvhA" name="Entity1">
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_d-B_0EimEeSYXMOYgqfvhA" name="find">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_jv5QwEimEeSYXMOYgqfvhA" name="id">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_npgmoEimEeSYXMOYgqfvhA" name="BusinessRules"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_qnlhUEimEeSYXMOYgqfvhA" client="_aipeEEimEeSYXMOYgqfvhA" supplier="_npgmoEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_j6w70FnwEeSuUcVwVEa2BQ" name="Package1_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sl9KUFnwEeSuUcVwVEa2BQ" name="Bean1_1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_xZP-UFg8EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xaiXwFg8EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_Nb6RUEimEeSYXMOYgqfvhA" name="package2">
+ <packagedElement xmi:type="uml:Class" xmi:id="_8I2YoEimEeSYXMOYgqfvhA" name="Bean2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_L7JU8GT8EeSGc9cekwP_1g" name="ref1" type="_18WnEFnyEeSuUcVwVEa2BQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_-9S2MEimEeSYXMOYgqfvhA" name="MessageProcessor"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_ANhH8EinEeSYXMOYgqfvhA" client="_8I2YoEimEeSYXMOYgqfvhA" supplier="_-9S2MEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_vvBiIFnyEeSuUcVwVEa2BQ" name="Package2_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_18WnEFnyEeSuUcVwVEa2BQ" name="Bean2_1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xlFqoGRgEeSELtX3oECTeQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlFqoWRgEeSELtX3oECTeQ" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlFqomRgEeSELtX3oECTeQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsGRgEeSELtX3oECTeQ" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsWRgEeSELtX3oECTeQ" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsmRgEeSELtX3oECTeQ" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4CRaQEilEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4CutQEilEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Model>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA" base_Dependency="_ANhH8EinEeSYXMOYgqfvhA"/>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" base_Class="_8I2YoEimEeSYXMOYgqfvhA" kind="messagedriven"/>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" base_Class="_-9S2MEimEeSYXMOYgqfvhA" kind="session"/>
+ <css:ModelStyleSheets xmi:id="_dqMxwEr_EeSCH8H2QypBWw"/>
+ <Ecore:EClass xmi:id="_yiIR8Fg8EeSTy5tPYyanVg" base_Class="_aipeEEimEeSYXMOYgqfvhA"/>
+ <Ecore:EOperation xmi:id="_zlsAsFg8EeSTy5tPYyanVg" base_Operation="_d-B_0EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.di
new file mode 100644
index 00000000000..71fa9dbcd7d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.di
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_JrKD4EijEeSKm9FE-lgkJg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.manifest
new file mode 100644
index 00000000000..8975fda497a
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.manifest
@@ -0,0 +1,6 @@
+package2.decorator.di
+package2.decorator.notation
+package2.decorator.uml
+testmodel.di=false
+testmodel.notation=false
+testmodel.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.notation
new file mode 100644
index 00000000000..9aadd161e3e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.notation
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_JrKD4EijEeSKm9FE-lgkJg" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_MLvC4EimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hR5u4EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_XMCuoEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4UinEeSYXMOYgqfvhA" key="tooltip_text" value="package1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u40inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMEimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMUimEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MLyGMkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLyGM0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLvC4UimEeSYXMOYgqfvhA" x="39" y="94"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Nb8GgEimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kIsV0EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_YakXQEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0UinEeSYXMOYgqfvhA" key="tooltip_text" value="package2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV00inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8GgkimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8Gg0imEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Nb8GhEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GhUimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GgUimEeSYXMOYgqfvhA" x="372" y="94"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_JrKD4UijEeSKm9FE-lgkJg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_JrKD4kijEeSKm9FE-lgkJg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_JrKD40ijEeSKm9FE-lgkJg">
+ <owner xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosEimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosUimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.finder,profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0UimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0kimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Finder"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx00imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1EimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1UimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8EimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8UimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="369" y="96"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTsUimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTskimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTs0imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtUimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.35)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.4796747967479675)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_JlbSgEinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kEinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kUinEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kkinEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5k0inEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsIb4EinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8EinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8UinEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8kinEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC80inEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB40UinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB40kinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB400inEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB41EinEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB41UinEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.uml
new file mode 100644
index 00000000000..cf41bda52a3
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.decorator.uml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg http:///profile1/relationships.ecore profile/profile1.profile.uml#_AJoDUkijEeSKm9FE-lgkJg">
+ <uml:Package xmi:id="_plgxkEisEeSYXMOYgqfvhA" name="profile_applications">
+ <packagedElement xmi:type="uml:Package" xmi:id="_plwCIEisEeSYXMOYgqfvhA" name="testmodelpackage2">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_plwpMEisEeSYXMOYgqfvhA" supplier="_plwCIEisEeSYXMOYgqfvhA">
+ <client xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwUimEeSYXMOYgqfvhA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kwkimEeSYXMOYgqfvhA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kw0imEeSYXMOYgqfvhA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxEimEeSYXMOYgqfvhA" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxUimEeSYXMOYgqfvhA" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxkimEeSYXMOYgqfvhA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_plvbEEisEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_plvbEUisEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_plx3UEisEeSYXMOYgqfvhA" base_Dependency="_plwpMEisEeSYXMOYgqfvhA"/>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA">
+ <base_Dependency xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ </profile1.relationships:Import>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" kind="messagedriven">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.ecore.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.ecore.uml
new file mode 100644
index 00000000000..e5c402f084e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/package2.ecore.uml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg http:///profile1/relationships.ecore profile/profile1.profile.uml#_AJoDUkijEeSKm9FE-lgkJg">
+ <uml:Package xmi:id="_plgxkEisEeSYXMOYgqfvhA" name="profile_applications">
+ <packagedElement xmi:type="uml:Package" xmi:id="_plwCIEisEeSYXMOYgqfvhA" name="testmodelpackage2">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_plwpMEisEeSYXMOYgqfvhA" supplier="_plwCIEisEeSYXMOYgqfvhA">
+ <client xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwUimEeSYXMOYgqfvhA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kwkimEeSYXMOYgqfvhA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kw0imEeSYXMOYgqfvhA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxEimEeSYXMOYgqfvhA" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxUimEeSYXMOYgqfvhA" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_UO2kxkimEeSYXMOYgqfvhA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_1sMngFPZEeS4xLjmPOovdQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_1tK34FPZEeS4xLjmPOovdQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_plvbEEisEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_plvbEUisEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_plx3UEisEeSYXMOYgqfvhA" base_Dependency="_plwpMEisEeSYXMOYgqfvhA"/>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA">
+ <base_Dependency xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ </profile1.relationships:Import>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" kind="messagedriven">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <Ecore:EClass xmi:id="_4VJmwFPZEeS4xLjmPOovdQ" xmlName="bean" className="MyBean">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ </Ecore:EClass>
+ <Ecore:EClass xmi:id="_cqSWUFPmEeSXr7NzpYqd8A">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ </Ecore:EClass>
+</xmi:XMI>
diff --git a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.di
index 94f0ac19f7f..f6570c8e340 100644
--- a/sandbox/ExternalResourceStereotypeApplication/org.eclipse.papyrus.uml.profile.externalresource.tests/resources/StandardResource/oneProfileApplied.di
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.di
@@ -1,15 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
- <pageList>
- <availablePage>
- <emfPageIdentifier href="oneProfileApplied.notation#_LLO-QPVCEeKaxaN6QZe_iw"/>
- </availablePage>
- </pageList>
<sashModel currentSelection="//@sashModel/@windows.0/@children.0">
<windows>
<children xsi:type="di:TabFolder">
<children>
- <emfPageIdentifier href="oneProfileApplied.notation#_LLO-QPVCEeKaxaN6QZe_iw"/>
+ <emfPageIdentifier href="profile1.profile.notation#_rdgrcEigEeSRp-p9nf2EsA"/>
</children>
</children>
</windows>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.notation
new file mode 100644
index 00000000000..133b92b8e13
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.notation
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_rdgrcEigEeSRp-p9nf2EsA" type="PapyrusUMLProfileDiagram" name="stereotypes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_33LW0EigEeSRp-p9nf2EsA" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_33PoQEigEeSRp-p9nf2EsA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoQUigEeSRp-p9nf2EsA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoQkigEeSRp-p9nf2EsA" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoQ0igEeSRp-p9nf2EsA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoREigEeSRp-p9nf2EsA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_33PoRUigEeSRp-p9nf2EsA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_33OaIEigEeSRp-p9nf2EsA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_33OaIUigEeSRp-p9nf2EsA" x="88" y="41"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_6kXV0EigEeSRp-p9nf2EsA" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6kX84EigEeSRp-p9nf2EsA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX84UigEeSRp-p9nf2EsA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX84kigEeSRp-p9nf2EsA" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX840igEeSRp-p9nf2EsA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX85EigEeSRp-p9nf2EsA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6kX85UigEeSRp-p9nf2EsA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_6kXV0kigEeSRp-p9nf2EsA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_6kXV00igEeSRp-p9nf2EsA" x="443" y="36"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_AYAIYEihEeSRp-p9nf2EsA" type="1031">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AYAvcUihEeSRp-p9nf2EsA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYAvckihEeSRp-p9nf2EsA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWgEihEeSRp-p9nf2EsA" key="StereotypeList" value="StandardProfile::Metaclass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWgUihEeSRp-p9nf2EsA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWgkihEeSRp-p9nf2EsA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AYBWg0ihEeSRp-p9nf2EsA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_AYAIYkihEeSRp-p9nf2EsA" type="1084"/>
+ <element xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_AYAvcEihEeSRp-p9nf2EsA" x="275" y="41"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_BfLy4EihEeSRp-p9nf2EsA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_BfLy4kihEeSRp-p9nf2EsA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BfLy40ihEeSRp-p9nf2EsA" type="1071">
+ <children xmi:type="notation:Node" xmi:id="_btXXAEihEeSRp-p9nf2EsA" type="3002">
+ <element xmi:type="uml:Property" href="profile1.profile.uml#_btMX4EihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_btXXAUihEeSRp-p9nf2EsA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_BfLy5EihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BfLy5UihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BfMZ8EihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BfMZ8UihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_BfMZ8kihEeSRp-p9nf2EsA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_BfMZ80ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_BfMZ9EihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_BfMZ9UihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BfMZ9kihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profile1.profile.uml#_Be-XgEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_BfLy4UihEeSRp-p9nf2EsA" x="48" y="197"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_DNfu0EihEeSRp-p9nf2EsA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_DNgV4EihEeSRp-p9nf2EsA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DNgV4UihEeSRp-p9nf2EsA" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DNgV4kihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DNgV40ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DNgV5EihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNgV5UihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_DNgV5kihEeSRp-p9nf2EsA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_DNgV50ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_DNgV6EihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_DNgV6UihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNgV6kihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profile1.profile.uml#_DNegsEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_DNfu0UihEeSRp-p9nf2EsA" x="287" y="197"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_WA6KgEihEeSRp-p9nf2EsA" type="2006">
+ <children xmi:type="notation:DecorationNode" xmi:id="_WA6xkEihEeSRp-p9nf2EsA" type="5023"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_WA6xkUihEeSRp-p9nf2EsA" type="1063">
+ <children xmi:type="notation:Node" xmi:id="_XMi3MEihEeSRp-p9nf2EsA" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="profile1.profile.uml#_XMd-sEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_XMi3MUihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_YztCQEihEeSRp-p9nf2EsA" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="profile1.profile.uml#_Yzr0IEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_YztCQUihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:Node" xmi:id="_Zg3qQEihEeSRp-p9nf2EsA" type="1037">
+ <element xmi:type="uml:EnumerationLiteral" href="profile1.profile.uml#_Zg2cIEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Zg3qQUihEeSRp-p9nf2EsA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_WA6xkkihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_WA6xk0ihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_WA6xlEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WA6xlUihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Enumeration" href="profile1.profile.uml#_WA1SAEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_WA6KgUihEeSRp-p9nf2EsA" x="73" y="339"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_oQBJ0EiiEeSKm9FE-lgkJg" type="2007">
+ <children xmi:type="notation:DecorationNode" xmi:id="_oQC_AEiiEeSKm9FE-lgkJg" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_oQC_AUiiEeSKm9FE-lgkJg" type="1005">
+ <children xmi:type="notation:Shape" xmi:id="_EpBRoEihEeSRp-p9nf2EsA" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_EpBRokihEeSRp-p9nf2EsA" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_EpBRo0ihEeSRp-p9nf2EsA" type="1071">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EpBRpEihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EpBRpUihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EpBRpkihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EpBRp0ihEeSRp-p9nf2EsA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_EpBRqEihEeSRp-p9nf2EsA" type="1019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_EpBRqUihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_EpBRqkihEeSRp-p9nf2EsA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_EpBRq0ihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EpBRrEihEeSRp-p9nf2EsA"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="profile1.profile.uml#_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_EpBRoUihEeSRp-p9nf2EsA" x="42" y="22"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_oQC_AkiiEeSKm9FE-lgkJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQC_A0iiEeSKm9FE-lgkJg"/>
+ </children>
+ <element xmi:type="uml:Package" href="profile1.profile.uml#_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_oQBJ0UiiEeSKm9FE-lgkJg" x="412" y="141" width="210" height="176"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_rdgrcUigEeSRp-p9nf2EsA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_rdgrckigEeSRp-p9nf2EsA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_rdgrc0igEeSRp-p9nf2EsA">
+ <owner xmi:type="uml:Profile" href="profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </styles>
+ <element xmi:type="uml:Profile" href="profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_Gi8AoEihEeSRp-p9nf2EsA" type="1013" source="_BfLy4EihEeSRp-p9nf2EsA" target="_33LW0EigEeSRp-p9nf2EsA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_Gi8AoUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Extension" href="profile1.profile.uml#_Gi3IIEihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Gi8AokihEeSRp-p9nf2EsA" points="[-2, -15, 14, 131]$[-14, -171, 2, -25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_GjASEEihEeSRp-p9nf2EsA" id="(0.6083916083916084,0.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JshAsUihEeSRp-p9nf2EsA" id="(0.47,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_HDzSAEihEeSRp-p9nf2EsA" type="1013" source="_DNfu0EihEeSRp-p9nf2EsA" target="_AYAIYEihEeSRp-p9nf2EsA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_HDzSAUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Extension" href="profile1.profile.uml#_HDyD4EihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HDzSAkihEeSRp-p9nf2EsA" points="[-4, -50, 8, 131]$[-12, -156, 0, 25]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6G7hAEiiEeSKm9FE-lgkJg" id="(0.43,0.02)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6G8IEEiiEeSKm9FE-lgkJg" id="(0.46,1.0)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_HjdCcEihEeSRp-p9nf2EsA" type="1013" source="_EpBRoEihEeSRp-p9nf2EsA" target="_6kXV0EigEeSRp-p9nf2EsA">
+ <styles xmi:type="notation:FontStyle" xmi:id="_HjdCcUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Extension" href="profile1.profile.uml#_HjbNQUihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_HjdCckihEeSRp-p9nf2EsA" points="[-2, -12, 1, 139]$[-53, -152, -50, -1]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_Hjgs0EihEeSRp-p9nf2EsA" id="(0.49,0.01)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_6HJjcEiiEeSKm9FE-lgkJg" id="(0.65,0.82)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_Iw5tAEihEeSRp-p9nf2EsA" type="4001" source="_BfLy4EihEeSRp-p9nf2EsA" target="_DNfu0EihEeSRp-p9nf2EsA">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw6UEEihEeSRp-p9nf2EsA" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw6UEUihEeSRp-p9nf2EsA" y="60"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw6UEkihEeSRp-p9nf2EsA" visible="false" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw6UE0ihEeSRp-p9nf2EsA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw67IEihEeSRp-p9nf2EsA" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw67IUihEeSRp-p9nf2EsA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw67IkihEeSRp-p9nf2EsA" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw67I0ihEeSRp-p9nf2EsA" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw67JEihEeSRp-p9nf2EsA" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw7iMEihEeSRp-p9nf2EsA" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Iw7iMUihEeSRp-p9nf2EsA" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Iw7iMkihEeSRp-p9nf2EsA" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_Iw5tAUihEeSRp-p9nf2EsA"/>
+ <element xmi:type="uml:Association" href="profile1.profile.uml#_IwZ9wEihEeSRp-p9nf2EsA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_Iw5tAkihEeSRp-p9nf2EsA" points="[50, -8, -144, -8]$[144, -8, -50, -8]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JsgZoEihEeSRp-p9nf2EsA" id="(1.0,0.5)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_JshAsEihEeSRp-p9nf2EsA" id="(0.0,0.5)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_x0-j0EigEeSRp-p9nf2EsA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.uml
new file mode 100644
index 00000000000..63ee8525c1d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.uml
@@ -0,0 +1,100 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_raLqoEigEeSRp-p9nf2EsA" name="profile1" metaclassReference="_33I6kEigEeSRp-p9nf2EsA _6kVgoEigEeSRp-p9nf2EsA _AX-6QEihEeSRp-p9nf2EsA" metamodelReference="_raLqoUigEeSRp-p9nf2EsA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_0O4lAEihEeSRp-p9nf2EsA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_AJoDQEijEeSKm9FE-lgkJg" name="profile1" nsURI="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJrGkEijEeSKm9FE-lgkJg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkUijEeSKm9FE-lgkJg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkkijEeSKm9FE-lgkJg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGk0ijEeSKm9FE-lgkJg" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlEijEeSKm9FE-lgkJg" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlUijEeSKm9FE-lgkJg" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDQUijEeSKm9FE-lgkJg" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDQkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDQ0ijEeSKm9FE-lgkJg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDRUijEeSKm9FE-lgkJg" name="finder" ordered="false" eType="_AJoDSUijEeSKm9FE-lgkJg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AJoDR0ijEeSKm9FE-lgkJg" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDSUijEeSKm9FE-lgkJg" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDSkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDS0ijEeSKm9FE-lgkJg" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_AJoDTUijEeSKm9FE-lgkJg" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDTkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDT0ijEeSKm9FE-lgkJg" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUEijEeSKm9FE-lgkJg" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUUijEeSKm9FE-lgkJg" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_AJoDUkijEeSKm9FE-lgkJg" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDU0ijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDVEijEeSKm9FE-lgkJg" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDVUijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDVkijEeSKm9FE-lgkJg" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_33I6kEigEeSRp-p9nf2EsA" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_6kVgoEigEeSRp-p9nf2EsA" alias="Dependency">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_AX-6QEihEeSRp-p9nf2EsA" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqoUigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqokigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Be-XgEihEeSRp-p9nf2EsA" name="Bean">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Gi2hEEihEeSRp-p9nf2EsA" name="base_Class" association="_Gi3IIEihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_IwZWsEihEeSRp-p9nf2EsA" name="finder" type="_DNegsEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZWsUihEeSRp-p9nf2EsA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZWskihEeSRp-p9nf2EsA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_btMX4EihEeSRp-p9nf2EsA" name="kind" type="_WA1SAEihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_DNegsEihEeSRp-p9nf2EsA" name="Finder">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HDxc0EihEeSRp-p9nf2EsA" name="base_Operation" association="_HDyD4EihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_Gi3IIEihEeSRp-p9nf2EsA" name="E_Bean_Class1" memberEnd="_Gi3IIUihEeSRp-p9nf2EsA _Gi2hEEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Gi3IIUihEeSRp-p9nf2EsA" name="extension_Bean" type="_Be-XgEihEeSRp-p9nf2EsA" aggregation="composite" association="_Gi3IIEihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HDyD4EihEeSRp-p9nf2EsA" name="E_Finder_Operation1" memberEnd="_HDyD4UihEeSRp-p9nf2EsA _HDxc0EihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HDyD4UihEeSRp-p9nf2EsA" name="extension_Finder" type="_DNegsEihEeSRp-p9nf2EsA" aggregation="composite" association="_HDyD4EihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_IwZ9wEihEeSRp-p9nf2EsA" name="bean_finder_1" memberEnd="_IwZ9wUihEeSRp-p9nf2EsA _IwZWsEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_IwZ9wUihEeSRp-p9nf2EsA" name="bean" type="_Be-XgEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZ9wkihEeSRp-p9nf2EsA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZ9w0ihEeSRp-p9nf2EsA" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_WA1SAEihEeSRp-p9nf2EsA" name="BeanKind">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_XMd-sEihEeSRp-p9nf2EsA" name="entity"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Yzr0IEihEeSRp-p9nf2EsA" name="session"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Zg2cIEihEeSRp-p9nf2EsA" name="messagedriven"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_oOlmcEiiEeSKm9FE-lgkJg" name="relationships">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Eo_ccEihEeSRp-p9nf2EsA" name="Import">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HjbNQEihEeSRp-p9nf2EsA" name="base_Dependency" association="_HjbNQUihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HjbNQUihEeSRp-p9nf2EsA" name="E_Import_Dependency1" memberEnd="_HjbNQkihEeSRp-p9nf2EsA _HjbNQEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HjbNQkihEeSRp-p9nf2EsA" name="extension_Import" type="_Eo_ccEihEeSRp-p9nf2EsA" aggregation="composite" association="_HjbNQUihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.di
new file mode 100644
index 00000000000..71fa9dbcd7d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.di
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_JrKD4EijEeSKm9FE-lgkJg"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.manifest
new file mode 100644
index 00000000000..e5753c23f3f
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.manifest
@@ -0,0 +1,6 @@
+testmodel.di
+testmodel.notation
+testmodel.uml
+package2.decorator.di=false
+package2.decorator.notation=false
+package2.decorator.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.notation
new file mode 100644
index 00000000000..9aadd161e3e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.notation
@@ -0,0 +1,227 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_JrKD4EijEeSKm9FE-lgkJg" type="PapyrusUMLClassDiagram" name="classes" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_MLvC4EimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_hR5u4EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_XMCuoEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4UinEeSYXMOYgqfvhA" key="tooltip_text" value="package1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u4kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_hR5u40inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMEimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_MLyGMUimEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_MLyGMkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLyGM0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_MLvC4UimEeSYXMOYgqfvhA" x="39" y="94"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Nb8GgEimEeSYXMOYgqfvhA" type="2007">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_kIsV0EinEeSYXMOYgqfvhA" source="PapyrusHyperLink_Page" references="_YakXQEimEeSYXMOYgqfvhA">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0UinEeSYXMOYgqfvhA" key="tooltip_text" value="package2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV0kinEeSYXMOYgqfvhA" key="pageName" value="PapyrusHyperLink_Page"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_kIsV00inEeSYXMOYgqfvhA" key="is_default_navigation" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8GgkimEeSYXMOYgqfvhA" type="5026"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_Nb8Gg0imEeSYXMOYgqfvhA" type="7016">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_Nb8GhEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GhUimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Nb8GgUimEeSYXMOYgqfvhA" x="372" y="94"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_JrKD4UijEeSKm9FE-lgkJg" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_JrKD4kijEeSKm9FE-lgkJg"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_JrKD40ijEeSKm9FE-lgkJg">
+ <owner xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </styles>
+ <element xmi:type="uml:Model" href="testmodel.uml#_Jqf8kEijEeSKm9FE-lgkJg"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosEimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aGosUimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.finder,profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_1aHPwkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0UimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx0kimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Finder"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx00imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1EimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_fYqx1UimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8EimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7J8UimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAUimEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_zx7xAkimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="369" y="96"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTsUimEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTskimEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTs0imEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtEimEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rjdTtUimEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.35)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.4796747967479675)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_JlbSgEinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kEinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kUinEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5kkinEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_Jlb5k0inEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsIb4EinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8EinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8UinEeSYXMOYgqfvhA" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC8kinEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_KsJC80inEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB40UinEeSYXMOYgqfvhA" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB40kinEeSYXMOYgqfvhA" key="StereotypeList" value="profile1::relationships::Import"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB400inEeSYXMOYgqfvhA" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB41EinEeSYXMOYgqfvhA" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_BZB41UinEeSYXMOYgqfvhA" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.uml
new file mode 100644
index 00000000000..55137c00e8d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/testmodel.uml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg http:///profile1/relationships.ecore profile/profile1.profile.uml#_AJoDUkijEeSKm9FE-lgkJg">
+ <uml:Model xmi:id="_Jqf8kEijEeSKm9FE-lgkJg" name="testmodel">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Jqf8kUijEeSKm9FE-lgkJg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_MLPToEimEeSYXMOYgqfvhA" name="package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_aipeEEimEeSYXMOYgqfvhA" name="Entity1">
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_d-B_0EimEeSYXMOYgqfvhA" name="find">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_jv5QwEimEeSYXMOYgqfvhA" name="id">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_npgmoEimEeSYXMOYgqfvhA" name="BusinessRules"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_qnlhUEimEeSYXMOYgqfvhA" client="_aipeEEimEeSYXMOYgqfvhA" supplier="_npgmoEimEeSYXMOYgqfvhA"/>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_RpH4oEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpdP0EimEeSYXMOYgqfvhA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP0UimEeSYXMOYgqfvhA" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP0kimEeSYXMOYgqfvhA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP00imEeSYXMOYgqfvhA" key="Copyright" value="Copyright (c) 2014 Christian W. Damus and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; Christian W. Damus - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP1EimEeSYXMOYgqfvhA" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_RpdP1UimEeSYXMOYgqfvhA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_RpcowEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_Nb6RUEimEeSYXMOYgqfvhA" name="package2">
+ <packagedElement xmi:type="uml:Class" xmi:id="_8I2YoEimEeSYXMOYgqfvhA" name="Bean2"/>
+ <packagedElement xmi:type="uml:Class" xmi:id="_-9S2MEimEeSYXMOYgqfvhA" name="MessageProcessor"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_ANhH8EinEeSYXMOYgqfvhA" client="_8I2YoEimEeSYXMOYgqfvhA" supplier="_-9S2MEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4CRaQEilEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4CutQEilEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Model>
+ <profile1:Bean xmi:id="_b2GC8EimEeSYXMOYgqfvhA" base_Class="_aipeEEimEeSYXMOYgqfvhA" finder="_fYVaoEimEeSYXMOYgqfvhA"/>
+ <profile1:Finder xmi:id="_fYVaoEimEeSYXMOYgqfvhA" base_Operation="_d-B_0EimEeSYXMOYgqfvhA"/>
+ <profile1.relationships:Import xmi:id="_rjJKoEimEeSYXMOYgqfvhA" base_Dependency="_qnlhUEimEeSYXMOYgqfvhA"/>
+ <profile1:Bean xmi:id="_t8BGgEimEeSYXMOYgqfvhA" base_Class="_npgmoEimEeSYXMOYgqfvhA" kind="session"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/package1.decorator.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/package1.decorator.uml
new file mode 100644
index 00000000000..8d4a18b8e89
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/package1.decorator.uml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_AJoDQEijEeSKm9FE-lgkJg/0" xmlns:profileext="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http:///schemas/profile1/_AJoDQEijEeSKm9FE-lgkJg/0 profile/profile1.profile.uml#_AJoDQEijEeSKm9FE-lgkJg">
+ <uml:Package xmi:id="_WG_4oFg9EeSTy5tPYyanVg" name="bean variant 1">
+ <packagedElement xmi:type="uml:Package" xmi:id="_WIr6sFg9EeSTy5tPYyanVg" name="testmodelpackage1">
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_WIshwFg9EeSTy5tPYyanVg" supplier="_WIr6sFg9EeSTy5tPYyanVg">
+ <client xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_h_5OsFg8EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_9BzwIGRhEeSELtX3oECTeQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwIWRhEeSELtX3oECTeQ" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwImRhEeSELtX3oECTeQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwI2RhEeSELtX3oECTeQ" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwJGRhEeSELtX3oECTeQ" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9BzwJWRhEeSELtX3oECTeQ" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_iBRHsFg8EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_EI2eAF8BEeSsV7omcbT1SA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_WHSzkFg9EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_WIrToFg9EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/Papyrus/2014/profile/profileExternalization#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://PAPYRUS_PROFILEEXT/ProfileExternalization.profile.uml#_Mzzc0EWjEeSNXJj2G3jVCw"/>
+ </profileApplication>
+ </uml:Package>
+ <profileext:ApplyProfiles xmi:id="_WItv4Fg9EeSTy5tPYyanVg" base_Dependency="_WIshwFg9EeSTy5tPYyanVg"/>
+ <profile1:Bean xmi:id="_kVTm4Fg8EeSTy5tPYyanVg" finder="_l4jiUFg8EeSTy5tPYyanVg">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Finder xmi:id="_l4jiUFg8EeSTy5tPYyanVg">
+ <base_Operation xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ </profile1:Finder>
+ <profile1:Bean xmi:id="_o52wIFg8EeSTy5tPYyanVg" kind="session">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ </profile1:Bean>
+ <profile1:Bean xmi:id="_p-z3AFnyEeSuUcVwVEa2BQ">
+ <base_Class xmi:type="uml:Class" href="testmodel.uml#_sl9KUFnwEeSuUcVwVEa2BQ"/>
+ </profile1:Bean>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/profile/profile1.profile.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/profile/profile1.profile.uml
new file mode 100644
index 00000000000..a14c7a8a438
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/profile/profile1.profile.uml
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xmi:id="_raLqoEigEeSRp-p9nf2EsA" name="profile1" metaclassReference="_33I6kEigEeSRp-p9nf2EsA _6kVgoEigEeSRp-p9nf2EsA _AX-6QEihEeSRp-p9nf2EsA" metamodelReference="_raLqoUigEeSRp-p9nf2EsA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_0O4lAEihEeSRp-p9nf2EsA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_2SDt8GEcEeSRDpkdeXfJuw" name="profile1" nsURI="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt8WEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/4.1.0/UML" references="_EI2eAF8BEeSsV7omcbT1SA"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SGxQWEcEeSRDpkdeXfJuw" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxQmEcEeSRDpkdeXfJuw" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxQ2EcEeSRDpkdeXfJuw" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRGEcEeSRDpkdeXfJuw" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRWEcEeSRDpkdeXfJuw" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_2SGxRmEcEeSRDpkdeXfJuw" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDt8mEcEeSRDpkdeXfJuw" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt82EcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt9GEcEeSRDpkdeXfJuw" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt9mEcEeSRDpkdeXfJuw" name="finder" ordered="false" eType="_2SDt_GEcEeSRDpkdeXfJuw"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_2SDt-GEcEeSRDpkdeXfJuw" name="kind" ordered="false" lowerBound="1" eType="_EI2eDl8BEeSsV7omcbT1SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_2SDt-mEcEeSRDpkdeXfJuw" name="isManaged" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/5.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDt_GEcEeSRDpkdeXfJuw" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDt_WEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDt_mEcEeSRDpkdeXfJuw" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_2SDuAGEcEeSRDpkdeXfJuw" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuAWEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuAmEcEeSRDpkdeXfJuw" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuA2EcEeSRDpkdeXfJuw" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_2SDuBGEcEeSRDpkdeXfJuw" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_2SDuBWEcEeSRDpkdeXfJuw" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuBmEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_2SDuB2EcEeSRDpkdeXfJuw" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_2SDuCGEcEeSRDpkdeXfJuw" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_2SDuCWEcEeSRDpkdeXfJuw" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_EI2eAF8BEeSsV7omcbT1SA" name="profile1" nsURI="http:///schemas/profile1/_EIyzoF8BEeSsV7omcbT1SA/1" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eAV8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/4.1.0/UML" references="_AJoDQEijEeSKm9FE-lgkJg"/>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI46QV8BEeSsV7omcbT1SA" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Ql8BEeSsV7omcbT1SA" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Q18BEeSsV7omcbT1SA" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46RF8BEeSsV7omcbT1SA" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46RV8BEeSsV7omcbT1SA" key="Date" value="2014-10-29"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_EI46Rl8BEeSsV7omcbT1SA" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eAl8BEeSsV7omcbT1SA" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eA18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eBF8BEeSsV7omcbT1SA" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eBl8BEeSsV7omcbT1SA" name="finder" ordered="false" eType="_EI2eCl8BEeSsV7omcbT1SA"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_EI2eCF8BEeSsV7omcbT1SA" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eCl8BEeSsV7omcbT1SA" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eC18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eDF8BEeSsV7omcbT1SA" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_EI2eDl8BEeSsV7omcbT1SA" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eD18BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEF8BEeSsV7omcbT1SA" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEV8BEeSsV7omcbT1SA" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_EI2eEl8BEeSsV7omcbT1SA" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_EI2eE18BEeSsV7omcbT1SA" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eFF8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_EI2eFV8BEeSsV7omcbT1SA" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_EI2eFl8BEeSsV7omcbT1SA" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_EI2eF18BEeSsV7omcbT1SA" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_AJoDQEijEeSKm9FE-lgkJg" name="profile1" nsURI="http:///schemas/profile1/_AJk_8EijEeSKm9FE-lgkJg/0" nsPrefix="profile1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJrGkEijEeSKm9FE-lgkJg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkUijEeSKm9FE-lgkJg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGkkijEeSKm9FE-lgkJg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGk0ijEeSKm9FE-lgkJg" key="Copyright" value="Copyright (c) 2014 CEA LIST and others.&#xA;&#xA;All rights reserved. This program and the accompanying materials&#xA;are made available under the terms of the Eclipse Public License v1.0&#xA;which accompanies this distribution, and is available at&#xA;http://www.eclipse.org/legal/epl-v10.html&#xA;&#xA;Contributors:&#xA; CEA LIST - Initial API and implementation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlEijEeSKm9FE-lgkJg" key="Date" value="2014-09-30"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_AJrGlUijEeSKm9FE-lgkJg" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDQUijEeSKm9FE-lgkJg" name="Bean">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDQkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Be-XgEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDQ0ijEeSKm9FE-lgkJg" name="base_Class" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDRUijEeSKm9FE-lgkJg" name="finder" ordered="false" eType="_AJoDSUijEeSKm9FE-lgkJg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_AJoDR0ijEeSKm9FE-lgkJg" name="kind" ordered="false" lowerBound="1" eType="_AJoDTUijEeSKm9FE-lgkJg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDSUijEeSKm9FE-lgkJg" name="Finder">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDSkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_DNegsEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDS0ijEeSKm9FE-lgkJg" name="base_Operation" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Operation"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_AJoDTUijEeSKm9FE-lgkJg" name="BeanKind">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDTkijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDT0ijEeSKm9FE-lgkJg" name="entity"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUEijEeSKm9FE-lgkJg" name="session" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_AJoDUUijEeSKm9FE-lgkJg" name="messagedriven" value="2"/>
+ </eClassifiers>
+ <eSubpackages xmi:type="ecore:EPackage" xmi:id="_AJoDUkijEeSKm9FE-lgkJg" name="relationships" nsURI="http:///profile1/relationships.ecore" nsPrefix="profile1.relationships">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDU0ijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/4.0.0/UML" references="_oOlmcEiiEeSKm9FE-lgkJg"/>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_AJoDVEijEeSKm9FE-lgkJg" name="Import">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_AJoDVUijEeSKm9FE-lgkJg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Eo_ccEihEeSRp-p9nf2EsA"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_AJoDVkijEeSKm9FE-lgkJg" name="base_Dependency" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/5.0.0/UML#//Dependency"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ </eSubpackages>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_33I6kEigEeSRp-p9nf2EsA" alias="Class">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_6kVgoEigEeSRp-p9nf2EsA" alias="Dependency">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </elementImport>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_AX-6QEihEeSRp-p9nf2EsA" alias="Operation">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqoUigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_METAMODELS/UML.metamodel.uml#_0"/>
+ </packageImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_raLqokigEeSRp-p9nf2EsA">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Be-XgEihEeSRp-p9nf2EsA" name="Bean">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Gi2hEEihEeSRp-p9nf2EsA" name="base_Class" association="_Gi3IIEihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_IwZWsEihEeSRp-p9nf2EsA" name="finder" type="_DNegsEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZWsUihEeSRp-p9nf2EsA"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZWskihEeSRp-p9nf2EsA" value="1"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_btMX4EihEeSRp-p9nf2EsA" name="kind" type="_WA1SAEihEeSRp-p9nf2EsA"/>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_wZ9SIGEcEeSRDpkdeXfJuw" name="isManaged">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_DNegsEihEeSRp-p9nf2EsA" name="Finder">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HDxc0EihEeSRp-p9nf2EsA" name="base_Operation" association="_HDyD4EihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Operation"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_Gi3IIEihEeSRp-p9nf2EsA" name="E_Bean_Class1" memberEnd="_Gi3IIUihEeSRp-p9nf2EsA _Gi2hEEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_Gi3IIUihEeSRp-p9nf2EsA" name="extension_Bean" type="_Be-XgEihEeSRp-p9nf2EsA" aggregation="composite" association="_Gi3IIEihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HDyD4EihEeSRp-p9nf2EsA" name="E_Finder_Operation1" memberEnd="_HDyD4UihEeSRp-p9nf2EsA _HDxc0EihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HDyD4UihEeSRp-p9nf2EsA" name="extension_Finder" type="_DNegsEihEeSRp-p9nf2EsA" aggregation="composite" association="_HDyD4EihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Association" xmi:id="_IwZ9wEihEeSRp-p9nf2EsA" name="bean_finder_1" memberEnd="_IwZ9wUihEeSRp-p9nf2EsA _IwZWsEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:Property" xmi:id="_IwZ9wUihEeSRp-p9nf2EsA" name="bean" type="_Be-XgEihEeSRp-p9nf2EsA" association="_IwZ9wEihEeSRp-p9nf2EsA">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_IwZ9wkihEeSRp-p9nf2EsA" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_IwZ9w0ihEeSRp-p9nf2EsA" value="1"/>
+ </ownedEnd>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_WA1SAEihEeSRp-p9nf2EsA" name="BeanKind">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_XMd-sEihEeSRp-p9nf2EsA" name="entity"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Yzr0IEihEeSRp-p9nf2EsA" name="session"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_Zg2cIEihEeSRp-p9nf2EsA" name="messagedriven"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_oOlmcEiiEeSKm9FE-lgkJg" name="relationships">
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_Eo_ccEihEeSRp-p9nf2EsA" name="Import">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_HjbNQEihEeSRp-p9nf2EsA" name="base_Dependency" association="_HjbNQUihEeSRp-p9nf2EsA">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Dependency"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_HjbNQUihEeSRp-p9nf2EsA" name="E_Import_Dependency1" memberEnd="_HjbNQkihEeSRp-p9nf2EsA _HjbNQEihEeSRp-p9nf2EsA">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_HjbNQkihEeSRp-p9nf2EsA" name="extension_Import" type="_Eo_ccEihEeSRp-p9nf2EsA" aggregation="composite" association="_HjbNQUihEeSRp-p9nf2EsA"/>
+ </packagedElement>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.di
new file mode 100644
index 00000000000..d97941f4167
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.di
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_XMCuoEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_YakXQEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="testmodel.notation#_qVmRQFnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children>
+ <emfPageIdentifier href="Package2_1.notation#_z6F0YFnyEeSuUcVwVEa2BQ"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.manifest b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.manifest
new file mode 100644
index 00000000000..9341b822d16
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.manifest
@@ -0,0 +1,4 @@
+testmodel.di
+testmodel.notation
+testmodel.uml
+package1.decorator.uml=false
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.notation
new file mode 100644
index 00000000000..168e10b6392
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.notation
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <notation:Diagram xmi:id="_XMCuoEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_ajADYEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_b2iu4EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwFhBEeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwVhBEeSTy5tPYyanVg" key="StereotypeList" value=",Ecore::EClass"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mwlhBEeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mw1hBEeSTy5tPYyanVg" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_oO9mxFhBEeSTy5tPYyanVg" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ajAqcEimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqcUimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqckimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqc0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqdEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqdUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqdkimEeSYXMOYgqfvhA" type="7018">
+ <children xmi:type="notation:Shape" xmi:id="_d-EcEEimEeSYXMOYgqfvhA" type="3013">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_fYqx0EimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCcFg9EeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCcVg9EeSTy5tPYyanVg" key="StereotypeList" value=",Ecore::EOperation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCclg9EeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCc1g9EeSTy5tPYyanVg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6iXCdFg9EeSTy5tPYyanVg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <element xmi:type="uml:Operation" href="testmodel.uml#_d-B_0EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_d-EcEUimEeSYXMOYgqfvhA"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqd0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqeEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqeUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqekimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_ajAqe0imEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_ajAqfEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_ajAqfUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_ajAqfkimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajAqf0imEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_aipeEEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_ajADYUimEeSYXMOYgqfvhA" x="52" y="105"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_npib0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_t8UogEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92XmUFg8EeSTy5tPYyanVg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92XmUVg8EeSTy5tPYyanVg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYFg8EeSTy5tPYyanVg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYVg8EeSTy5tPYyanVg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_92YNYlg8EeSTy5tPYyanVg" key="StereotypePropertyLocation" value="With brace"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_npib0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npib00imEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npib1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npib1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npib1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC4EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC4UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC4kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC40imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC5EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_npjC5UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_npjC5kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_npjC50imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_npjC6EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npjC6UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_npgmoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_npib0UimEeSYXMOYgqfvhA" x="340" y="104"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_XMCuoUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_XMCuokimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_XMCuo0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_MLPToEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_qnrA4EimEeSYXMOYgqfvhA" type="4008" source="_ajADYEimEeSYXMOYgqfvhA" target="_npib0EimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_rjdTsEimEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4Eo5EeSdoezNrgfebw" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4Uo5EeSdoezNrgfebw" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT4ko5EeSdoezNrgfebw" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT40o5EeSdoezNrgfebw" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_m5WT5Eo5EeSdoezNrgfebw" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8EimEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn8UimEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_qnrn8kimEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_qnrn80imEeSYXMOYgqfvhA" x="-1" y="12"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_qnrA4UimEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_qnlhUEimEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_qnrA4kimEeSYXMOYgqfvhA" points="[39, 0, -190, -21]$[237, -29, 8, -50]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_qoVIMEimEeSYXMOYgqfvhA" id="(1.0,0.4)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_1yYl0EimEeSYXMOYgqfvhA" id="(0.0,0.47)"/>
+ </edges>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_YakXQEimEeSYXMOYgqfvhA" type="PapyrusUMLClassDiagram" name="package2" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_8I4N0EimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_D8FrcEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW-r4EjHEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8EjHEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8UjHEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_S8kjHEeSy4af1pQVJyQ" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_WW_6AEjHEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_8I4N0kimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I4N00imEeSYXMOYgqfvhA" type="7017">
+ <children xmi:type="notation:Shape" xmi:id="_L8BesGT8EeSGc9cekwP_1g" type="3012">
+ <element xmi:type="uml:Property" href="testmodel.uml#_L7JU8GT8EeSGc9cekwP_1g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_L8BesWT8EeSGc9cekwP_1g"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I4N1EimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4N1UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4N1kimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N10imEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I404EimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I404UimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I404kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I4040imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I405EimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_8I405UimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_8I405kimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_8I4050imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_8I406EimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I406UimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_8I2YoEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_8I4N0UimEeSYXMOYgqfvhA" x="69" y="83"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_-9UEUEimEeSYXMOYgqfvhA" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_FO4JAEinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XClNoEjHEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XClNoUjHEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0sEjHEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0sUjHEeSy4af1pQVJyQ" key="PropStereoDisplay" value="profile1::Bean.kind"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_XCl0skjHEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_-9UEUkimEeSYXMOYgqfvhA" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrYEimEeSYXMOYgqfvhA" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrYUimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrYkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrY0imEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrZEimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrZUimEeSYXMOYgqfvhA" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9UrZkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrZ0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UraEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UraUimEeSYXMOYgqfvhA"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_-9UrakimEeSYXMOYgqfvhA" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_-9Ura0imEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_-9UrbEimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_-9UrbUimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UrbkimEeSYXMOYgqfvhA"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_-9S2MEimEeSYXMOYgqfvhA"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_-9UEUUimEeSYXMOYgqfvhA" x="346" y="85"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_YakXQUimEeSYXMOYgqfvhA" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_YakXQkimEeSYXMOYgqfvhA"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_YakXQ0imEeSYXMOYgqfvhA">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_Nb6RUEimEeSYXMOYgqfvhA"/>
+ <edges xmi:type="notation:Connector" xmi:id="_ANi9IEinEeSYXMOYgqfvhA" type="4008" source="_8I4N0EimEeSYXMOYgqfvhA" target="_-9UEUEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_BZB40EinEeSYXMOYgqfvhA" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQEjGEeSy4af1pQVJyQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQUjGEeSy4af1pQVJyQ" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQkjGEeSy4af1pQVJyQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAQ0jGEeSy4af1pQVJyQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_9-EAREjGEeSy4af1pQVJyQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANi9I0inEeSYXMOYgqfvhA" type="6026">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANi9JEinEeSYXMOYgqfvhA" y="40"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_ANjkMEinEeSYXMOYgqfvhA" type="6027">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ANjkMUinEeSYXMOYgqfvhA" y="18"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_ANi9IUinEeSYXMOYgqfvhA"/>
+ <element xmi:type="uml:Dependency" href="testmodel.uml#_ANhH8EinEeSYXMOYgqfvhA"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_ANi9IkinEeSYXMOYgqfvhA" points="[37, 5, -227, -31]$[314, 39, 50, 3]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_ANn1oEinEeSYXMOYgqfvhA" id="(0.85,0.38)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_CB52sEinEeSYXMOYgqfvhA" id="(0.05,0.4)"/>
+ </edges>
+ </notation:Diagram>
+ <css:ModelStyleSheets xmi:id="_6HMp8EimEeSYXMOYgqfvhA"/>
+ <notation:Diagram xmi:id="_qVmRQFnwEeSuUcVwVEa2BQ" type="PapyrusUMLClassDiagram" name="package1_1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_snDWgFnwEeSuUcVwVEa2BQ" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_v5ohkFnwEeSuUcVwVEa2BQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfrm8FwuEeSgh-cRKLLZYg" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAFwuEeSgh-cRKLLZYg" key="StereotypeList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAVwuEeSgh-cRKLLZYg" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOAlwuEeSgh-cRKLLZYg" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_rfsOA1wuEeSgh-cRKLLZYg" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_snEkoFnwEeSuUcVwVEa2BQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snEkoVnwEeSuUcVwVEa2BQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snEkolnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snEko1nwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snEkpFnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snEkpVnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snEkplnwEeSuUcVwVEa2BQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snFLsFnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snFLsVnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snFLslnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snFLs1nwEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_snFLtFnwEeSuUcVwVEa2BQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_snFLtVnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_snFLtlnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_snFLt1nwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snFLuFnwEeSuUcVwVEa2BQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_sl9KUFnwEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_snDWgVnwEeSuUcVwVEa2BQ" x="106" y="93"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_qVmRQVnwEeSuUcVwVEa2BQ" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_qVmRQlnwEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_qVmRQ1nwEeSuUcVwVEa2BQ">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_j6w70FnwEeSuUcVwVEa2BQ"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_j6w70FnwEeSuUcVwVEa2BQ"/>
+ </notation:Diagram>
+ <notation:Diagram xmi:id="_z6F0YFnyEeSuUcVwVEa2BQ" type="PapyrusUMLClassDiagram" name="package2_1" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_18X1MFnyEeSuUcVwVEa2BQ" type="2008">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_6pcoUFnyEeSuUcVwVEa2BQ" source="Stereotype_Annotation">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoUVnyEeSuUcVwVEa2BQ" key="StereotypeWithQualifiedNameList" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoUlnyEeSuUcVwVEa2BQ" key="StereotypeList" value="profile1::Bean"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoU1nyEeSuUcVwVEa2BQ" key="Stereotype_Presentation_Kind" value="HorizontalStereo"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoVFnyEeSuUcVwVEa2BQ" key="PropStereoDisplay" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_6pcoVVnyEeSuUcVwVEa2BQ" key="StereotypePropertyLocation" value="Compartment"/>
+ </eAnnotations>
+ <children xmi:type="notation:DecorationNode" xmi:id="_18X1MlnyEeSuUcVwVEa2BQ" type="5029"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18X1M1nyEeSuUcVwVEa2BQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18X1NFnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18X1NVnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18X1NlnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18X1N1nyEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18YcQFnyEeSuUcVwVEa2BQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18YcQVnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18YcQlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18YcQ1nyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18YcRFnyEeSuUcVwVEa2BQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_18YcRVnyEeSuUcVwVEa2BQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_18YcRlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_18YcR1nyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_18YcSFnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18YcSVnyEeSuUcVwVEa2BQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="testmodel.uml#_18WnEFnyEeSuUcVwVEa2BQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_18X1MVnyEeSuUcVwVEa2BQ" x="26" y="43"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_z6F0YVnyEeSuUcVwVEa2BQ" name="diagram_compatibility_version" stringValue="1.0.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_z6F0YlnyEeSuUcVwVEa2BQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_z6F0Y1nyEeSuUcVwVEa2BQ">
+ <owner xmi:type="uml:Package" href="testmodel.uml#_vvBiIFnyEeSuUcVwVEa2BQ"/>
+ </styles>
+ <element xmi:type="uml:Package" href="testmodel.uml#_vvBiIFnyEeSuUcVwVEa2BQ"/>
+ </notation:Diagram>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.uml b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.uml
new file mode 100644
index 00000000000..6b84fe437d3
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/wrongProfileVersion/testmodel.uml
@@ -0,0 +1,63 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:Ecore="http://www.eclipse.org/uml2/schemas/Ecore/5" xmlns:css="http://www.eclipse.org/papyrus/infra/gmfdiag/css" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:profile1="http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2" xmlns:profile1.relationships="http:///profile1/relationships.ecore" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/uml2/schemas/Ecore/5 pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA http:///schemas/profile1/_2R_cgGEcEeSRDpkdeXfJuw/2 profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw http:///profile1/relationships.ecore profile/profile1.profile.uml#_2SDuBWEcEeSRDpkdeXfJuw">
+ <uml:Model xmi:id="_Jqf8kEijEeSKm9FE-lgkJg" name="testmodel">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_Jqf8kUijEeSKm9FE-lgkJg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Package" xmi:id="_MLPToEimEeSYXMOYgqfvhA" name="package1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_aipeEEimEeSYXMOYgqfvhA" name="Entity1">
+ <ownedOperation xmi:type="uml:Operation" xmi:id="_d-B_0EimEeSYXMOYgqfvhA" name="find">
+ <ownedParameter xmi:type="uml:Parameter" xmi:id="_jv5QwEimEeSYXMOYgqfvhA" name="id">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ </ownedParameter>
+ </ownedOperation>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_npgmoEimEeSYXMOYgqfvhA" name="BusinessRules"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_qnlhUEimEeSYXMOYgqfvhA" client="_aipeEEimEeSYXMOYgqfvhA" supplier="_npgmoEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_j6w70FnwEeSuUcVwVEa2BQ" name="Package1_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_sl9KUFnwEeSuUcVwVEa2BQ" name="Bean1_1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_xZP-UFg8EeSTy5tPYyanVg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xaiXwFg8EeSTy5tPYyanVg" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="pathmap://UML_PROFILES/Ecore.profile.uml#_z1OFcHjqEdy8S4Cr8Rc_NA"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Ecore.profile.uml#_0"/>
+ </profileApplication>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Package" xmi:id="_Nb6RUEimEeSYXMOYgqfvhA" name="package2">
+ <packagedElement xmi:type="uml:Class" xmi:id="_8I2YoEimEeSYXMOYgqfvhA" name="Bean2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_L7JU8GT8EeSGc9cekwP_1g" name="ref1" type="_18WnEFnyEeSuUcVwVEa2BQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_-9S2MEimEeSYXMOYgqfvhA" name="MessageProcessor"/>
+ <packagedElement xmi:type="uml:Dependency" xmi:id="_ANhH8EinEeSYXMOYgqfvhA" client="_8I2YoEimEeSYXMOYgqfvhA" supplier="_-9S2MEimEeSYXMOYgqfvhA"/>
+ <packagedElement xmi:type="uml:Package" xmi:id="_vvBiIFnyEeSuUcVwVEa2BQ" name="Package2_1">
+ <packagedElement xmi:type="uml:Class" xmi:id="_18WnEFnyEeSuUcVwVEa2BQ" name="Bean2_1"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_UOhNkEimEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_xlFqoGRgEeSELtX3oECTeQ" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlFqoWRgEeSELtX3oECTeQ" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlFqomRgEeSELtX3oECTeQ" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsGRgEeSELtX3oECTeQ" key="Copyright" value="Copyright © 2014 Christian W. Damus. All rights reserved."/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsWRgEeSELtX3oECTeQ" key="Date" value="2014-10-31"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_xlGRsmRgEeSELtX3oECTeQ" key="Author" value="Christian W. Damus"/>
+ </eAnnotations>
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_UO2kwEimEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="profile/profile1.profile.uml#_2SDt8GEcEeSRDpkdeXfJuw"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="profile/profile1.profile.uml#_raLqoEigEeSRp-p9nf2EsA"/>
+ </profileApplication>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_4CRaQEilEeSYXMOYgqfvhA">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4CutQEilEeSYXMOYgqfvhA" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Model>
+ <profile1.relationships:Import xmi:id="_BYpeUEinEeSYXMOYgqfvhA" base_Dependency="_ANhH8EinEeSYXMOYgqfvhA"/>
+ <profile1:Bean xmi:id="_D7ufEEinEeSYXMOYgqfvhA" base_Class="_8I2YoEimEeSYXMOYgqfvhA" kind="messagedriven"/>
+ <profile1:Bean xmi:id="_FOiKwEinEeSYXMOYgqfvhA" base_Class="_-9S2MEimEeSYXMOYgqfvhA" kind="session"/>
+ <css:ModelStyleSheets xmi:id="_dqMxwEr_EeSCH8H2QypBWw"/>
+ <Ecore:EClass xmi:id="_yiIR8Fg8EeSTy5tPYyanVg" base_Class="_aipeEEimEeSYXMOYgqfvhA"/>
+ <Ecore:EOperation xmi:id="_zlsAsFg8EeSTy5tPYyanVg" base_Operation="_d-B_0EimEeSYXMOYgqfvhA"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/DecoratorModelUtilsTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/DecoratorModelUtilsTest.java
new file mode 100644
index 00000000000..589b96d0f06
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/DecoratorModelUtilsTest.java
@@ -0,0 +1,348 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.helper.tests;
+
+import static org.eclipse.papyrus.junit.matchers.MoreMatchers.isEmpty;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.junit.Assert.assertThat;
+
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.helper.IDeleteEmptyDecoratorModelsPolicy;
+import org.eclipse.papyrus.uml.decoratormodel.profileExternalization.ProfileExternalizationPackage;
+import org.eclipse.papyrus.uml.decoratormodel.tests.AbstractProfileExternalizationTest;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableList;
+import com.google.common.collect.ImmutableSet;
+
+/**
+ * Additional tests for the {@link DecoratorModelUtils} class not covered by the main test suites.
+ */
+@PluginResource("/resources/testmodel.di")
+public class DecoratorModelUtilsTest extends AbstractProfileExternalizationTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ private ResourceSet fixture;
+
+ private Resource modelResource;
+
+ /**
+ * Test externalizing a profile application in a normal resource set.
+ */
+ @Test
+ public void testExternalizeProfileApplication() {
+ final ProfileApplication application = getPackage1().getProfileApplication(getTestProfile());
+
+ execute(new Callable<Resource>() {
+ @Override
+ public Resource call() throws Exception {
+ Resource result = fixture.createResource(createDecoratorModelURI("package1"), UMLPackage.eCONTENT_TYPE);
+ Package root = UMLFactory.eINSTANCE.createPackage();
+ root.setName("test");
+ root.applyProfile(getProfileExternalizationProfile());
+ result.getContents().add(root);
+
+ DecoratorModelUtils.externalizeProfileApplication(application, result);
+ return result;
+ }
+ });
+
+ assertExternalApplication(getPackage1(), getTestProfile(), "package1", 4);
+ }
+
+ @Test
+ public void testInternalizeProfileApplications() {
+ loadDecoratorModel("package2");
+
+ execute(new Runnable() {
+
+ @Override
+ public void run() {
+ DecoratorModelUtils.internalizeProfileApplications(Collections.singleton(getPackage2().getProfileApplication(getTestProfile(), true)), alwaysDelete());
+ }
+ });
+
+ assertInternalApplication(getPackage2(), getTestProfile(), 3);
+ }
+
+ @Test
+ public void testGetExternalizationProfile() {
+ Profile profile = DecoratorModelUtils.getExternalizationProfile(fixture);
+ assertThat(profile, notNullValue());
+ assertThat(profile.eIsProxy(), is(false));
+ assertThat(profile.getURI(), is(ProfileExternalizationPackage.eNS_URI));
+ }
+
+ @Test
+ public void testGetDecoratorPackages() {
+ // Initial condition
+ assertThat(DecoratorModelUtils.getDecoratorPackages(getPackage2()), isEmpty());
+
+ loadDecoratorModel("package2");
+
+ List<Package> packages = ImmutableList.copyOf(DecoratorModelUtils.getDecoratorPackages(getPackage2()));
+ assertThat(packages.size(), is(1));
+ assertThat(packages.get(0).isProfileApplied(getTestProfile()), is(true));
+ }
+
+ @Test
+ public void testGetDecoratorModelProfileApplications() {
+ // Initial condition
+ assertThat(DecoratorModelUtils.getDecoratorModelProfileApplications(getPackage2()), isEmpty());
+
+ loadDecoratorModel("package2");
+
+ List<ProfileApplication> applications = ImmutableList.copyOf(DecoratorModelUtils.getDecoratorModelProfileApplications(getPackage2()));
+ assertThat(applications.size(), is(1));
+ assertThat(applications.get(0).getAppliedProfile(), is(getTestProfile()));
+ }
+
+ @Test
+ public void testGetDecoratorProfileApplications() {
+ Resource decoratorModel = loadDecoratorModel("package2");
+
+ Map<Package, Profile> applications = DecoratorModelUtils.getDecoratorProfileApplications(decoratorModel);
+ assertThat(applications.size(), is(1));
+ assertThat(applications.get(getPackage2()), is(getTestProfile()));
+ }
+
+ @Test
+ public void testGetDecoratorModelAppliedProfiles() {
+ // Initial condition
+ assertThat(DecoratorModelUtils.getDecoratorModelProfileApplications(getPackage2()), isEmpty());
+
+ loadDecoratorModel("package2");
+
+ List<Profile> applied = ImmutableList.copyOf(DecoratorModelUtils.getDecoratorModelAppliedProfiles(getPackage2()));
+ assertThat(applied.size(), is(1));
+ assertThat(applied.get(0), is(getTestProfile()));
+ }
+
+ @Test
+ public void testHasExternalizationProfile() {
+ Resource decoratorModel = loadDecoratorModel("package2");
+
+ assertThat(DecoratorModelUtils.hasExternalizationProfile(getTestProfile()), is(false));
+ assertThat(DecoratorModelUtils.hasExternalizationProfile((Package) decoratorModel.getContents().get(0)), is(true));
+ }
+
+ /**
+ * Test method for {@link org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils#isDecoratorModel(org.eclipse.emf.ecore.resource.Resource)}.
+ */
+ @Test
+ public void testIsDecoratorModelResource() {
+ Resource decoratorModel = loadDecoratorModel("package2");
+
+ assertThat(DecoratorModelUtils.isDecoratorModel(modelResource), is(false));
+ assertThat(DecoratorModelUtils.isDecoratorModel(decoratorModel), is(true));
+ }
+
+ @Test
+ public void testIsDecoratorModelFor() {
+ Resource decoratorModel = loadDecoratorModel("package2");
+
+ assertThat(DecoratorModelUtils.isDecoratorModelFor(decoratorModel, getTestProfile().eResource()), is(false));
+ assertThat(DecoratorModelUtils.isDecoratorModelFor(decoratorModel, modelResource), is(true));
+ }
+
+ @Test
+ public void testGetUserModelResources() {
+ Resource decoratorModel = loadDecoratorModel("package2");
+
+ List<URI> uris = ImmutableList.copyOf(DecoratorModelUtils.getUserModelResources(decoratorModel));
+ assertThat(uris.size(), is(1));
+ assertThat(uris.get(0), is(modelResource.getURI()));
+ }
+
+ @Test
+ public void testIsDecoratorModelURI() throws Exception {
+ URI decorator = createDecoratorModelURI("package2");
+ assertThat(DecoratorModelUtils.isDecoratorModel(decorator), is(true));
+
+ final Resource decoratorModel = loadDecoratorModel("package2");
+
+ // Doesn't matter that it's loaded and cleared out
+ execute(new Runnable() {
+
+ @Override
+ public void run() {
+ decoratorModel.getContents().clear();
+ }
+ });
+ assertThat(DecoratorModelUtils.isDecoratorModel(decoratorModel.getURI()), is(true));
+
+ // But it does if we then save it
+ decoratorModel.save(null);
+ assertThat(DecoratorModelUtils.isDecoratorModel(decorator), is(false));
+ }
+
+ @Test
+ public void testGetLoadedDecoratorModels() {
+ assertThat(DecoratorModelUtils.getLoadedDecoratorModels(modelResource), isEmpty());
+
+ Resource decoratorModel = loadDecoratorModel("package2");
+
+ assertThat(DecoratorModelUtils.getLoadedDecoratorModels(modelResource), is(Collections.singleton(decoratorModel.getURI())));
+ }
+
+ @Test
+ public void testGetUnloadedDecoratorModels() {
+ URI uri = createDecoratorModelURI("package2");
+
+ assertThat(DecoratorModelUtils.getUnloadedDecoratorModels(modelResource), is(Collections.singleton(uri)));
+
+ loadDecoratorModel("package2");
+
+ assertThat(DecoratorModelUtils.getUnloadedDecoratorModels(modelResource), isEmpty());
+ }
+
+ @Test
+ public void testGetUnloadedDecoratorModelsAsyncResource() {
+ URI uri = createDecoratorModelURI("package2");
+
+ Future<Set<URI>> unloaded = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(modelResource);
+ assertThat(get(unloaded, true), is(Collections.singleton(uri)));
+
+ loadDecoratorModel("package2");
+
+ // This answer should be available pretty much immediately because there are no further workspace resource changes
+ unloaded = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(modelResource);
+ assertThat(get(unloaded, false), isEmpty());
+ }
+
+ @Test
+ public void testGetUnloadedDecoratorModelsAsyncIterableOfResource() {
+ URI decorator1 = externalize(getPackage1(), getTestProfile(), "package1");
+ URI decorator2 = createDecoratorModelURI("package2");
+
+ loadDecoratorModel("package2").setModified(true); // For refactoring of units
+ List<Resource> resources = ImmutableList.of(control(getPackage1()), control(getPackage2()));
+ save();
+ unloadDecoratorModel("package2");
+
+ Future<Set<URI>> unloaded = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(resources);
+ assertThat(get(unloaded, true), is(set(decorator2)));
+
+ unloadDecoratorModel("package1");
+
+ unloaded = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(resources);
+ assertThat(get(unloaded, false), is(set(decorator1, decorator2)));
+ }
+
+ @Test
+ public void testGetUnloadedDecoratorModelsAsyncPackage() {
+ URI uri = createDecoratorModelURI("package2");
+
+ Future<Set<URI>> unloaded = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(getPackage2());
+ assertThat(get(unloaded, true), is(set(uri)));
+
+ loadDecoratorModel("package2");
+
+ unloaded = DecoratorModelUtils.getUnloadedDecoratorModelsAsync(getPackage2());
+ assertThat(get(unloaded, false), isEmpty());
+ }
+
+ @Test
+ public void testHasUnloadedDecoratorModelsAsync() {
+ Future<Boolean> hasUnloaded = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(getModel(), false);
+ assertThat(get(hasUnloaded, true), is(Boolean.TRUE));
+
+ loadDecoratorModel("package2");
+
+ hasUnloaded = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(getModel(), false);
+ assertThat(get(hasUnloaded, false), is(Boolean.FALSE));
+ }
+
+ @Test
+ public void testHasUnloadedDecoratorModelsAsync_recursive() {
+ loadDecoratorModel("package2").setModified(true); // Load it for unit refactoring
+ control(getPackage2());
+ save();
+ unloadDecoratorModel("package2");
+
+ Future<Boolean> hasUnloaded = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(getModel(), false);
+ assertThat(get(hasUnloaded, true), is(Boolean.FALSE));
+
+ hasUnloaded = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(getModel(), true);
+ assertThat(get(hasUnloaded, false), is(Boolean.TRUE));
+
+ loadDecoratorModel("package2");
+
+ hasUnloaded = DecoratorModelUtils.hasUnloadedDecoratorModelsAsync(getModel(), true);
+ assertThat(get(hasUnloaded, false), is(Boolean.FALSE));
+ }
+
+ @Test
+ public void testGetLoadedSubUnitPackages() {
+ Set<Package> subUnits = ImmutableSet.copyOf(DecoratorModelUtils.getLoadedSubUnitPackages(getModel()));
+ assertThat(subUnits, isEmpty());
+
+ Resource package2 = control(getPackage2());
+ subUnits = ImmutableSet.copyOf(DecoratorModelUtils.getLoadedSubUnitPackages(getModel()));
+ assertThat(subUnits, is(set(getPackage2())));
+
+ package2.unload();
+ subUnits = ImmutableSet.copyOf(DecoratorModelUtils.getLoadedSubUnitPackages(getModel()));
+ assertThat(subUnits, isEmpty());
+
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createFixture() {
+ EditingDomain context = houseKeeper.createSimpleEditingDomain();
+ fixture = context.getResourceSet();
+ DecoratorModelUtils.configure(fixture);
+ setTestContext(context);
+
+ modelResource = getModel().eResource();
+ }
+
+ IDeleteEmptyDecoratorModelsPolicy alwaysDelete() {
+ return new IDeleteEmptyDecoratorModelsPolicy() {
+
+ @Override
+ public boolean shouldDeleteDecoratorModels(Collection<? extends Resource> decoratorModels) {
+ return true;
+ }
+ };
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/PapyrusStereotypeApplicationHelperTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/PapyrusStereotypeApplicationHelperTest.java
new file mode 100644
index 00000000000..fcd9771a60f
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/helper/tests/PapyrusStereotypeApplicationHelperTest.java
@@ -0,0 +1,153 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.helper.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.Iterator;
+import java.util.List;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.resource.impl.ResourceSetImpl;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.uml.decoratormodel.helper.PapyrusStereotypeApplicationHelper;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLFactory;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Test;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * Tests that the {@link PapyrusStereotypeApplicationHelper} class supports standard UML usage
+ * (other tests more than sufficiently cover decorator model usage).
+ */
+public class PapyrusStereotypeApplicationHelperTest extends AbstractPapyrusTest {
+ private final PapyrusStereotypeApplicationHelper fixture = new PapyrusStereotypeApplicationHelper();
+
+ @Test
+ public void applyStereotype_resourceSet() {
+ ResourceSet rset = new ResourceSetImpl();
+
+ try {
+ Resource uml = rset.createResource(URI.createURI("bogus://test"), UMLPackage.eCONTENT_TYPE);
+ Package package_ = UMLFactory.eINSTANCE.createPackage();
+ uml.getContents().add(package_);
+
+ Profile profile = createProfile(rset);
+ package_.applyProfile(profile);
+
+ EClass stereotype = (EClass) package_.getProfileApplications().get(0).getAppliedDefinition(profile.getOwnedStereotype("Stereo"));
+ Class foo = package_.createOwnedClass("Foo", false);
+ EObject stereotypeApplication = fixture.applyStereotype(foo, stereotype);
+
+ assertThat(UMLUtil.getBaseElement(stereotypeApplication), is((Element) foo));
+ assertThat(uml.getContents(), hasItem(stereotypeApplication));
+ } finally {
+ EMFHelper.unload(rset);
+ }
+ }
+
+ @Test
+ public void applyStereotype_freeFloating() {
+ ResourceSet rset = new ResourceSetImpl();
+
+ final List<EObject> unload = Lists.newArrayList();
+
+ try {
+ Package package_ = UMLFactory.eINSTANCE.createPackage();
+ unload.add(package_);
+
+ Profile profile = createProfile(rset);
+ package_.applyProfile(profile);
+
+ EClass stereotype = (EClass) package_.getProfileApplications().get(0).getAppliedDefinition(profile.getOwnedStereotype("Stereo"));
+ Class foo = package_.createOwnedClass("Foo", false);
+ EObject stereotypeApplication = fixture.applyStereotype(foo, stereotype);
+ unload.add(stereotypeApplication);
+
+ assertThat(UMLUtil.getBaseElement(stereotypeApplication), is((Element) foo));
+ assertThat(stereotypeApplication.eResource(), nullValue());
+ } finally {
+ EMFHelper.unload(rset);
+ for (Iterator<EObject> iter = EcoreUtil.getAllContents(unload); iter.hasNext();) {
+ iter.next().eAdapters().clear();
+ }
+ }
+ }
+
+ @Test
+ public void stereotypeApplication_inNestedPackage() {
+ ResourceSet rset = new ResourceSetImpl();
+
+ try {
+ Resource uml = rset.createResource(URI.createURI("bogus://test"), UMLPackage.eCONTENT_TYPE);
+ Package package_ = UMLFactory.eINSTANCE.createPackage();
+ uml.getContents().add(package_);
+
+ Profile profile = createProfile(rset);
+ package_.applyProfile(profile);
+
+ EClass stereotype = (EClass) package_.getProfileApplications().get(0).getAppliedDefinition(profile.getOwnedStereotype("Stereo"));
+
+ Package nested = package_.createNestedPackage("nested");
+ Class foo = nested.createOwnedClass("Foo", false);
+ EObject stereotypeApplication = fixture.applyStereotype(foo, stereotype);
+
+ assertThat(UMLUtil.getBaseElement(stereotypeApplication), is((Element) foo));
+ assertThat(uml.getContents(), hasItem(stereotypeApplication));
+ } finally {
+ EMFHelper.unload(rset);
+ }
+ }
+
+ //
+ // Test framework
+ //
+
+ Profile createProfile(ResourceSet rset) {
+ Resource resource = rset.createResource(URI.createURI("bogus://test/profile"), UMLPackage.eCONTENT_TYPE);
+
+ Profile result = UMLFactory.eINSTANCE.createProfile();
+ resource.getContents().add(result);
+ result.setName("profile");
+ result.setURI(resource.getURI().toString());
+ Stereotype stereo = result.createOwnedStereotype("Stereo", false);
+
+ rset.getResource(URI.createURI(UMLResource.UML_METAMODEL_URI), true);
+ Class metaclass = Iterables.getFirst(Iterables.filter(UMLUtil.findNamedElements(rset, "UML::Class"), Class.class), null);
+ result.createMetaclassReference(metaclass);
+ stereo.createExtension(metaclass, false);
+
+ result.define();
+
+ return result;
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/tests/FilePropertyTesterTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/tests/FilePropertyTesterTest.java
new file mode 100644
index 00000000000..43581e072f2
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/expressions/tests/FilePropertyTesterTest.java
@@ -0,0 +1,80 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.expressions.tests;
+
+import static org.eclipse.papyrus.uml.decoratormodel.internal.expressions.FilePropertyTester.PROPERTY_IS_DECORATOR_MODEL;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.decoratormodel.internal.expressions.FilePropertyTester;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+/**
+ * Test suite for the {@link FilePropertyTester} class.
+ */
+@SuppressWarnings("restriction")
+@PluginResource("/resources/testmodel.di")
+public class FilePropertyTesterTest extends AbstractPapyrusTest {
+
+ private static final Object[] ZERO_ARGS = {};
+
+ @Rule
+ public final ModelSetFixture modelSet = new ModelSetFixture();
+
+ private IFile uml;
+ private IFile decoratorUML;
+ private IFile decoratorNotation;
+
+ private final FilePropertyTester fixture = new FilePropertyTester();
+
+ public FilePropertyTesterTest() {
+ super();
+ }
+
+ @Test
+ public void isDecoratorModel_userModelUML() {
+ assertThat(fixture.test(uml, PROPERTY_IS_DECORATOR_MODEL, ZERO_ARGS, false), is(true));
+ }
+
+ @Test
+ public void isDecoratorModel_decoratorModelUML() {
+ assertThat(fixture.test(decoratorUML, PROPERTY_IS_DECORATOR_MODEL, ZERO_ARGS, null), is(true));
+ }
+
+ @Test
+ public void isDecoratorModel_decoratorModelNotation() {
+ assertThat(fixture.test(decoratorNotation, PROPERTY_IS_DECORATOR_MODEL, ZERO_ARGS, false), is(true));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createFixture() {
+ uml = modelSet.getProject().getFile(modelSet.getModelResourceURI());
+
+ URI decoratorURI = modelSet.getModelResourceURI().trimSegments(1).appendSegment("package2.decorator.uml");
+ decoratorUML = modelSet.getProject().getFile(decoratorURI);
+ decoratorNotation = modelSet.getProject().getFile(decoratorURI.trimFileExtension().appendFileExtension(NotationModel.NOTATION_FILE_EXTENSION));
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelCopierTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelCopierTest.java
new file mode 100644
index 00000000000..0a3308f40f1
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelCopierTest.java
@@ -0,0 +1,141 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.io.IOException;
+import java.io.OutputStream;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelCopier;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.tests.AbstractProfileExternalizationTest;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.resource.UMLResource;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.Before;
+import org.junit.Test;
+import org.osgi.framework.FrameworkUtil;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterables;
+import com.google.common.io.Resources;
+
+/**
+ * Tests the {@link DecoratorModelCopier} class.
+ */
+@SuppressWarnings("restriction")
+@PluginResource("/resources/testmodel.di")
+public class DecoratorModelCopierTest extends AbstractProfileExternalizationTest {
+ private static final String DUPLICATE_DECORATOR_KEY = "package2dup";
+
+ private URI decoratorURI;
+ private URI duplicateURI;
+
+ @Test
+ public void copy_allProfiles() {
+ copy();
+
+ loadDecoratorModel(DUPLICATE_DECORATOR_KEY);
+
+ assertThat("Bean stereotype not applied", getBean2().getAppliedStereotypes(), hasItem(getBeanStereotype()));
+ assertThat("Bean stereotype not applied", getMessageProcessor().getAppliedStereotypes(), hasItem(getBeanStereotype()));
+
+ Stereotype eclass = getEClassStereotype();
+ assertThat("EClass stereotype not applied", getBean2().getAppliedStereotypes(), hasItem(eclass));
+ assertThat("EClass stereotype not applied", getMessageProcessor().getAppliedStereotypes(), hasItem(eclass));
+
+ assertThat(getBean2().getValue(eclass, UMLUtil.TAG_DEFINITION__CLASS_NAME), is((Object) "MyBean"));
+ assertThat(getBean2().getValue(eclass, UMLUtil.TAG_DEFINITION__XML_NAME), is((Object) "bean"));
+ }
+
+ @Test
+ public void copy_subsetOfProfiles() {
+ copy(getTestProfile().eResource().getURI());
+
+ loadDecoratorModel(DUPLICATE_DECORATOR_KEY);
+
+ assertThat("Bean stereotype not applied", getBean2().getAppliedStereotypes(), hasItem(getBeanStereotype()));
+ assertThat("Bean stereotype not applied", getMessageProcessor().getAppliedStereotypes(), hasItem(getBeanStereotype()));
+
+ Stereotype eclass = getEClassStereotype();
+ assertThat("EClass stereotype is applied", getBean2().getAppliedStereotypes(), not(hasItem(eclass)));
+ assertThat("EClass stereotype is applied", getMessageProcessor().getAppliedStereotypes(), not(hasItem(eclass)));
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createFixture() {
+ decoratorURI = createDecoratorModelURI("package2");
+ duplicateURI = createDecoratorModelURI(DUPLICATE_DECORATOR_KEY);
+
+ // Replace the decorator with one that also has the Ecore profile applied
+ OutputStream output = null;
+
+ try {
+ output = modelSet.getResourceSet().getURIConverter().createOutputStream(decoratorURI);
+ Resources.copy(FrameworkUtil.getBundle(getClass()).getEntry("/resources/package2.ecore.uml"), output);
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail("Failed to create test resource: " + e.getLocalizedMessage());
+ } finally {
+ if (output != null) {
+ try {
+ output.close();
+ } catch (IOException e) {
+ // Pass
+ }
+ }
+ }
+ }
+
+ void copy(URI... profilesToInclude) {
+ final String dupName = "test copy";
+
+ DecoratorModelCopier copier = (profilesToInclude.length == 0) //
+ ? new DecoratorModelCopier(dupName) //
+ : new DecoratorModelCopier(dupName, ImmutableSet.copyOf(profilesToInclude));
+
+ try {
+ copier.copy(decoratorURI, duplicateURI).save(null);
+ } catch (IOException e) {
+ e.printStackTrace();
+ fail("Failed to save decorator model copy: " + e.getLocalizedMessage());
+ } finally {
+ copier.dispose();
+ }
+
+ try {
+ String modelName = DecoratorModelIndex.getInstance().getDecoratorModelName(duplicateURI);
+ assertThat(modelName, is(dupName));
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Failed to get name of decorator model copy from the index: " + e.getLocalizedMessage());
+ }
+ }
+
+ Stereotype getEClassStereotype() {
+ return Iterables.getFirst(Iterables.filter(UMLUtil.findNamedElements(modelSet.getResourceSet().getResource(URI.createURI(UMLResource.ECORE_PROFILE_URI), true), "Ecore::EClass"), Stereotype.class), null);
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelIndexTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelIndexTest.java
new file mode 100644
index 00000000000..f0b8d0afe87
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/internal/resource/tests/DecoratorModelIndexTest.java
@@ -0,0 +1,295 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.internal.resource.tests;
+
+import static org.eclipse.papyrus.junit.matchers.MoreMatchers.isEmpty;
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Collections;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Future;
+
+import org.eclipse.core.runtime.CoreException;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.URIConverter;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndex;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.DecoratorModelIndexEvent;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.IDecoratorModelIndexListener;
+import org.eclipse.papyrus.uml.decoratormodel.tests.AbstractProfileExternalizationTest;
+import org.eclipse.uml2.uml.Package;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.SetMultimap;
+
+/**
+ * Tests the {@link DecoratorModelIndex} class.
+ */
+@SuppressWarnings("restriction")
+@PluginResource("/resources/testmodel.di")
+public class DecoratorModelIndexTest extends AbstractProfileExternalizationTest {
+ static final String PACKAGE2_DECORATOR_MODEL = "package2.decorator.uml";
+ static final String PACKAGE2_DECORATOR_MODEL_NAME = "profile_applications";
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ private DecoratorModelIndex fixture = DecoratorModelIndex.getInstance();
+
+ public DecoratorModelIndexTest() {
+ super();
+ }
+
+ @Test
+ public void baseline() {
+ assertDecoratorModels(getURI(PACKAGE2_DECORATOR_MODEL));
+ }
+
+ @Test
+ public void addNewResource() {
+ getDecoratorModels(); // Synchronize the index
+
+ URI newURI = externalize(getPackage1(), getTestProfile(), "package1");
+ save();
+
+ assertDecoratorModels(getURI(PACKAGE2_DECORATOR_MODEL), newURI);
+ }
+
+ @Test
+ public void removeResource() {
+ getDecoratorModels(); // Synchronize the index
+
+ delete(PACKAGE2_DECORATOR_MODEL);
+
+ assertDecoratorModels();
+ }
+
+ @Test
+ public void appliedProfilesByResourceIndex() {
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ Package package2 = getPackage2();
+ URI testProfile = EcoreUtil.getURI(getTestProfile());
+
+ assertThat(getAppliedProfiles(package2, decoratorModel), is(Collections.singleton(testProfile)));
+ }
+
+ @Test
+ public void allAppliedProfiles() {
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ Package package2 = getPackage2();
+ URI testProfile = EcoreUtil.getURI(getTestProfile());
+
+ SetMultimap<URI, URI> profiles = getAllAppliedProfiles(package2);
+ assertThat(profiles.size(), is(1));
+ assertThat(profiles.get(testProfile), is(Collections.singleton(decoratorModel)));
+ }
+
+ @Test
+ public void allAppliedProfilesAsync() throws Exception {
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ Package package2 = getPackage2();
+ URI testProfile = EcoreUtil.getURI(getTestProfile());
+
+ Future<SetMultimap<URI, URI>> profiles = fixture.getAllAppliedProfilesAsync(EcoreUtil.getURI(package2));
+ assertThat(get(profiles, true).size(), is(1));
+ assertThat(get(profiles, false).get(testProfile), is(Collections.singleton(decoratorModel)));
+ }
+
+ @Test
+ public void decoratorModelName() throws CoreException {
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(fixture.getDecoratorModelName(decoratorModel), is(PACKAGE2_DECORATOR_MODEL_NAME));
+ }
+
+ @Test
+ public void decoratorModelNameAsync() {
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(get(fixture.getDecoratorModelNameAsync(decoratorModel), true), is(PACKAGE2_DECORATOR_MODEL_NAME));
+ }
+
+ @Test
+ public void decoratorModelNames() throws CoreException {
+ Map<URI, String> names = fixture.getDecoratorModelNames();
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(names.get(decoratorModel), is(PACKAGE2_DECORATOR_MODEL_NAME));
+ }
+
+ @Test
+ public void decoratorModelNamesAsync() {
+ Future<Map<URI, String>> names = fixture.getDecoratorModelNamesAsync();
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(get(names, true).get(decoratorModel), is(PACKAGE2_DECORATOR_MODEL_NAME));
+ }
+
+ @Test
+ public void decoratorModels() throws CoreException {
+ SetMultimap<URI, URI> decorators = fixture.getDecoratorModels();
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(decorators.get(modelSet.getModelResourceURI()), hasItem(decoratorModel));
+ }
+
+ @Test
+ public void decoratorModelsAsync() {
+ Future<SetMultimap<URI, URI>> decorators = fixture.getDecoratorModelsAsync();
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(get(decorators, true).get(modelSet.getModelResourceURI()), hasItem(decoratorModel));
+ }
+
+ @Test
+ public void decoratorModels_uri() throws CoreException {
+ Set<URI> decorators = fixture.getDecoratorModels(modelSet.getModelResourceURI());
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(decorators, hasItem(decoratorModel));
+ }
+
+ @Test
+ public void decoratorModelsAsync_uri() {
+ Future<Set<URI>> decorators = fixture.getDecoratorModelsAsync(modelSet.getModelResourceURI());
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(get(decorators, true), hasItem(decoratorModel));
+ }
+
+ @Test
+ public void decoratorModelsForPackage() throws CoreException {
+ Set<URI> decorators = fixture.getDecoratorModelsForPackage(EcoreUtil.getURI(getPackage2()));
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(decorators, hasItem(decoratorModel));
+ }
+
+ @Test
+ public void decoratorModelsForPackage_none() throws CoreException {
+ Set<URI> decorators = fixture.getDecoratorModelsForPackage(EcoreUtil.getURI(getPackage1()));
+
+ assertThat(decorators, isEmpty());
+ }
+
+ @Test
+ public void decoratorModelsForPackageAsync() {
+ Future<Set<URI>> decorators = fixture.getDecoratorModelsForPackageAsync(EcoreUtil.getURI(getPackage2()));
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ assertThat(get(decorators, true), hasItem(decoratorModel));
+ }
+
+ @Test
+ public void decoratorModelsForPackageAsync_none() {
+ Future<Set<URI>> decorators = fixture.getDecoratorModelsForPackageAsync(EcoreUtil.getURI(getPackage1()));
+
+ assertThat(get(decorators, true), isEmpty());
+ }
+
+ @Test
+ public void listener() throws Exception {
+ final TestListener listener = new TestListener();
+
+ DecoratorModelIndex.getInstance().addIndexListener(houseKeeper.cleanUpLater(listener));
+
+ URI decoratorModel = getURI(PACKAGE2_DECORATOR_MODEL);
+ URIConverter.INSTANCE.delete(decoratorModel, null);
+
+ // Synchronize with the index
+ DecoratorModelIndex.getInstance().getDecoratorModels();
+
+ assertThat(listener.count, is(1));
+ }
+
+ //
+ // Test framework
+ //
+
+ void assertDecoratorModels(URI... uris) {
+ assertThat(getDecoratorModels(), is((Set<URI>) ImmutableSet.copyOf(uris)));
+ }
+
+ void delete(String filename) {
+ try {
+ modelSet.getProject().getProject().getFile(filename).delete(true, null);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Failed to delete resource: " + e.getLocalizedMessage());
+ }
+ }
+
+ URI getURI(String filename) {
+ return modelSet.getProject().getURI(filename);
+ }
+
+ Set<URI> getDecoratorModels() {
+ return getDecoratorModels(modelSet.getModelResourceURI());
+ }
+
+ Set<URI> getDecoratorModels(URI modelResource) {
+ try {
+ return DecoratorModelIndex.getInstance().getDecoratorModels(modelResource);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Failed to get decorator models from index: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ Set<URI> getAppliedProfiles(Package package_, URI decoratorModel) {
+ try {
+ return DecoratorModelIndex.getInstance().getAppliedProfiles(EcoreUtil.getURI(package_), decoratorModel);
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Failed to get applied profiles from index: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ SetMultimap<URI, URI> getAllAppliedProfiles(Package package_) {
+ try {
+ return DecoratorModelIndex.getInstance().getAllAppliedProfiles(EcoreUtil.getURI(package_));
+ } catch (CoreException e) {
+ e.printStackTrace();
+ fail("Failed to get applied profiles from index: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ public static class TestListener implements IDecoratorModelIndexListener {
+ int count;
+
+ @Override
+ public void indexChanged(DecoratorModelIndexEvent event) {
+ assertThat(event.getEventType(), is(DecoratorModelIndexEvent.INDEX_CHANGED));
+ assertThat(event.getIndex(), is(DecoratorModelIndex.getInstance()));
+ count++;
+ }
+
+ public void dispose() {
+ DecoratorModelIndex.getInstance().removeIndexListener(this);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AbstractProfileExternalizationTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AbstractProfileExternalizationTest.java
new file mode 100644
index 00000000000..1750d9291a6
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AbstractProfileExternalizationTest.java
@@ -0,0 +1,477 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Collections;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.Callable;
+import java.util.concurrent.Future;
+import java.util.concurrent.TimeUnit;
+
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.Command;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.emf.edit.command.ChangeCommand;
+import org.eclipse.emf.edit.domain.EditingDomain;
+import org.eclipse.emf.transaction.RecordingCommand;
+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.junit.framework.classification.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.junit.utils.rules.ServiceRegistryModelSetFixture;
+import org.eclipse.papyrus.uml.decoratormodel.helper.DecoratorModelUtils;
+import org.eclipse.papyrus.uml.decoratormodel.model.DecoratorModel;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.uml2.common.util.UML2Util;
+import org.eclipse.uml2.uml.Class;
+import org.eclipse.uml2.uml.Dependency;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Enumeration;
+import org.eclipse.uml2.uml.EnumerationLiteral;
+import org.eclipse.uml2.uml.Operation;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.ProfileApplication;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.junit.Rule;
+import org.junit.rules.TestName;
+
+import com.google.common.collect.ImmutableSet;
+import com.google.common.collect.Iterators;
+import com.google.common.collect.Lists;
+import com.google.common.collect.Maps;
+
+/**
+ * Common test infrastructure for profile application externalization tests.
+ */
+public abstract class AbstractProfileExternalizationTest extends AbstractPapyrusTest {
+
+ @Rule
+ public final ModelSetFixture modelSet = new ServiceRegistryModelSetFixture();
+
+ @Rule
+ public final TestName testName = new TestName();
+
+ private EditingDomain testContext;
+
+ public AbstractProfileExternalizationTest() {
+ super();
+ }
+
+ protected URI createDecoratorModelURI(String resourceKey) {
+ return createDecoratorModelURI(modelSet.getModelResourceURI(), resourceKey);
+ }
+
+ protected URI createDecoratorModelURI(URI modelURI, String resourceKey) {
+ return modelURI.trimSegments(1).appendSegment(resourceKey + ".decorator.uml");
+ }
+
+ protected Resource loadDecoratorModel(String resourceKey) {
+ Resource result = null;
+ ResourceSet context = getTestContextResourceSet();
+
+ if (context instanceof ModelSet) {
+ DecoratorModel model = DecoratorModel.getInstance((ModelSet) context);
+ if (model != null) {
+ result = model.loadDecoratorModel(createDecoratorModelURI(modelSet.getModelResourceURI(), resourceKey));
+ }
+ } else {
+ URI resourceURI = createDecoratorModelURI(resourceKey);
+ if (context.getURIConverter().exists(resourceURI, null)) {
+ result = context.getResource(resourceURI, true);
+ } else {
+ result = context.createResource(resourceURI, UMLPackage.eCONTENT_TYPE);
+ }
+ }
+
+ // Ensure that proxies are resolved so that, e.g., refactoring of sub-units can be reflected in this resource's cross-references
+ EcoreUtil.resolveAll(result);
+
+ return result;
+ }
+
+ protected void unloadDecoratorModel(String resourceKey) {
+ Resource resource = getTestContextResourceSet().getResource(createDecoratorModelURI(resourceKey), false);
+ assertThat(resource, notNullValue());
+ assertThat(resource.isLoaded(), is(true));
+
+ resource.unload();
+ resource.getResourceSet().getResources().remove(resource);
+ resource.eAdapters().clear();
+ }
+
+ protected URI externalize(Package applyingPackage, Profile appliedProfile, String resourceKey) {
+ final URI result = createDecoratorModelURI(resourceKey);
+
+ ProfileApplication application = applyingPackage.getProfileApplication(appliedProfile);
+ assertThat(application, notNullValue());
+ Command command = DecoratorModelUtils.createSeparateProfileApplicationsCommand(Collections.singleton(application), result, testName.getMethodName());
+ assertThat(command.canExecute(), is(true));
+
+ try {
+ execute(command);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to externalize profile application: " + e.getLocalizedMessage());
+ }
+
+ return result;
+ }
+
+ protected void internalize(Package applyingPackage, Profile appliedProfile) {
+ ProfileApplication application = applyingPackage.getProfileApplication(appliedProfile, true);
+ assertThat(application, notNullValue());
+ Command command = DecoratorModelUtils.createReclaimProfileApplicationsCommand(Collections.singleton(application));
+ assertThat(command.canExecute(), is(true));
+
+ try {
+ execute(command);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to internalize profile application: " + e.getLocalizedMessage());
+ }
+ }
+
+ protected Resource control(final Package package_) {
+ final ResourceSet rset = EMFHelper.getResourceSet(package_);
+
+ return execute(new Callable<Resource>() {
+
+ @Override
+ public Resource call() throws Exception {
+ URI uri = package_.eResource().getURI();
+ uri = uri.trimSegments(1).appendSegment(package_.getName()).appendFileExtension(UmlModel.UML_FILE_EXTENSION);
+ Resource result = rset.createResource(uri);
+ result.getContents().add(package_);
+ return result;
+ }
+ });
+ }
+
+ protected void execute(final Runnable write) {
+ Command command;
+
+ if (getTestContext() instanceof TransactionalEditingDomain) {
+ command = new RecordingCommand((TransactionalEditingDomain) getTestContext()) {
+
+ @Override
+ protected void doExecute() {
+ write.run();
+ }
+ };
+ } else {
+ command = new ChangeCommand(getTestContextResourceSet()) {
+ @Override
+ protected void doExecute() {
+ write.run();
+ }
+ };
+ }
+
+ execute(command);
+ }
+
+ protected <V> V execute(final Callable<V> write) {
+ final List<V> result = Lists.newArrayListWithCapacity(1);
+ Command command;
+
+ if (getTestContext() instanceof TransactionalEditingDomain) {
+ command = new RecordingCommand((TransactionalEditingDomain) getTestContext()) {
+
+ @Override
+ protected void doExecute() {
+ try {
+ result.add(write.call());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception in write operation: " + e.getLocalizedMessage());
+ }
+ }
+ };
+ } else {
+ command = new ChangeCommand(getTestContextResourceSet()) {
+ @Override
+ protected void doExecute() {
+ try {
+ result.add(write.call());
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Exception in write operation: " + e.getLocalizedMessage());
+ }
+ }
+ };
+ }
+
+ execute(command);
+
+ return result.get(0);
+ }
+
+ protected void execute(Command command) {
+ getTestContext().getCommandStack().execute(command);
+ }
+
+ protected void undo() {
+ getTestContext().getCommandStack().undo();
+ }
+
+ protected void redo() {
+ getTestContext().getCommandStack().redo();
+ }
+
+ protected void save() {
+ ResourceSet context = getTestContextResourceSet();
+
+ try {
+ if (context instanceof ModelSet) {
+ ((ModelSet) context).save(new NullProgressMonitor());
+ } else {
+ Map<String, Object> options = Maps.newHashMap();
+ options.put(XMLResource.OPTION_SAVE_ONLY_IF_CHANGED, XMLResource.OPTION_SAVE_ONLY_IF_CHANGED_MEMORY_BUFFER);
+
+ for (Resource next : context.getResources()) {
+ if (next.getURI().isPlatformResource()) {
+ next.save(options);
+ }
+ }
+ }
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to save test model: " + e.getLocalizedMessage());
+ }
+ }
+
+ private EditingDomain getTestContext() {
+ return (testContext != null) ? testContext : modelSet.getEditingDomain();
+ }
+
+ private ResourceSet getTestContextResourceSet() {
+ return (testContext != null) ? testContext.getResourceSet() : modelSet.getResourceSet();
+ }
+
+ protected final void setTestContext(EditingDomain context) {
+ this.testContext = context;
+ }
+
+ protected Profile getProfileExternalizationProfile() {
+ return (Profile) getTestContextResourceSet().getEObject(DecoratorModelUtils.PROFILE_URI, true);
+ }
+
+ protected Profile getTestProfile() {
+ URI uri = modelSet.getModelResourceURI().trimSegments(1).appendSegment("profile").appendSegment("profile1.profile.uml");
+ return (Profile) UML2Util.load(getTestContextResourceSet(), uri, UMLPackage.Literals.PROFILE);
+ }
+
+ protected Package getModel() {
+ return (Package) getTestContextResourceSet().getEObject(modelSet.getModelURI(), true);
+ }
+
+ protected Package getPackage1() {
+ return getModel().getNestedPackage("package1");
+ }
+
+ protected Class getEntity1() {
+ return (Class) getPackage1().getOwnedType("Entity1");
+ }
+
+ protected Operation getEntity1Find() {
+ return getEntity1().getOwnedOperation("find", null, null);
+ }
+
+ protected Dependency getEntity1Import() {
+ return getEntity1().getClientDependencies().get(0);
+ }
+
+ protected Class getBusinessRules() {
+ return (Class) getPackage1().getOwnedType("BusinessRules");
+ }
+
+ protected Package getPackage2() {
+ return getModel().getNestedPackage("package2");
+ }
+
+ protected Class getBean2() {
+ return (Class) getPackage2().getOwnedType("Bean2");
+ }
+
+ protected Dependency getBean2Import() {
+ return getBean2().getClientDependencies().get(0);
+ }
+
+ protected Class getMessageProcessor() {
+ return (Class) getPackage2().getOwnedType("MessageProcessor");
+ }
+
+ protected Stereotype getBeanStereotype() {
+ return getTestProfile().getOwnedStereotype("Bean");
+ }
+
+ protected Stereotype getImportStereotype() {
+ return getTestProfile().getNestedPackage("relationships").getOwnedStereotype("Import");
+ }
+
+ protected Stereotype getFinderStereotype() {
+ return getTestProfile().getOwnedStereotype("Finder");
+ }
+
+ protected Enumeration getBeanKindEnumeration() {
+ return (Enumeration) getTestProfile().getOwnedType("BeanKind");
+ }
+
+ protected EnumerationLiteral getEntityLiteral() {
+ return getBeanKindEnumeration().getOwnedLiteral("entity");
+ }
+
+ protected EnumerationLiteral getSessionLiteral() {
+ return getBeanKindEnumeration().getOwnedLiteral("session");
+ }
+
+ protected EnumerationLiteral getMessageDrivenLiteral() {
+ return getBeanKindEnumeration().getOwnedLiteral("messagedriven");
+ }
+
+ protected Stereotype getApplyProfilesStereotype() {
+ return getProfileExternalizationProfile().getOwnedStereotype("ApplyProfiles");
+ }
+
+ protected boolean isDefinedIn(Stereotype stereotype, Profile profile) {
+ return EcoreUtil.isAncestor(profile, stereotype);
+ }
+
+ protected <V> V get(Future<V> future, boolean first) {
+ try {
+ // Time out faster on subsequent accesses because the index shouldn't have churned in the mean-time
+ return future.get(1L, first ? TimeUnit.MINUTES : TimeUnit.SECONDS);
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to get future result: " + e.getLocalizedMessage());
+ return null; // Unreachable
+ }
+ }
+
+ protected void assertNotApplied(Package package_, Profile profile) {
+ assertThat(package_.getProfileApplication(profile, true), nullValue());
+
+ for (Iterator<Element> iter = Iterators.filter(UML2Util.getAllContents(package_, true, false), Element.class); iter.hasNext();) {
+ for (EObject application : iter.next().getStereotypeApplications()) {
+ Stereotype stereotype = UMLUtil.getStereotype(application);
+ assertThat(stereotype, notNullValue());
+ assertThat(isDefinedIn(stereotype, profile), is(false));
+ }
+ }
+ }
+
+ protected void assertInternalApplication(Package applyingPackage, Profile appliedProfile, int stereotypeCount) {
+ Resource resource = applyingPackage.eResource();
+ assertThat(resource, notNullValue());
+
+ assertApplication(applyingPackage, appliedProfile, stereotypeCount, resource);
+ }
+
+ private void assertApplication(Package applyingPackage, Profile appliedProfile, int stereotypeCount, Resource expectedResource) {
+ ProfileApplication profileApplication = applyingPackage.getProfileApplication(appliedProfile, true);
+ assertThat("Profile not applied", profileApplication, notNullValue());
+
+ assertThat(profileApplication.eResource(), is(expectedResource));
+
+ int stereotypesFound = 0;
+ for (Iterator<Element> iter = Iterators.filter(UML2Util.getAllContents(applyingPackage, true, false), Element.class); iter.hasNext();) {
+ for (EObject application : iter.next().getStereotypeApplications()) {
+ Stereotype stereotype = UMLUtil.getStereotype(application);
+ assertThat(stereotype, notNullValue());
+ if (isDefinedIn(stereotype, appliedProfile)) {
+ assertThat(application.eResource(), is(expectedResource));
+ stereotypesFound++;
+ }
+ }
+ }
+
+ assertThat("Wrong number of stereotypes found", stereotypesFound, is(stereotypeCount));
+ }
+
+ protected void assertExternalApplication(Package applyingPackage, Profile appliedProfile, String resourceKey, int stereotypeCount) {
+ URI uri = createDecoratorModelURI(applyingPackage.eResource().getURI(), resourceKey);
+ Resource resource = getTestContextResourceSet().getResource(uri, false);
+ assertThat(resource, notNullValue());
+ assertThat(resource.isLoaded(), is(true));
+
+ assertApplication(applyingPackage, appliedProfile, stereotypeCount, resource);
+ }
+
+ protected <E> Set<E> set(E... elements) {
+ return ImmutableSet.copyOf(elements);
+ }
+
+ protected Matcher<Element> isApplied(final Stereotype stereotype) {
+ return new BaseMatcher<Element>() {
+ @Override
+ public boolean matches(Object item) {
+ return ((Element) item).isStereotypeApplied(stereotype);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText(String.format("has stereotype <<%s>> applied", stereotype.getName()));
+ }
+ };
+ }
+
+ protected Matcher<Element> isApplicable(final Stereotype stereotype) {
+ return new BaseMatcher<Element>() {
+ @Override
+ public boolean matches(Object item) {
+ return ((Element) item).isStereotypeApplicable(stereotype);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText(String.format("can apply stereotype <<%s>>", stereotype.getName()));
+ }
+ };
+ }
+
+ protected Matcher<URI> exists() {
+ return new BaseMatcher<URI>() {
+ @Override
+ public boolean matches(Object item) {
+ return getTestContextResourceSet().getURIConverter().exists((URI) item, null);
+ }
+
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("exists");
+ }
+ };
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AllTests.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AllTests.java
new file mode 100644
index 00000000000..ef35f6847c9
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/AllTests.java
@@ -0,0 +1,39 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.decoratormodel.tests;
+
+import org.eclipse.papyrus.uml.decoratormodel.helper.tests.DecoratorModelUtilsTest;
+import org.eclipse.papyrus.uml.decoratormodel.helper.tests.PapyrusStereotypeApplicationHelperTest;
+import org.eclipse.papyrus.uml.decoratormodel.internal.expressions.tests.FilePropertyTesterTest;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.tests.DecoratorModelCopierTest;
+import org.eclipse.papyrus.uml.decoratormodel.internal.resource.tests.DecoratorModelIndexTest;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+
+/**
+ * Main tests suite for this plugin
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+ ExternalizeProfileApplicationTest.class, InternalizeProfileApplicationTest.class, //
+ ProfileMigrationTest.class, StereotypeApplicationRepairTest.class, //
+ DecoratorModelIndexTest.class, DecoratorModelCopierTest.class, //
+ DecoratorModelUtilsTest.class, PapyrusStereotypeApplicationHelperTest.class, //
+ FilePropertyTesterTest.class
+})
+public class AllTests {
+ // Test suite
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ExternalizeProfileApplicationTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ExternalizeProfileApplicationTest.java
new file mode 100644
index 00000000000..e358a951dac
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ExternalizeProfileApplicationTest.java
@@ -0,0 +1,155 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import java.util.concurrent.Callable;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * Tests the externalization of profiles.
+ */
+@PluginResource("/resources/testmodel.di")
+public class ExternalizeProfileApplicationTest extends AbstractProfileExternalizationTest {
+
+ public ExternalizeProfileApplicationTest() {
+ super();
+ }
+
+ @Test
+ public void unloadedApplicationNotAvailable() {
+ assertNotApplied(getPackage2(), getTestProfile());
+ }
+
+ @Test
+ public void loadApplication() {
+ loadDecoratorModel("package2");
+ assertExternalApplication(getPackage2(), getTestProfile(), "package2", 3);
+
+ assertThat(getBean2(), isApplied(getBeanStereotype()));
+ assertThat(getBean2().getValue(getBeanStereotype(), "kind"), is((Object) getMessageDrivenLiteral()));
+
+ // the profile-externalization profile is not applied to the user package, although it is technically
+ // applied (indirectly) to the externalizing package
+ assertThat(getBean2Import(), isApplied(getImportStereotype()));
+ assertThat(getBean2Import(), not(isApplicable(getApplyProfilesStereotype())));
+ }
+
+ @Test
+ public void unloadApplication() {
+ loadDecoratorModel("package2");
+
+ assertThat(getBean2(), isApplied(getBeanStereotype()));
+
+ unloadDecoratorModel("package2");
+
+ assertNotApplied(getPackage2(), getTestProfile());
+ }
+
+ @Test
+ public void externalizeApplication() {
+ externalize(getPackage1(), getTestProfile(), "package1");
+
+ // Four stereotypes: Bean, Finder, Import, and Bean again
+ assertExternalApplication(getPackage1(), getTestProfile(), "package1", 4);
+
+ URI uri = getEntity1().getStereotypeApplication(getBeanStereotype()).eResource().getURI();
+ assertThat(uri, not(exists()));
+
+ save();
+
+ // resource was created on disk
+ assertThat(uri, exists());
+ }
+
+ @Test
+ public void externalizeApplication_undo() {
+ externalize(getPackage1(), getTestProfile(), "package1");
+ URI uri = getEntity1().getStereotypeApplication(getBeanStereotype()).eResource().getURI();
+
+ undo();
+
+ // Four stereotypes: Bean, Finder, Import, and Bean again
+ assertInternalApplication(getPackage1(), getTestProfile(), 4);
+
+ save();
+
+ // The decorator model resource was not created
+ assertThat(uri, not(exists()));
+ }
+
+ @Test
+ public void externalizeApplication_undo_redo() {
+ externalize(getPackage1(), getTestProfile(), "package1");
+ URI uri = getEntity1().getStereotypeApplication(getBeanStereotype()).eResource().getURI();
+
+ undo();
+ redo();
+
+ // Four stereotypes: Bean, Finder, Import, and Bean again
+ assertExternalApplication(getPackage1(), getTestProfile(), "package1", 4);
+
+ save();
+
+ // resource was created on disk
+ assertThat(uri, exists());
+ }
+
+ @PluginResource("/resources/package2.decorator.di")
+ @Test
+ public void loadDecoratorAsMainModel() {
+ assertThat(getModel().getName(), is("profile_applications"));
+
+ URI uri = modelSet.getModelResourceURI().trimSegments(1).appendSegment("testmodel.uml");
+ Resource userModelResource = modelSet.getResourceSet().getResource(uri, false);
+
+ assertThat("User model not pre-loaded by the decorator IModel", userModelResource, notNullValue());
+ assertThat("User model not pre-loaded by the decorator IModel", userModelResource.isLoaded(), is(true));
+
+ Package userModel = (Package) EcoreUtil.getObjectByType(userModelResource.getContents(), UMLPackage.Literals.PACKAGE);
+ Package package2 = userModel.getNestedPackage("package2");
+ assertThat(package2.getOwnedType("Bean2").getAppliedStereotypes(), hasItem(getBeanStereotype()));
+ assertThat(package2.getOwnedType("MessageProcessor").getAppliedStereotypes(), hasItem(getBeanStereotype()));
+ }
+
+ @Test
+ public void externalizeApplication_forNestedPackage() {
+ URI decoratorURI = externalize(getPackage1(), getTestProfile(), "package1");
+
+ // Create a nested package
+ EObject stereo = execute(new Callable<EObject>() {
+ @Override
+ public EObject call() {
+ Package nested = getPackage1().createNestedPackage("nested");
+ org.eclipse.uml2.uml.Class aBean = nested.createOwnedClass("NewBean", false);
+ return aBean.applyStereotype(getBeanStereotype());
+ }
+ });
+
+ assertThat(stereo.eResource().getURI(), is(decoratorURI));
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/InternalizeProfileApplicationTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/InternalizeProfileApplicationTest.java
new file mode 100644
index 00000000000..8750243fb4b
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/InternalizeProfileApplicationTest.java
@@ -0,0 +1,112 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.tests;
+
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.junit.Test;
+
+/**
+ * Tests the internalization of profiles.
+ */
+@PluginResource("/resources/testmodel.di")
+public class InternalizeProfileApplicationTest extends AbstractProfileExternalizationTest {
+
+ public InternalizeProfileApplicationTest() {
+ super();
+ }
+
+ @Test
+ public void internalizeApplication() {
+ loadDecoratorModel("package2");
+
+ URI uml = getBean2().getStereotypeApplication(getBeanStereotype()).eResource().getURI();
+ URI di = uml.trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION);
+ URI notation = uml.trimFileExtension().appendFileExtension(NotationModel.NOTATION_FILE_EXTENSION);
+
+ internalize(getPackage2(), getTestProfile());
+
+ // Three stereotypes applied: Bean, Import, and Bean again
+ assertInternalApplication(getPackage2(), getTestProfile(), 3);
+
+ assertThat(uml, exists());
+ assertThat(di, exists());
+ assertThat(notation, exists());
+
+ save();
+
+ // resource was deleted because it is no longer required
+ assertThat(uml, not(exists()));
+
+ // also the *.di and *.notation
+ assertThat(di, not(exists()));
+ assertThat(notation, not(exists()));
+ }
+
+ @Test
+ public void internalizeApplication_undo() {
+ loadDecoratorModel("package2");
+
+ URI uml = getBean2().getStereotypeApplication(getBeanStereotype()).eResource().getURI();
+ URI di = uml.trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION);
+ URI notation = uml.trimFileExtension().appendFileExtension(NotationModel.NOTATION_FILE_EXTENSION);
+
+ internalize(getPackage2(), getTestProfile());
+
+ // Undo the externalization command
+ undo();
+
+ save();
+
+ // The resources still exist
+ assertThat(uml, exists());
+ assertThat(di, exists());
+ assertThat(notation, exists());
+
+ // The stereotypes applied: Bean, Import, and Bean again
+ assertExternalApplication(getPackage2(), getTestProfile(), "package2", 3);
+ }
+
+ @Test
+ public void internalizeApplication_undo_redo() {
+ loadDecoratorModel("package2");
+
+ URI uml = getBean2().getStereotypeApplication(getBeanStereotype()).eResource().getURI();
+ URI di = uml.trimFileExtension().appendFileExtension(DiModel.DI_FILE_EXTENSION);
+ URI notation = uml.trimFileExtension().appendFileExtension(NotationModel.NOTATION_FILE_EXTENSION);
+
+ internalize(getPackage2(), getTestProfile());
+
+ undo();
+ redo();
+
+ // Three stereotypes applied: Bean, Import, and Bean again
+ assertInternalApplication(getPackage2(), getTestProfile(), 3);
+
+ save();
+
+ // resource was deleted because it is no longer required
+ assertThat(uml, not(exists()));
+
+ // also the *.di and *.notation
+ assertThat(di, not(exists()));
+ assertThat(notation, not(exists()));
+ }
+
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ProfileMigrationTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ProfileMigrationTest.java
new file mode 100644
index 00000000000..f6b9e23bacb
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/ProfileMigrationTest.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2014 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.decoratormodel.tests;
+
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.tools.helper.IProfileApplicationDelegate;
+import org.eclipse.uml2.uml.LiteralBoolean;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Stereotype;
+import org.eclipse.uml2.uml.Type;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * Tests the migration of profiles that are applied to externalized resources.
+ */
+@PluginResource("/resources/testmodel.di")
+public class ProfileMigrationTest extends AbstractProfileExternalizationTest {
+ static final String NEW_VERSION_MARKER_PROPERTY = "newVersionMarker";
+
+ public ProfileMigrationTest() {
+ super();
+ }
+
+ @Test
+ public void migrateProfile() {
+ loadDecoratorModel("package2");
+ assertExternalApplication(getPackage2(), getTestProfile(), "package2", 3);
+
+ assertThat(getBean2(), isApplied(getBeanStereotype()));
+ assertThat(getBean2().getValue(getBeanStereotype(), "kind"), is((Object) getMessageDrivenLiteral()));
+
+ migrate(getPackage2(), getTestProfile());
+
+ // The new stereotype property is available
+ assertThat(getBean2(), isApplied(getBeanStereotype()));
+ assertThat(getBean2().getValue(getBeanStereotype(), NEW_VERSION_MARKER_PROPERTY), is((Object) Boolean.TRUE));
+
+ // The stereotypes are all still (or, perhaps, again) in the external resource
+ assertExternalApplication(getPackage2(), getTestProfile(), "package2", 3);
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void defineNewProfileVersion() {
+ execute(new Runnable() {
+
+ @Override
+ public void run() {
+ Profile profile = getTestProfile();
+ Stereotype bean = getBeanStereotype();
+ LiteralBoolean bool = (LiteralBoolean) bean.createOwnedAttribute(NEW_VERSION_MARKER_PROPERTY, (Type) profile.getMember("Boolean")).createDefaultValue(null, null, UMLPackage.Literals.LITERAL_BOOLEAN);
+ bool.setValue(true);
+ profile.define();
+ }
+ });
+ }
+
+ void migrate(final Package package_, final Profile profile) {
+ execute(new Runnable() {
+
+ @Override
+ public void run() {
+ @SuppressWarnings("restriction")
+ IProfileApplicationDelegate delegate = new org.eclipse.papyrus.uml.decoratormodel.internal.providers.ExternalizedProfileApplicationDelegate();
+ delegate.reapplyProfile(package_, profile);
+ }
+ });
+ }
+}
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/StereotypeApplicationRepairTest.java b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/StereotypeApplicationRepairTest.java
new file mode 100644
index 00000000000..209265b22ee
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/src/org/eclipse/papyrus/uml/decoratormodel/tests/StereotypeApplicationRepairTest.java
@@ -0,0 +1,195 @@
+/*
+ * Copyright (c) 2014 CEA, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus (CEA) - Initial API and implementation
+ * Christian W. Damus - bug 399859
+ *
+ */
+package org.eclipse.papyrus.uml.decoratormodel.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.junit.Assert.fail;
+
+import java.util.Collection;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.ecore.util.EcoreUtil;
+import org.eclipse.emf.ecore.util.ExtendedMetaData;
+import org.eclipse.emf.ecore.xmi.XMLResource;
+import org.eclipse.papyrus.infra.core.utils.TransactionHelper;
+import org.eclipse.papyrus.junit.utils.rules.HouseKeeper;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.IRepairAction;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.StereotypeApplicationRepairSnippet;
+import org.eclipse.papyrus.uml.modelrepair.internal.stereotypes.ZombieStereotypesDescriptor;
+import org.eclipse.uml2.uml.Profile;
+import org.junit.Before;
+import org.junit.Rule;
+import org.junit.Test;
+
+import com.google.common.base.Function;
+import com.google.common.base.Functions;
+
+
+/**
+ * Automated tests for stereotype/profile application repair in decorator models.
+ */
+@SuppressWarnings("restriction")
+public class StereotypeApplicationRepairTest extends AbstractProfileExternalizationTest {
+
+ @Rule
+ public final HouseKeeper houseKeeper = new HouseKeeper();
+
+ private ZombieStereotypesDescriptor zombies;
+
+ private Resource decoratorModelResource;
+
+ public StereotypeApplicationRepairTest() {
+ super();
+ }
+
+ /**
+ * Test case in which the profile application is not missing, and the EPackage schema is successfully resolved by EMF, but
+ * the stereotype applications are from a different version of the profile than is currently applied.
+ */
+ @Test
+ @PluginResource("/resources/wrongProfileVersion/testmodel.di")
+ public void wrongProfileVersion() {
+ assertThat("Should have found zombie stereotypes", zombies, notNullValue());
+
+ EPackage schema = getOnlyZombieSchema();
+ assertThat("Did not match schema to loaded profile", EcoreUtil.getRootContainer(schema), is((EObject) getTestProfile()));
+ assertThat("EPackage is an unknown schema", getExtendedMetadata().demandedPackages(), not(hasItem(schema)));
+
+ IRepairAction action = zombies.getSuggestedRepairAction(schema);
+ assertThat("Wrong suggested repair action", action.kind(), is(IRepairAction.Kind.APPLY_LATEST_PROFILE_DEFINITION));
+
+ repair(schema, action);
+ assertStereotypeApplication();
+ }
+
+ /**
+ * Test case in which the profile application is missing, but the EPackage schema is successfully resolved by EMF, so
+ * we just have to link up with the profile definition and apply it (no need to parse unknown-schema AnyTypes).
+ */
+ @Test
+ @PluginResource("/resources/missingProfileApplication/testmodel.di")
+ public void missingProfileApplication() {
+ assertThat("Should have found zombie stereotypes", zombies, notNullValue());
+
+ EPackage schema = getOnlyZombieSchema();
+ assertThat("Did not match schema to loaded profile", EcoreUtil.getRootContainer(schema), is((EObject) getTestProfile()));
+ assertThat("EPackage is an unknown schema", getExtendedMetadata().demandedPackages(), not(hasItem(schema)));
+
+ IRepairAction action = zombies.getSuggestedRepairAction(schema);
+ assertThat("Wrong suggested repair action", action.kind(), is(IRepairAction.Kind.APPLY_LATEST_PROFILE_DEFINITION));
+
+ repair(schema, action);
+ assertStereotypeApplication();
+ }
+
+ /**
+ * Test case in which the profile application and schema location are present but reference a non-existent resource.
+ * We just have to link up with the profile definition and apply it and parse unknown-schema AnyTypes to reconstruct stereotypes.
+ */
+ @Test
+ @PluginResource("/resources/missingSchema/testmodel.di")
+ public void missingSchema() {
+ assertThat("Should have found zombie stereotypes", zombies, notNullValue());
+
+ EPackage schema = getOnlyZombieSchema();
+ assertThat("EPackage is not an unknown schema", getExtendedMetadata().demandedPackages(), hasItem(schema));
+
+ IRepairAction action = zombies.getSuggestedRepairAction(schema);
+ assertThat("Wrong suggested repair action", action.kind(), is(IRepairAction.Kind.APPLY_LATEST_PROFILE_DEFINITION));
+
+ repair(schema, action);
+ assertStereotypeApplication();
+ }
+
+ //
+ // Test framework
+ //
+
+ @Before
+ public void createFixture() throws Exception {
+ SnippetFixture snippet = new SnippetFixture(Functions.constant(getTestProfile()));
+ snippet.start(modelSet.getResourceSet());
+ houseKeeper.cleanUpLater(snippet, "dispose", modelSet.getResourceSet());
+
+ // Load the decorator model to trigger the repair operation
+ decoratorModelResource = loadDecoratorModel("package1");
+
+ houseKeeper.setField("zombies", snippet.getZombieStereotypes(decoratorModelResource));
+ }
+
+ void repair(final EPackage schema, final IRepairAction action) {
+ try {
+ TransactionHelper.run(modelSet.getEditingDomain(), new Runnable() {
+
+ @Override
+ public void run() {
+ zombies.repair(schema, action, null, null);
+ }
+ });
+ } catch (Exception e) {
+ e.printStackTrace();
+ fail("Failed to run repair action: " + e.getLocalizedMessage());
+ }
+ }
+
+ EPackage getOnlyZombieSchema() {
+ Collection<? extends EPackage> schemata = zombies.getZombiePackages();
+ assertThat("Wrong number of zombie packages", schemata.size(), is(1));
+ return schemata.iterator().next();
+ }
+
+ void assertStereotypeApplication() {
+ assertThat("Stereotype not applied to the class", getEntity1().isStereotypeApplied(getBeanStereotype()));
+ EObject application = getEntity1().getStereotypeApplication(getBeanStereotype());
+
+ assertThat("Stereotype application was moved out of the decorator model", application.eResource(), not(getEntity1().eResource()));
+ }
+
+ ExtendedMetaData getExtendedMetadata() {
+ return getExtendedMetadata(decoratorModelResource);
+ }
+
+ ExtendedMetaData getExtendedMetadata(Resource resource) {
+ ExtendedMetaData result = ExtendedMetaData.INSTANCE;
+
+ Object option = ((XMLResource) resource).getDefaultSaveOptions().get(XMLResource.OPTION_EXTENDED_META_DATA);
+ if (option instanceof ExtendedMetaData) {
+ result = (ExtendedMetaData) option;
+ }
+
+ return result;
+ }
+
+ //
+ // Nested types
+ //
+
+ static class SnippetFixture extends StereotypeApplicationRepairSnippet {
+ SnippetFixture(Function<? super EPackage, Profile> dynamicProfileSupplier) {
+ super(dynamicProfileSupplier);
+ }
+
+ @Override
+ protected ZombieStereotypesDescriptor getZombieStereotypes(Resource resource) {
+ return super.getZombieStereotypes(resource);
+ }
+ }
+}

Back to the top