Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
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 /tests
parent5503597a07d880a28abfa8739a73d94a55b4aad0 (diff)
downloadorg.eclipse.papyrus-31a95fd28af8c8453239d742e57c718499dc1b96.tar.gz
org.eclipse.papyrus-31a95fd28af8c8453239d742e57c718499dc1b96.tar.xz
org.eclipse.papyrus-31a95fd28af8c8453239d742e57c718499dc1b96.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
Diffstat (limited to 'tests')
-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.properties8
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.launch45
-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.di8
-rw-r--r--tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation2
-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.di18
-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.di12
-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.di18
-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.java30
-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.properties8
-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.di12
-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
96 files changed, 9415 insertions, 181 deletions
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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/build.properties b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/build.properties
new file mode 100644
index 00000000000..071a645751e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ about.html,\
+ plugin.properties
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.launch b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests.launch
new file mode 100644
index 00000000000..8b845a31489
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/org.eclipse.papyrus.uml.decoratormodel.controlmode.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.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.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"/>
+</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.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.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.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"/>
+<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.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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.di
new file mode 100644
index 00000000000..cac982021da
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.di
@@ -0,0 +1,8 @@
+<?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"/>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/Package1_1.notation
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/package2.decorator.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.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.controlmode.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.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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.di
new file mode 100644
index 00000000000..f6570c8e340
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/profile/profile1.profile.di
@@ -0,0 +1,12 @@
+<?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="profile1.profile.notation#_rdgrcEigEeSRp-p9nf2EsA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/resources/testmodel.di
new file mode 100644
index 00000000000..71fa9dbcd7d
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.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.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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/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
new file mode 100644
index 00000000000..b3839b3b974
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.controlmode.tests/src/org/eclipse/papyrus/uml/decoratormodel/controlmode/tests/AllTests.java
@@ -0,0 +1,30 @@
+/*****************************************************************************
+ * 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.controlmode.tests;
+
+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({
+ 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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/build.properties b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/build.properties
new file mode 100644
index 00000000000..071a645751e
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/build.properties
@@ -0,0 +1,8 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ resources/,\
+ 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/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.di b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.di
new file mode 100644
index 00000000000..f6570c8e340
--- /dev/null
+++ b/tests/junit/plugins/uml/decoratormodel/org.eclipse.papyrus.uml.decoratormodel.tests/resources/profile/profile1.profile.di
@@ -0,0 +1,12 @@
+<?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="profile1.profile.notation#_rdgrcEigEeSRp-p9nf2EsA"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
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