Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorCamille Letavernier2014-04-24 11:54:09 +0000
committerCamille Letavernier2014-08-01 08:44:27 +0000
commit7622e29011b5141c169a3109e66363fa8065eacc (patch)
tree389d6ba5ad483f95c06c586749dbd41f2077974a /tests
parent40627d8ba4c15027db287893d092431185b2dbda (diff)
downloadorg.eclipse.papyrus-7622e29011b5141c169a3109e66363fa8065eacc.tar.gz
org.eclipse.papyrus-7622e29011b5141c169a3109e66363fa8065eacc.tar.xz
org.eclipse.papyrus-7622e29011b5141c169a3109e66363fa8065eacc.zip
[Tests refactoring] Move test plug-ins for consistency
Diffstat (limited to 'tests')
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.classpath (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.classpath)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.project (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.project)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/META-INF/MANIFEST.MF (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/META-INF/MANIFEST.MF)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/OSGI-INF/l10n/bundle.properties (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/OSGI-INF/l10n/bundle.properties)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/about.html (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/about.html)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/build.properties (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/build.properties)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/org.eclipse.papyrus.sasheditor.di.tests.launch (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/org.eclipse.papyrus.sasheditor.di.tests.launch)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngrTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngrTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/FakeModelFactory.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/FakeModelFactory.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/AbstractDiContentProviderTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/AbstractDiContentProviderTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CheckVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CheckVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/ContentChangeListener.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/ContentChangeListener.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CreateModelVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CreateModelVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProvider2Test.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProvider2Test.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderBaseVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderBaseVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacade.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacade.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacadeTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacadeTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/FakePageModelFactory.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/FakePageModelFactory.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageMngrImplTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageMngrImplTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/QueryVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/QueryVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/SashContainerModels.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/SashContainerModels.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/TransactionalDiContentProvider2Test.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/TransactionalDiContentProvider2Test.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/AbstractSash.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/AbstractSash.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CheckVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CheckVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CreateModelVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CreateModelVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Folder.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Folder.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/HSash.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/HSash.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryExp.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryExp.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryTerm.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryTerm.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/NoMatchException.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/NoMatchException.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Page.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Page.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/PanelTerm.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/PanelTerm.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryException.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryException.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQuery.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQuery.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQueryTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQueryTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/VSash.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/VSash.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/WindowTerm.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/WindowTerm.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/tests/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/tests/AllTests.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.classpath (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.classpath)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.project (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.project)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/META-INF/MANIFEST.MF (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/META-INF/MANIFEST.MF)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/about.html (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/about.html)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/build.properties (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/build.properties)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/fragment.properties (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/fragment.properties)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/fragment.xml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/fragment.xml)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/org.eclipse.papyrus.infra.core.sasheditor.tests.launch (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/org.eclipse.papyrus.infra.core.sasheditor.tests.launch)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/AbstractSashWindowContentProviderFacadeTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/AbstractSashWindowContentProviderFacadeTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageMngrTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageMngrTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/ISashWindowsContentProviderFacade.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/ISashWindowsContentProviderFacade.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/AllTests.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CheckVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CheckVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CreateModelInSimpleContentProviderVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CreateModelInSimpleContentProviderVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/QueryVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/QueryVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleContentProviderBaseVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleContentProviderBaseVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacade.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacade.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeCommonTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeCommonTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacade.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacade.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest2.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest2.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtils.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtils.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtilsTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtilsTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProviderTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProviderTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/AllTests.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/SashMultiPageEditorTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/SashMultiPageEditorTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/ShellEditor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/ShellEditor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/AllTests.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeFolderLifeCycleEventsListener.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeFolderLifeCycleEventsListener.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePageLifeCycleEventsListener.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePageLifeCycleEventsListener.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePagePart.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePagePart.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeTabFolderPart.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeTabFolderPart.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FolderLifeCycleEventsThrownFromContainerTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FolderLifeCycleEventsThrownFromContainerTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/PageLifeCycleEventsThrownFromContainerTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/PageLifeCycleEventsThrownFromContainerTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashContainerEventsProviderTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashContainerEventsProviderTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerDisposeCalledTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerDisposeCalledTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerMemoryLeakTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerMemoryLeakTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerRefreshTabsTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerRefreshTabsTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderListManagerTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderListManagerTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/AbstractSash.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/AbstractSash.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/BadNameException.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/BadNameException.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Folder.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Folder.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/HSash.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/HSash.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelExp.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelExp.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelObject.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelObject.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IPagesModelVisitor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IPagesModelVisitor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NoMatchException.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NoMatchException.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NotFoundException.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NotFoundException.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Page.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Page.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PagesModelException.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PagesModelException.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PanelTerm.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PanelTerm.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModel.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModel.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModelFactory.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModelFactory.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/VSash.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/VSash.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/WindowTerm.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/WindowTerm.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/package-info.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/package-info.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/AllTests.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/AllTests.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInput.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInput.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInputTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInputTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditorTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditorTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TestTextEditor.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TestTextEditor.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/ISashWindowsContentProviderTestUtils.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/ISashWindowsContentProviderTestUtils.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/LeakingObject.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/LeakingObject.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakTest.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakUtil.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakUtil.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/NonLeakingObject.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/NonLeakingObject.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/package-info.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/package-info.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/ITraceRecords.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/ITraceRecords.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/MultiValuesTraceRecord.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/MultiValuesTraceRecord.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/NullTraceRecords.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/NullTraceRecords.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/SimpleTraceRecord.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/SimpleTraceRecord.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceLogger.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceLogger.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecord.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecord.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecords.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecords.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecordsFactory.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecordsFactory.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/FakeObservableListener.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/FakeObservableListener.java)0
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/ObservableListTest.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/ObservableListTest.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.classpath)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.project)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/META-INF/MANIFEST.MF)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html (renamed from tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/about.html)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/build.properties)1
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/fragment.properties)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/org.eclipse.papyrus.core.resourceloading.tests.launch)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/.project)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/MyProfile.uml)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.di)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.notation)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.uml)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.di)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.notation)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.uml)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.di)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.notation)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.uml)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/.project)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.di)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.notation)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.uml)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.di)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.notation)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.uml)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java)0
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java (renamed from tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs8
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF29
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/about.html (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/about.html)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch41
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java65
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java32
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java22
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java44
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java251
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java154
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java47
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java99
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java87
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java154
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java149
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java145
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java62
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java108
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java71
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java38
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.classpath)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.project)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/META-INF/MANIFEST.MF)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/build.properties)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch)82
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/Activator.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/Activator.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/AllCanonicalTests.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/AllCanonicalTests.java)0
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java)2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java (renamed from tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java)2
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF32
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/build.properties9
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch41
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.xml22
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.di17
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.notation103
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.uml452
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java241
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/Activator.java63
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AllTests.java33
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AppliedProfileCommand.java47
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestLayoutWithStereotype.java807
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestProfileApplication.java52
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestStereotypeApplication.java317
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.classpath7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF36
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/about.html28
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties7
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/plugin.properties12
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java63
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java424
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java434
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java395
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java358
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java89
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java248
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java248
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java265
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java437
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java319
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java386
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java184
-rw-r--r--tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java47
252 files changed, 8454 insertions, 44 deletions
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.classpath b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.classpath
index 046bda900d2..046bda900d2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.classpath
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.classpath
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.project b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.project
index 65b43a58362..65b43a58362 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.project
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs
index 72532281a89..72532281a89 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/.settings/org.eclipse.jdt.core.prefs
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/META-INF/MANIFEST.MF
index 72d46afda17..72d46afda17 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/META-INF/MANIFEST.MF
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/OSGI-INF/l10n/bundle.properties b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/OSGI-INF/l10n/bundle.properties
index a5066a7037e..a5066a7037e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/OSGI-INF/l10n/bundle.properties
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/OSGI-INF/l10n/bundle.properties
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/about.html b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/about.html
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/about.html
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/build.properties b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/build.properties
index 2df796013bd..2df796013bd 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/build.properties
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/build.properties
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/org.eclipse.papyrus.sasheditor.di.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/org.eclipse.papyrus.sasheditor.di.tests.launch
index a0624255ff2..a0624255ff2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/org.eclipse.papyrus.sasheditor.di.tests.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/org.eclipse.papyrus.sasheditor.di.tests.launch
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngrTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngrTest.java
index f25751d4b96..f25751d4b96 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngrTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/DiSashModelMngrTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/FakeModelFactory.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/FakeModelFactory.java
index 5f18bc09626..5f18bc09626 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/FakeModelFactory.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/FakeModelFactory.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/AbstractDiContentProviderTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/AbstractDiContentProviderTest.java
index 8e17f77c1e0..8e17f77c1e0 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/AbstractDiContentProviderTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/AbstractDiContentProviderTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CheckVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CheckVisitor.java
index d0e8a6b105a..d0e8a6b105a 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CheckVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CheckVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/ContentChangeListener.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/ContentChangeListener.java
index 856058412db..856058412db 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/ContentChangeListener.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/ContentChangeListener.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CreateModelVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CreateModelVisitor.java
index 784bbeba21b..784bbeba21b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CreateModelVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/CreateModelVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProvider2Test.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProvider2Test.java
index 8e6020259fb..8e6020259fb 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProvider2Test.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProvider2Test.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderBaseVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderBaseVisitor.java
index c81ee1818fd..c81ee1818fd 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderBaseVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderBaseVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacade.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacade.java
index 82677ca3e8d..82677ca3e8d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacade.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacade.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacadeTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacadeTest.java
index 66d662675a5..66d662675a5 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacadeTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderFacadeTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderTest.java
index bd096cc83a0..bd096cc83a0 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/DiContentProviderTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/FakePageModelFactory.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/FakePageModelFactory.java
index 152b4654da1..152b4654da1 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/FakePageModelFactory.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/FakePageModelFactory.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageMngrImplTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageMngrImplTest.java
index 3e9e22e2325..3e9e22e2325 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageMngrImplTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/PageMngrImplTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/QueryVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/QueryVisitor.java
index 0d3b5006ade..0d3b5006ade 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/QueryVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/QueryVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/SashContainerModels.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/SashContainerModels.java
index fd881050514..fd881050514 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/SashContainerModels.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/SashContainerModels.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/TransactionalDiContentProvider2Test.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/TransactionalDiContentProvider2Test.java
index 3cf23254804..3cf23254804 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/TransactionalDiContentProvider2Test.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/contentprovider/internal/TransactionalDiContentProvider2Test.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/AbstractSash.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/AbstractSash.java
index 6d7dafccfac..6d7dafccfac 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/AbstractSash.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/AbstractSash.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CheckVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CheckVisitor.java
index c85b51ced4c..c85b51ced4c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CheckVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CheckVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CreateModelVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CreateModelVisitor.java
index 6f8b51d92d8..6f8b51d92d8 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CreateModelVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/CreateModelVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Folder.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Folder.java
index bbc0ccf7192..bbc0ccf7192 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Folder.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Folder.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/HSash.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/HSash.java
index f6246370437..f6246370437 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/HSash.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/HSash.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryExp.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryExp.java
index 82c67c8dbce..82c67c8dbce 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryExp.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryExp.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryTerm.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryTerm.java
index 86865a79271..86865a79271 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryTerm.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryTerm.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryVisitor.java
index 804a9f5289f..804a9f5289f 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/IQueryVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/NoMatchException.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/NoMatchException.java
index 6a6af1c79e7..6a6af1c79e7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/NoMatchException.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/NoMatchException.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Page.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Page.java
index b709a4e74c4..b709a4e74c4 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Page.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/Page.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/PanelTerm.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/PanelTerm.java
index c04cf02c4e2..c04cf02c4e2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/PanelTerm.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/PanelTerm.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryException.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryException.java
index 698301dcc9d..698301dcc9d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryException.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryException.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryVisitor.java
index 5e6aaba10bf..5e6aaba10bf 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/QueryVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQuery.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQuery.java
index 7d98b85d88b..7d98b85d88b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQuery.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQuery.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQueryTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQueryTest.java
index 014eac32d1f..014eac32d1f 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQueryTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/SashModelQueryTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/VSash.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/VSash.java
index e1d258fe8f7..e1d258fe8f7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/VSash.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/VSash.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/WindowTerm.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/WindowTerm.java
index 7749d26d99a..7749d26d99a 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/WindowTerm.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/sashmodel/query/WindowTerm.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/tests/AllTests.java
index 3eadad75992..3eadad75992 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.di.tests/test/org/eclipse/papyrus/infra/core/sasheditor/di/tests/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.classpath b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.classpath
index 046bda900d2..046bda900d2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/.classpath
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.classpath
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.project b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.project
index 13ca6a9419b..13ca6a9419b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.project
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs
index 70803840e5e..70803840e5e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/.settings/org.eclipse.jdt.core.prefs
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/META-INF/MANIFEST.MF
index 6369a07258f..6369a07258f 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/META-INF/MANIFEST.MF
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/about.html b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.di.tests/about.html
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/about.html
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/build.properties b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/build.properties
index 266dcb24bf6..266dcb24bf6 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/build.properties
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/build.properties
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/fragment.properties b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/fragment.properties
index 195f10e33bb..195f10e33bb 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/fragment.properties
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/fragment.properties
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/fragment.xml b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/fragment.xml
index 882b613cbe1..882b613cbe1 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/fragment.xml
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/fragment.xml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/org.eclipse.papyrus.infra.core.sasheditor.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/org.eclipse.papyrus.infra.core.sasheditor.tests.launch
index ee8116d51a3..ee8116d51a3 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/org.eclipse.papyrus.infra.core.sasheditor.tests.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/org.eclipse.papyrus.infra.core.sasheditor.tests.launch
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/AbstractSashWindowContentProviderFacadeTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/AbstractSashWindowContentProviderFacadeTest.java
index 4f75964c4e1..4f75964c4e1 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/AbstractSashWindowContentProviderFacadeTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/AbstractSashWindowContentProviderFacadeTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageMngrTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageMngrTest.java
index b4dab94ba55..b4dab94ba55 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageMngrTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/IPageMngrTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/ISashWindowsContentProviderFacade.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/ISashWindowsContentProviderFacade.java
index 46c057284e4..46c057284e4 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/ISashWindowsContentProviderFacade.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/ISashWindowsContentProviderFacade.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/AllTests.java
index 21aedcb434b..21aedcb434b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CheckVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CheckVisitor.java
index 1c33b4ae10d..1c33b4ae10d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CheckVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CheckVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CreateModelInSimpleContentProviderVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CreateModelInSimpleContentProviderVisitor.java
index 1987f1b0322..1987f1b0322 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CreateModelInSimpleContentProviderVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/CreateModelInSimpleContentProviderVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java
index 095f6774e71..095f6774e71 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/FakePageModel.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/QueryVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/QueryVisitor.java
index a44ba367f40..a44ba367f40 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/QueryVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/QueryVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleContentProviderBaseVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleContentProviderBaseVisitor.java
index d84f0399f0d..d84f0399f0d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleContentProviderBaseVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleContentProviderBaseVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacade.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacade.java
index 5f6fcdf1fcf..5f6fcdf1fcf 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacade.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacade.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeCommonTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeCommonTest.java
index fe1c269c852..fe1c269c852 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeCommonTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeCommonTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeTest.java
index 255bdef7a26..255bdef7a26 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContainerTestFacadeTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacade.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacade.java
index bfc1716e58d..bfc1716e58d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacade.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacade.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest.java
index f633f705aa4..f633f705aa4 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest2.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest2.java
index a27b626cd94..a27b626cd94 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest2.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderFacadeTest2.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtils.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtils.java
index 57e3a539b50..57e3a539b50 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtils.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtils.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtilsTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtilsTest.java
index 2c3ee148e8d..2c3ee148e8d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtilsTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowContentProviderUtilsTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProviderTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProviderTest.java
index 9c7e183c644..9c7e183c644 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProviderTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/contentprovider/simple/SimpleSashWindowsContentProviderTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/AllTests.java
index f1eb15bd6d7..f1eb15bd6d7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java
index 48743bbda55..48743bbda55 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/FakeEditorModel.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java
index 89961918174..89961918174 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/MessagePartModel.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/SashMultiPageEditorTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/SashMultiPageEditorTest.java
index b6d7bf23fd9..b6d7bf23fd9 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/SashMultiPageEditorTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/SashMultiPageEditorTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/ShellEditor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/ShellEditor.java
index 9d9f754fda6..9d9f754fda6 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/ShellEditor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/editor/ShellEditor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/AllTests.java
index c231b9c33bd..c231b9c33bd 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeFolderLifeCycleEventsListener.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeFolderLifeCycleEventsListener.java
index 5dbff211240..5dbff211240 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeFolderLifeCycleEventsListener.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeFolderLifeCycleEventsListener.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePageLifeCycleEventsListener.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePageLifeCycleEventsListener.java
index 1623d3f843e..1623d3f843e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePageLifeCycleEventsListener.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePageLifeCycleEventsListener.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePagePart.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePagePart.java
index e75eddb62b7..e75eddb62b7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePagePart.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakePagePart.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeTabFolderPart.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeTabFolderPart.java
index f1f823a595e..f1f823a595e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeTabFolderPart.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FakeTabFolderPart.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FolderLifeCycleEventsThrownFromContainerTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FolderLifeCycleEventsThrownFromContainerTest.java
index 1cb877459b3..1cb877459b3 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FolderLifeCycleEventsThrownFromContainerTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/FolderLifeCycleEventsThrownFromContainerTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/PageLifeCycleEventsThrownFromContainerTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/PageLifeCycleEventsThrownFromContainerTest.java
index 7dca3c11dfc..7dca3c11dfc 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/PageLifeCycleEventsThrownFromContainerTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/PageLifeCycleEventsThrownFromContainerTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashContainerEventsProviderTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashContainerEventsProviderTest.java
index 913d54bc1e4..913d54bc1e4 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashContainerEventsProviderTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashContainerEventsProviderTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerDisposeCalledTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerDisposeCalledTest.java
index 1473bde4420..1473bde4420 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerDisposeCalledTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerDisposeCalledTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerMemoryLeakTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerMemoryLeakTest.java
index 1cec9c76af5..1cec9c76af5 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerMemoryLeakTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerMemoryLeakTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerRefreshTabsTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerRefreshTabsTest.java
index 20b2b8562a9..20b2b8562a9 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerRefreshTabsTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerRefreshTabsTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerTest.java
index fdf3c67b4d0..fdf3c67b4d0 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/SashWindowsContainerTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderListManagerTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderListManagerTest.java
index 227aa9c6949..227aa9c6949 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderListManagerTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/internal/TabFolderListManagerTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/AbstractSash.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/AbstractSash.java
index 0d1cfcd8c1c..0d1cfcd8c1c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/AbstractSash.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/AbstractSash.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/BadNameException.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/BadNameException.java
index 3c5c56528aa..3c5c56528aa 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/BadNameException.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/BadNameException.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Folder.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Folder.java
index abcae95d7db..abcae95d7db 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Folder.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Folder.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/HSash.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/HSash.java
index cbaedf11103..cbaedf11103 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/HSash.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/HSash.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelExp.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelExp.java
index 83654ea81f8..83654ea81f8 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelExp.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelExp.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelObject.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelObject.java
index e16bfd38324..e16bfd38324 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelObject.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IModelObject.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IPagesModelVisitor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IPagesModelVisitor.java
index 3d9ac3b46d1..3d9ac3b46d1 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IPagesModelVisitor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/IPagesModelVisitor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NoMatchException.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NoMatchException.java
index 3a3fcc211f7..3a3fcc211f7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NoMatchException.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NoMatchException.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NotFoundException.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NotFoundException.java
index eeca81273f3..eeca81273f3 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NotFoundException.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/NotFoundException.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Page.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Page.java
index 5bd2fa904bb..5bd2fa904bb 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Page.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/Page.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PagesModelException.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PagesModelException.java
index 912da20781e..912da20781e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PagesModelException.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PagesModelException.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PanelTerm.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PanelTerm.java
index bd1d79b05bf..bd1d79b05bf 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PanelTerm.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/PanelTerm.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModel.java
index a08aa1521f6..a08aa1521f6 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModel.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModel.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModelFactory.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModelFactory.java
index c29154cafd3..c29154cafd3 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModelFactory.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/SashPagesModelFactory.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/VSash.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/VSash.java
index f3e020c216b..f3e020c216b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/VSash.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/VSash.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/WindowTerm.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/WindowTerm.java
index 27399c58c99..27399c58c99 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/WindowTerm.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/WindowTerm.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/package-info.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/package-info.java
index cdc2289dac8..cdc2289dac8 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/package-info.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/pagesmodel/package-info.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/AllTests.java
index b8e961a87e7..b8e961a87e7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/AllTests.java
index fdaacf9cc97..fdaacf9cc97 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInput.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInput.java
index 6f3d734817c..6f3d734817c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInput.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInput.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInputTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInputTest.java
index 3f86e9bf682..3f86e9bf682 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInputTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeEditorInputTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditor.java
index 2136d09e0d2..2136d09e0d2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditorTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditorTest.java
index 2f16a08158b..2f16a08158b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditorTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/FakeMultiSashPageEditorTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TestTextEditor.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TestTextEditor.java
index ee1eee01e96..ee1eee01e96 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TestTextEditor.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TestTextEditor.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java
index 3b050c935f4..3b050c935f4 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/texteditor/TextEditorPartModel.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/ISashWindowsContentProviderTestUtils.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/ISashWindowsContentProviderTestUtils.java
index d647f9bc261..d647f9bc261 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/ISashWindowsContentProviderTestUtils.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/ISashWindowsContentProviderTestUtils.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/LeakingObject.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/LeakingObject.java
index 4a49d9eb622..4a49d9eb622 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/LeakingObject.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/LeakingObject.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakTest.java
index ffec1460fcb..ffec1460fcb 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakUtil.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakUtil.java
index e235cc7947c..e235cc7947c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakUtil.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/MemoryLeakUtil.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/NonLeakingObject.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/NonLeakingObject.java
index cb5b097624c..cb5b097624c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/NonLeakingObject.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/memoryleak/NonLeakingObject.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/package-info.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/package-info.java
index ee1b85d4846..ee1b85d4846 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/package-info.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/package-info.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/ITraceRecords.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/ITraceRecords.java
index ff263804187..ff263804187 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/ITraceRecords.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/ITraceRecords.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/MultiValuesTraceRecord.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/MultiValuesTraceRecord.java
index cc884399549..cc884399549 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/MultiValuesTraceRecord.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/MultiValuesTraceRecord.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/NullTraceRecords.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/NullTraceRecords.java
index 251a5907489..251a5907489 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/NullTraceRecords.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/NullTraceRecords.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/SimpleTraceRecord.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/SimpleTraceRecord.java
index 1abaeb4698c..1abaeb4698c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/SimpleTraceRecord.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/SimpleTraceRecord.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceLogger.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceLogger.java
index 30283cdd036..30283cdd036 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceLogger.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceLogger.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecord.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecord.java
index 84b3ca10a03..84b3ca10a03 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecord.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecord.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecords.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecords.java
index 0a03007d24e..0a03007d24e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecords.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecords.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecordsFactory.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecordsFactory.java
index 6f39ee9295f..6f39ee9295f 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecordsFactory.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/tests/utils/trace/TraceRecordsFactory.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/FakeObservableListener.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/FakeObservableListener.java
index fb123b1d04c..fb123b1d04c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/FakeObservableListener.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/FakeObservableListener.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/ObservableListTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/ObservableListTest.java
index b46062e7339..b46062e7339 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/ObservableListTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.sasheditor.tests/test/org/eclipse/papyrus/infra/core/sasheditor/utils/ObservableListTest.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.classpath b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath
index 046bda900d2..046bda900d2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/.classpath
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.classpath
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project
index 62a3598e06b..62a3598e06b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.project
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs
index 309162d9621..309162d9621 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/.settings/org.eclipse.jdt.core.prefs
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
index a89b24d6662..a89b24d6662 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/META-INF/MANIFEST.MF
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/about.html b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.sasheditor.tests/about.html
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/about.html
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/build.properties b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties
index aa6aedc5e7d..258671abad7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/build.properties
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/build.properties
@@ -4,6 +4,5 @@ bin.includes = META-INF/,\
.,\
resources/,\
about.html,\
- org.eclipse.papyrus.infra.services.resourceloading.tests.launch,\
fragment.properties
src.includes = about.html
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/fragment.properties b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties
index cf08034680c..cf08034680c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/fragment.properties
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/fragment.properties
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/org.eclipse.papyrus.core.resourceloading.tests.launch b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch
index 338926f415c..338926f415c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/org.eclipse.papyrus.core.resourceloading.tests.launch
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/org.eclipse.papyrus.infra.services.resourceloading.tests.launch
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project
index 60eef8df6e7..60eef8df6e7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/.project
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/.project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/MyProfile.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml
index c3524336a36..c3524336a36 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/MyProfile.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/MyProfile.uml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di
index e35f85b923b..e35f85b923b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.di
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.di
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation
index 372817a8170..372817a8170 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.notation
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.notation
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml
index a2ead3dc006..a2ead3dc006 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package0.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package0.uml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di
index ddfa664795e..ddfa664795e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.di
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.di
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation
index 109887dc0ac..109887dc0ac 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.notation
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.notation
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml
index 6431ba3eaf2..6431ba3eaf2 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/Package1.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/Package1.uml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di
index 68d5842e5b9..68d5842e5b9 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.di
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.di
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation
index 3a28d25c9e9..3a28d25c9e9 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.notation
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.notation
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml
index b4f1e6cdb0c..b4f1e6cdb0c 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel1/model1.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel1/model1.uml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project
index d4d9e708148..d4d9e708148 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/.project
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/.project
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di
index 266051e4f6f..266051e4f6f 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.di
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.di
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation
index c4c0c25efd6..c4c0c25efd6 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.notation
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.notation
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml
index 718bae12387..718bae12387 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/Package0.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/Package0.uml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di
index fb8791b258e..fb8791b258e 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.di
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.di
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation
index 46538a70935..46538a70935 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.notation
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.notation
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml
index b793bcb792d..b793bcb792d 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/resources/TestModel2/model1.uml
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/resources/TestModel2/model1.uml
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java
index f7cbe867416..f7cbe867416 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/AllTests.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java
index 06141cd1ab3..06141cd1ab3 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/StrategyChooserFixture.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
index 274a5775014..274a5775014 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
index 91ca9501c80..91ca9501c80 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/AbstractResourceLoadingTestModel2.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java
index 097ceba74c5..097ceba74c5 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy0TestModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java
index 3db1a6152b3..3db1a6152b3 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy1TestModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java
index d7ae77535e7..d7ae77535e7 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel1/Strategy2TestModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java
index 01f4873b394..01f4873b394 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/AbstractResourceLoadingTestModel2.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java
index 49c29b3b23b..49c29b3b23b 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/ITestConstants.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java
index 88043fe0c42..88043fe0c42 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java
index 47d6b3e8704..47d6b3e8704 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy0TestModel2WithPackage0.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java
index 02b925daabe..02b925daabe 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java
index ec920fd866a..ec920fd866a 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy1TestModel2WithPackage0.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java
index 682e2fe6332..682e2fe6332 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithModel1.java
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java
index c38ae72b655..c38ae72b655 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.core.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests/test/org/eclipse/papyrus/infra/services/resourceloading/tests/testModel2/Strategy2TestModel2WithPackage0.java
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.classpath
new file mode 100644
index 00000000000..046bda900d2
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.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/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="test"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project
new file mode 100644
index 00000000000..2bc5e35c213
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.clazz.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/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..92b4d8fe254
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,8 @@
+#Thu Jan 14 09:42:02 CET 2010
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..0aaad09090c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,29 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.editor;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.tests;bundle-version="1.0.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
+Export-Package: org.eclipse.papyrus.uml.diagram.clazz.test,
+ org.eclipse.papyrus.uml.diagram.clazz.test.canonical,
+ org.eclipse.papyrus.uml.diagram.clazz.test.load
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.clazz.test.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.clazz.tests
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/about.html
index 82d49bf5f81..82d49bf5f81 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/about.html
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties
new file mode 100644
index 00000000000..561871b3a7a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = test/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ org.eclipse.papyrus.uml.diagram.clazz.test.launch,\
+ plugin.properties
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch
new file mode 100644
index 00000000000..5a2b2664bd4
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/org.eclipse.papyrus.diagram.clazz.test.launch
@@ -0,0 +1,41 @@
+<?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"/>
+<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.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/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"/>
+<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.diagram.clazz.test.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.diagram.clazz.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms256m -Xmx1024m -XX:PermSize=64m -XX:MaxPermSize=256m"/>
+<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/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties
new file mode 100644
index 00000000000..2e8300d859c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Papyrus Class Diagram Test (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
new file mode 100644
index 00000000000..d24df4f6bed
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/Activator.java
@@ -0,0 +1,65 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.diagram.clazz.tests";
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ @Override
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
new file mode 100644
index 00000000000..54edde00ee1
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/AllTests.java
@@ -0,0 +1,32 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test;
+
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AllCanonicalTests;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+// canonical
+AllCanonicalTests.class,
+// load
+//LoadTests.class
+})
+public class AllTests {
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java
new file mode 100644
index 00000000000..9717ae52359
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/IClassDiagramTestsConstants.java
@@ -0,0 +1,22 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test;
+
+public interface IClassDiagramTestsConstants {
+
+ /** name of the test project */
+ public final String PROJECT_NAME = "ClassDiagramTestProject";
+
+ /** name of the test model */
+ public final String FILE_NAME = "ClassDiagramTest.di";
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java
new file mode 100644
index 00000000000..4a15c471cbd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AbstractPapyrusTestCase.java
@@ -0,0 +1,28 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+
+/**
+ * The Class AbstractPapyrusTestCase.
+ */
+public abstract class AbstractPapyrusTestCase extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
new file mode 100644
index 00000000000..51777105157
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/AllCanonicalTests.java
@@ -0,0 +1,44 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) remi.schnekenburger@cea.fr - Initial API and implementation
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All test in canonical package
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+// top nodes
+TestClassDiagramTopNode.class,
+// child nodes
+TestClassDiagramChildNode.class,
+//labelNodes
+TestClassDiagramChildLabel.class,
+//test links
+TestClassDiagramLink.class,
+//test links owned by source
+TestClassDiagramLinkOwnedBySource.class,
+// multilinks
+TestMutliLink.class,
+//containmentLink
+TestClassDiagramContainment.class,
+//test the order for the drop
+TestDropfunction.class,
+//test is a static operation is underlined
+TestStaticFeatureRepresentation.class,
+//test nested classifier
+TestClassDiagramNestedClassifier.class, })
+public class AllCanonicalTests {
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
new file mode 100644
index 00000000000..68949229ef2
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildLabel.java
@@ -0,0 +1,251 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ * Nizar GUEDIDI (CEA LIST) - Add tests for Primitive Type properties and operations
+ * Nizar GUEDIDI (CEA LIST) - Add tests for nested classifier compartments
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentNestedClassifierCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InstanceSpecificationSlotCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceNestedClassifierCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PrimitiveTypeOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SignalAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TestClassDiagramChildLabel.
+ */
+public class TestClassDiagramChildLabel extends TestChildLabel {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Test
+ public void testToManageInstanceSlot() {
+ //instance specification
+ testToManageTopNode(UMLElementTypes.InstanceSpecification_2001, UMLElementTypes.Slot_3030, InstanceSpecificationSlotCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentProperty() {
+ //instance specification
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Property_3002, ComponentAttributeCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedClass() {
+ //Class
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Class_3004, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedInterface() {
+ //Interface
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Interface_3037, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedSignal() {
+ //Signal
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Signal_3051, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedDataType() {
+ //Data Type
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.DataType_3045, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Enumeration_3053, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedPrimitiveType() {
+ //primitive Type
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.PrimitiveType_3046, ComponentNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentOperation() {
+ //instance specification
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Operation_3003, ComponentOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageSignalProperty() {
+ //instance specification
+ testToManageTopNode(UMLElementTypes.Signal_2003, UMLElementTypes.Property_3005, SignalAttributeCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceProperty() {
+ //interface
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Property_3006, InterfaceAttributeCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceOperation() {
+ //interface
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Operation_3007, InterfaceOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedClass() {
+ //Class
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Class_3008, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedInterface() {
+ //Interface
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Interface_3038, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedSignal() {
+ //Signal
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Signal_3049, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedDataType() {
+ //Data Type
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.DataType_3043, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Enumeration_3054, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedPrimitiveType() {
+ //Primitive Type
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.PrimitiveType_3048, InterfaceNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageEnumerationLiteralEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Enumeration_2006, UMLElementTypes.EnumerationLiteral_3017, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassProperty() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Property_3012, ClassAttributeCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassReception() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Reception_3011, ClassOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassOperation() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Operation_3013, ClassOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedClass() {
+ //class
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Class_3014, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedInetrface() {
+ //Interface
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Interface_3036, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedSignal() {
+ //Signal
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Signal_3050, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedDataType() {
+ //Data Type
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.DataType_3044, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.Enumeration_3052, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedPrimitiveType() {
+ //Primitive Type
+ testToManageTopNode(UMLElementTypes.Class_2008, UMLElementTypes.PrimitiveType_3047, ClassNestedClassifierCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentReception() {
+ //class
+ testToManageTopNode(UMLElementTypes.Component_2002, UMLElementTypes.Reception_3011, ComponentOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceReception() {
+ //class
+ testToManageTopNode(UMLElementTypes.Interface_2004, UMLElementTypes.Reception_3039, InterfaceOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManagePrimitiveTypeProperty() {
+ //class
+ testToManageTopNode(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Property_3041, PrimitiveTypeAttributeCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManagePrimitiveTypeOperation() {
+ //class
+ testToManageTopNode(UMLElementTypes.PrimitiveType_2009, UMLElementTypes.Operation_3042, PrimitiveTypeOperationCompartmentEditPart.VISUAL_ID);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
new file mode 100644
index 00000000000..e8d1c852b39
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramChildNode.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildNode;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramChildNode.
+ */
+public class TestClassDiagramChildNode extends TestChildNode {
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isSemanticTest() {
+ return true;
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageComponent() {
+ testToManageChildNode(UMLElementTypes.Component_3021, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage instance specification.
+ */
+ @Test
+ public void testToManageInstanceSpecification() {
+ testToManageChildNode(UMLElementTypes.InstanceSpecification_3020, UMLPackage.eINSTANCE.getInstanceSpecification(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage signal.
+ */
+ @Test
+ public void testToManageSignal() {
+ testToManageChildNode(UMLElementTypes.Signal_3022, UMLPackage.eINSTANCE.getSignal(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage model.
+ */
+ @Test
+ public void testToManageModel() {
+ testToManageChildNode(UMLElementTypes.Model_3024, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage enumeration.
+ */
+ @Test
+ public void testToManageEnumeration() {
+ testToManageChildNode(UMLElementTypes.Enumeration_3025, UMLPackage.eINSTANCE.getEnumeration(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage i package.
+ */
+ @Test
+ public void testToManageIPackage() {
+ testToManageChildNode(UMLElementTypes.Package_3009, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage class.
+ */
+ @Test
+ public void testToManageClass() {
+ testToManageChildNode(UMLElementTypes.Class_3010, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage InforamtionItem.
+ */
+ @Test
+ public void testToManageInformationItem() {
+ testToManageChildNode(UMLElementTypes.InformationItem_3040, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage primitive type.
+ */
+ @Test
+ public void testToManagePrimitiveType() {
+ testToManageChildNode(UMLElementTypes.PrimitiveType_3026, UMLPackage.eINSTANCE.getPrimitiveType(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage data type.
+ */
+ @Test
+ public void testToManageDataType() {
+ testToManageChildNode(UMLElementTypes.DataType_3027, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage constraint.
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageChildNode(UMLElementTypes.Constraint_3029, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_3009, true);
+ }
+
+ /**
+ * Test to manage comment.
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageChildNode(UMLElementTypes.Comment_3028, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_3009, true);
+ }
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
new file mode 100644
index 00000000000..98bda5c2338
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramContainment.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestContainmentLink;
+import org.junit.Test;
+
+public class TestClassDiagramContainment extends TestContainmentLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to manage containmentLink.
+ */
+ @Test
+ public void testToManageContainment() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Link_4023, UMLElementTypes.Package_2007);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
new file mode 100644
index 00000000000..c8f0a4b20fd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLink.java
@@ -0,0 +1,99 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramLink use to test link that are contained by the owner of the target and the source
+ */
+public class TestClassDiagramLink extends TestLink {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageDependency() {
+ testToManageLink(UMLElementTypes.Component_2002, UMLElementTypes.Component_2002, UMLElementTypes.Dependency_4008, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage Association.
+ */
+ @Test
+ public void testToManageAssociation() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Association_4001, UMLElementTypes.Package_2007, true);
+ }
+
+ //test generatlization
+ //test interfaceRealization
+ //test substitution
+ /**
+ * Test to manage Realization
+ */
+ @Test
+ public void testToManageRealization() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Realization_4005, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage Abstraction
+ */
+ @Test
+ public void testToManageAbstraction() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Abstraction_4006, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage Usage
+ */
+ @Test
+ public void testToManageUsage() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Usage_4007, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage Usage
+ */
+ @Test
+ public void testToManageInformationFlow() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.InformationFlow_4026, UMLElementTypes.Package_2007, true);
+ }
+ //test Element import
+ //testPackageImport
+ //test comment link
+ //test constraintLink
+ //test template binding
+ //test instancespecificationLink
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
new file mode 100644
index 00000000000..4e4a6fb946f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramLinkOwnedBySource.java
@@ -0,0 +1,87 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestLinkOwnedBySource;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramLink use to test link that are contained by the owner of the target and the source
+ */
+public class TestClassDiagramLinkOwnedBySource extends TestLinkOwnedBySource {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to manage Association.
+ */
+ @Test
+ public void testToManageGeneralization() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Generalization_4002, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage InterfaceRealization.
+ */
+ @Test
+ public void testToManageInterfaceRealization() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Interface_2004, UMLElementTypes.InterfaceRealization_4003, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage Substitution.
+ */
+ @Test
+ public void testToManageSubstitution() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.Substitution_4004, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage ElementImport.
+ */
+ @Test
+ public void testToManageElementImport() {
+ testToManageLink(UMLElementTypes.Class_2008, UMLElementTypes.Class_2008, UMLElementTypes.ElementImport_4009, UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage ElementImport.
+ */
+ @Test
+ public void testToManagePackageImport() {
+ testToManageLink(UMLElementTypes.Package_2007, UMLElementTypes.Package_2007, UMLElementTypes.PackageImport_4010, UMLElementTypes.Package_2007, true);
+ }
+ //test comment link
+ //test constraintLink
+ //test template binding
+ //test containment link
+ //test instancespecificationLink
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java
new file mode 100644
index 00000000000..7f54bf1fe29
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramNestedClassifier.java
@@ -0,0 +1,154 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassNestedClassifierCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ComponentNestedClassifierCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceNestedClassifierCompartmentEditPartCN;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackagePackageableElementCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestNested;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramNestedClassifier.
+ */
+public class TestClassDiagramNestedClassifier extends TestNested {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Test
+ public void testToManageComponentNestedClass() {
+ //Class
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Class_3004, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedInterface() {
+ //Interface
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Interface_3037, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedSignal() {
+ //Signal
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Signal_3051, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedDataType() {
+ //Data Type
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.DataType_3045, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.Enumeration_3053, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageComponentNestedPrimitiveType() {
+ //primitive Type
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Component_3021, UMLElementTypes.PrimitiveType_3046, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ComponentNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedClass() {
+ //Class
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Class_3008, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedInterface() {
+ //Interface
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Interface_3038, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedSignal() {
+ //Signal
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Signal_3049, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedDataType() {
+ //Data Type
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.DataType_3043, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.Enumeration_3054, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageInterfaceNestedPrimitiveType() {
+ //Primitive Type
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Interface_3023, UMLElementTypes.PrimitiveType_3048, PackagePackageableElementCompartmentEditPart.VISUAL_ID, InterfaceNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedClass() {
+ //class
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Class_3014, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedInetrface() {
+ //Interface
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Interface_3036, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedSignal() {
+ //Signal
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Signal_3050, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedDataType() {
+ //Data Type
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.DataType_3044, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageclassNestedEnumeration() {
+ //Enumeration
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.Enumeration_3052, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+
+ @Test
+ public void testToManageClassNestedPrimitiveType() {
+ //Primitive Type
+ testToManageTopNode(UMLElementTypes.Package_2007, UMLElementTypes.Class_3010, UMLElementTypes.PrimitiveType_3047, PackagePackageableElementCompartmentEditPart.VISUAL_ID, ClassNestedClassifierCompartmentEditPartCN.VISUAL_ID);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
new file mode 100644
index 00000000000..d4a726b98d0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestClassDiagramTopNode.java
@@ -0,0 +1,149 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestTopNode;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * The Class TestClassDiagramTopNode.
+ */
+public class TestClassDiagramTopNode extends TestTopNode {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageComponent() {
+ testToManageNode(UMLElementTypes.Component_2002, UMLPackage.eINSTANCE.getComponent(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage instance specification.
+ */
+ @Test
+ public void testToManageInstanceSpecification() {
+ testToManageNode(UMLElementTypes.InstanceSpecification_2001, UMLPackage.eINSTANCE.getInstanceSpecification(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage signal.
+ */
+ @Test
+ public void testToManageSignal() {
+ testToManageNode(UMLElementTypes.Signal_2003, UMLPackage.eINSTANCE.getSignal(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage model.
+ */
+ @Test
+ public void testToManageModel() {
+ testToManageNode(UMLElementTypes.Model_2005, UMLPackage.eINSTANCE.getModel(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage enumeration.
+ */
+ @Test
+ public void testToManageEnumeration() {
+ testToManageNode(UMLElementTypes.Enumeration_2006, UMLPackage.eINSTANCE.getEnumeration(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage i package.
+ */
+ @Test
+ public void testToManageIPackage() {
+ testToManageNode(UMLElementTypes.Package_2007, UMLPackage.eINSTANCE.getPackage(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage class.
+ */
+ @Test
+ public void testToManageClass() {
+ testToManageNode(UMLElementTypes.Class_2008, UMLPackage.eINSTANCE.getClass_(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage primitive type.
+ */
+ @Test
+ public void testToManagePrimitiveType() {
+ testToManageNode(UMLElementTypes.PrimitiveType_2009, UMLPackage.eINSTANCE.getPrimitiveType(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage data type.
+ */
+ @Test
+ public void testToManageDataType() {
+ testToManageNode(UMLElementTypes.DataType_2010, UMLPackage.eINSTANCE.getDataType(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage constraint.
+ */
+ @Test
+ public void testToManageConstraint() {
+ testToManageNode(UMLElementTypes.Constraint_2011, UMLPackage.eINSTANCE.getConstraint(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage comment.
+ */
+ @Test
+ public void testToManageComment() {
+ testToManageNode(UMLElementTypes.Comment_2012, UMLPackage.eINSTANCE.getComment(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * Test to manage component.
+ */
+ @Test
+ public void testToManageInformationItem() {
+ testToManageNode(UMLElementTypes.InformationItem_2099, UMLPackage.eINSTANCE.getInformationItem(), UMLElementTypes.Package_2007, true);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Package_2007, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
new file mode 100644
index 00000000000..79b25e3f465
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestDropfunction.java
@@ -0,0 +1,145 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.EnumerationEnumerationLiteralCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Test;
+
+/**
+ * test in order to verify if the drop respect the order of the selection
+ * Create an enumeration, create subenumerationliterals, select them, drop into the diagram
+ * the order of enumeration list has to be the same that as the list in the request drop.
+ *
+ */
+public class TestDropfunction extends TestChildLabel {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ public static int MAX = 20;
+
+ @Test
+ public void testDropWithOrder() {
+ testToCreateATopNode(UMLElementTypes.Enumeration_2006);
+ testToCreateSetOfNode(UMLElementTypes.EnumerationLiteral_3017, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID);
+ testSetOfDrop(UMLElementTypes.EnumerationLiteral_3017, EnumerationEnumerationLiteralCompartmentEditPart.VISUAL_ID);
+ }
+
+ protected void testToCreateSetOfNode(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ for(int i = 0; i < MAX; i++) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ //creation of label
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ //deletion view
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ protected void testSetOfDrop(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //DROP
+ assertTrue(DROP + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == MAX);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ for(int i = 0; i < MAX; i++) {
+ list.add(getRootSemanticModel().getOwnedElements().get(i));
+ }
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = compartment.getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, compartment.getChildren().size() == MAX);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == MAX);
+ for(int i = 0; i < MAX; i++) {
+ assertEquals(getRootSemanticModel().getOwnedElements().get(i), ((GraphicalEditPart)compartment.getChildren().get(i)).resolveSemanticElement());
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java
new file mode 100644
index 00000000000..0ec49540f5f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestMutliLink.java
@@ -0,0 +1,62 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractTestMultiLink;
+import org.junit.Test;
+
+public class TestMutliLink extends AbstractTestMultiLink {
+
+ @Override
+ protected CreateViewRequest createViewRequestShapeContainer() {
+ // TODO Auto-generated method stub
+ return CreateViewRequestFactory.getCreateShapeRequest(UMLElementTypes.Class_2008, getDiagramEditPart().getDiagramPreferencesHint());
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to manage dependency.
+ */
+ @Test
+ public void testToManageMultiDependency() {
+ testToManageMultiLink(UMLElementTypes.Dependency_4008, UMLElementTypes.Dependency_4018, true);
+ }
+
+ /**
+ * Test to manage multiassociation.
+ */
+ @Test
+ public void testToManageMultiAssociation() {
+ testToManageMultiLink(UMLElementTypes.Association_4001, UMLElementTypes.Association_4019, false);
+ }
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
new file mode 100644
index 00000000000..4ccad3cebf8
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/canonical/TestStaticFeatureRepresentation.java
@@ -0,0 +1,108 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.text.FlowPage;
+import org.eclipse.emf.edit.command.SetCommand;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.commands.wrappers.EMFtoGMFCommandWrapper;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassAttributeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassOperationCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.common.editparts.UMLCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildLabel;
+import org.eclipse.uml2.uml.Feature;
+import org.eclipse.uml2.uml.UMLPackage;
+import org.junit.Test;
+
+/**
+ * this class is used to test if feature are a representation for static
+ *
+ */
+public class TestStaticFeatureRepresentation extends TestChildLabel {
+
+ @Override
+ protected ICreationCommand getDiagramCommandCreation() {
+ return new CreateClassDiagramCommand();
+ }
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ @Test
+ public void testStaticOperation() {
+ testToCreateATopNode(UMLElementTypes.Class_2008);
+ testToTestStaticoperation(UMLElementTypes.Operation_3013, ClassOperationCompartmentEditPart.VISUAL_ID);
+ }
+
+ @Test
+ public void testStaticProperty() {
+ testToCreateATopNode(UMLElementTypes.Class_2008);
+ testToTestStaticoperation(UMLElementTypes.Property_3012, ClassAttributeCompartmentEditPart.VISUAL_ID);
+ }
+
+ protected void testToTestStaticoperation(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ //creation of label
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ assertTrue("ceated editpart is a feature editpart", ((compartment.getChildren().get(0)) instanceof UMLCompartmentEditPart));
+ UMLCompartmentEditPart featureEditPart = (UMLCompartmentEditPart)compartment.getChildren().get(0);
+ //make it static
+ SetCommand setStaticOperation = new SetCommand(diagramEditor.getEditingDomain(), featureEditPart.resolveSemanticElement(), UMLPackage.eINSTANCE.getFeature_IsStatic(), true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(new EMFtoGMFCommandWrapper(setStaticOperation)));
+ TextFlowEx label = (TextFlowEx)((FlowPage)featureEditPart.getFigure().getChildren().get(0)).getChildren().get(0);
+ featureEditPart.refresh();
+ //the semantic element is static
+ assertTrue("the feature is static", ((Feature)featureEditPart.resolveSemanticElement()).isStatic());
+ //the graphical element is underlined
+ assertTrue("the figigure is drawn as static", label.isTextUnderlined());
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java
new file mode 100644
index 00000000000..4bbe6432c03
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load100ClassTest.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Load100ClassTest.
+ */
+public class Load100ClassTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load100 class.
+ */
+ @Ignore
+ @Test
+ public void testLoad100Class() {
+ for(int i = 0; i < 100; i++) {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java
new file mode 100644
index 00000000000..4c36e954e71
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load10ClassTest.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Load10ClassTest.
+ */
+public class Load10ClassTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load10 class.
+ */
+ @Ignore
+ @Test
+ public void testLoad10Class() {
+ for(int i = 0; i < 10; i++) {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java
new file mode 100644
index 00000000000..7eb5f103cbf
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load200ClassTest.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Load200ClassTest.
+ */
+public class Load200ClassTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load200 class.
+ */
+ @Ignore
+ @Test
+ public void testLoad200Class() {
+ for(int i = 0; i < 200; i++) {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java
new file mode 100644
index 00000000000..9147d9f7c7d
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load300ClassTest.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Load300ClassTest.
+ */
+public class Load300ClassTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load300 class.
+ */
+ @Ignore
+ @Test
+ public void testLoad300Class() {
+ for(int i = 0; i < 300; i++) {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java
new file mode 100644
index 00000000000..0622a493169
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load400ClassTest.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Load400ClassTest.
+ */
+public class Load400ClassTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load400 class.
+ */
+ @Ignore
+ @Test
+ public void testLoad400Class() {
+ for(int i = 0; i < 400; i++) {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java
new file mode 100644
index 00000000000..e1fb445985d
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/Load500ClassTest.java
@@ -0,0 +1,71 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.clazz.test.IClassDiagramTestsConstants;
+import org.eclipse.papyrus.uml.diagram.clazz.test.canonical.AbstractPapyrusTestCase;
+import org.junit.Ignore;
+import org.junit.Test;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class Load500ClassTest.
+ */
+public class Load500ClassTest extends AbstractPapyrusTestCase {
+
+ @Override
+ protected String getProjectName() {
+ return IClassDiagramTestsConstants.PROJECT_NAME;
+ }
+
+ @Override
+ protected String getFileName() {
+ return IClassDiagramTestsConstants.FILE_NAME;
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull("CREATION: creation command null", command);
+ assertTrue("CREATION: test if the command is created", command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: test if the command can be executed", command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ }
+
+ /**
+ * Test load500 class.
+ */
+ @Ignore
+ @Test
+ public void testLoad500Class() {
+ for(int i = 0; i < 500; i++) {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java
new file mode 100644
index 00000000000..aadba8245f7
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz.tests/test/org/eclipse/papyrus/uml/diagram/clazz/test/load/LoadTests.java
@@ -0,0 +1,38 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.clazz.test.load;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+// 10 classes
+Load10ClassTest.class,
+// 100 classes
+Load100ClassTest.class,
+// 200 classes
+Load200ClassTest.class,
+// 300 classes
+Load300ClassTest.class,
+// 400 classes
+Load400ClassTest.class,
+// 500 classes
+Load500ClassTest.class, })
+public class LoadTests {
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath
index 8a8f1668cdc..8a8f1668cdc 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.classpath
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.classpath
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project
index 6620ec117f5..6620ec117f5 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.project
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs
index f287d53cf45..f287d53cf45 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/.settings/org.eclipse.jdt.core.prefs
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF
index 395dea58752..395dea58752 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/META-INF/MANIFEST.MF
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.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/diagram/org.eclipse.papyrus.diagram.profile.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties
index 785a40c0ec7..785a40c0ec7 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/build.properties
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/build.properties
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch
index b93239ddd42..35935ba1cf1 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/org.eclipse.papyrus.diagram.profile.tests.launch
@@ -1,41 +1,41 @@
-<?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"/>
-<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.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/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"/>
-<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.diagram.profile.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.diagram.profile.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 -Xms40m -Xmx512m"/>
-<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>
+<?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"/>
+<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.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/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"/>
+<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.diagram.profile.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.diagram.profile.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 -Xms40m -Xmx512m"/>
+<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/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/Activator.java
index b08d188c732..b08d188c732 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/Activator.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/Activator.java
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java
index a955247aa33..a955247aa33 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/AllTests.java
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java
index 87b6ee5d101..87b6ee5d101 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/IProfileDiagramTest.java
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/AllCanonicalTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/AllCanonicalTests.java
index e4ed37e4ef0..e4ed37e4ef0 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/AllCanonicalTests.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/AllCanonicalTests.java
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java
index 9c12f266122..840ddcf606c 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramChildNode.java
@@ -16,10 +16,10 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildNode;
import org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand;
import org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestChildNode;
import org.eclipse.uml2.uml.UMLPackage;
/**
* @author Thibault
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java
index b1c94c410a4..9e97c7ff776 100644
--- a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.profile.tests/src/org/eclipse/papyrus/uml/diagram/profile/tests/canonical/TestProfileDiagramTopNode.java
@@ -16,10 +16,10 @@ import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
import org.eclipse.gmf.tooling.runtime.update.DiagramUpdater;
import org.eclipse.papyrus.commands.ICreationCommand;
-import org.eclipse.papyrus.uml.diagram.tests.canonical.TestTopNode;
import org.eclipse.papyrus.uml.diagram.profile.CreateProfileDiagramCommand;
import org.eclipse.papyrus.uml.diagram.profile.part.UMLDiagramUpdater;
import org.eclipse.papyrus.uml.diagram.profile.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.tests.canonical.TestTopNode;
import org.eclipse.uml2.uml.UMLPackage;
import org.junit.Test;
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.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/J2SE-1.5"/>
+ <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/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.project
new file mode 100644
index 00000000000..c55d52ee379
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.stereotypeproperty.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/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..bd673bdce54
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,32 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.editor;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.clazz;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.stereotype.edition;bundle-version="1.0.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.appearance;bundle-version="1.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0"
+Export-Package: org.eclipse.papyrus.uml.diagram.stereotypeproperty
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.stereotypeproperty.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests;singleton:=true
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.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/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/build.properties
new file mode 100644
index 00000000000..3036be7431a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/build.properties
@@ -0,0 +1,9 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.xml,\
+ plugin.properties,\
+ resource/,\
+ about.html
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch
new file mode 100644
index 00000000000..78086784bb0
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/org.eclipse.papyrus.diagram.stereotypeproperty.tests.launch
@@ -0,0 +1,41 @@
+<?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"/>
+<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.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/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"/>
+<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.diagram.stereotypeproperty.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.diagram.stereotypeproperty.tests"/>
+<stringAttribute key="org.eclipse.jdt.launching.SOURCE_PATH_PROVIDER" value="org.eclipse.pde.ui.workbenchClasspathProvider"/>
+<stringAttribute key="org.eclipse.jdt.launching.VM_ARGUMENTS" value="-Dosgi.requiredJavaVersion=1.5 -Xms1024m -Xmx4086m -XX:MaxPermSize=1024M"/>
+<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/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.properties
new file mode 100644
index 00000000000..f1b3d0eb354
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Papyrus Diagram stereotype property Test (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.xml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.xml
new file mode 100644
index 00000000000..edc72b45ede
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/plugin.xml
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.emf.ecore.uri_mapping">
+
+ <mapping
+ source="pathmap://Test_PROFILES/"
+ target="platform:/plugin/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/">
+ </mapping>
+ </extension>
+
+ <extension
+ point="org.eclipse.papyrus.uml.extensionpoints.UMLProfile">
+ <profile
+ description="Test profile use to test papyrus"
+ name="TestProfile"
+ path="pathmap://Test_PROFILES/testProfile.profile.uml"
+ provider="Eclipse.org">
+ </profile>
+ </extension>
+</plugin>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.di b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.di
new file mode 100644
index 00000000000..098618c9cbb
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.di
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<di:SashWindowsMngr xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.eclipse.org/papyrus/0.7.0/sashdi">
+ <pageList>
+ <availablePage>
+ <emfPageIdentifier href="testProfile.profile.notation#_lN77kHc8EeGEMdTf3PnPPg"/>
+ </availablePage>
+ </pageList>
+ <sashModel currentSelection="//@sashModel/@windows.0/@children.0">
+ <windows>
+ <children xsi:type="di:TabFolder">
+ <children>
+ <emfPageIdentifier href="testProfile.profile.notation#_lN77kHc8EeGEMdTf3PnPPg"/>
+ </children>
+ </children>
+ </windows>
+ </sashModel>
+</di:SashWindowsMngr>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.notation b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.notation
new file mode 100644
index 00000000000..fc3080a3ccd
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.notation
@@ -0,0 +1,103 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<notation:Diagram xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_lN77kHc8EeGEMdTf3PnPPg" type="PapyrusUMLProfileDiagram" name="ProfileDiagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_Ij0egM0eEeKwCqQbxnBb_w" type="1026">
+ <children xmi:type="notation:DecorationNode" xmi:id="_Ij9ocM0eEeKwCqQbxnBb_w" type="1034"/>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_IkHZcM0eEeKwCqQbxnBb_w" type="1071">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IktPUM0eEeKwCqQbxnBb_w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IktPUc0eEeKwCqQbxnBb_w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <children xmi:type="notation:Shape" xmi:id="_KA8j0M0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_dcMxQGkdEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KA8j0c0eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KCliks0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_meyzIGkdEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KClik80eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KCvTkM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_wshLYGkdEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KCvTkc0eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KCvTks0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_1ta5cGkdEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KCvTk80eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KCvTlM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_71vikGkdEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KCvTlc0eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KC4dgM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_BfRW4GkeEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KC4dgc0eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KC4dgs0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_Lb0QgGz4EeGEKeJyQaxg3g"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KC4dg80eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_KC4dhM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_jAiq8G38EeGag98Jn1kDVw"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_KC4dhc0eEeKwCqQbxnBb_w" x="44" y="24"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_RfkRgM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_Re-boM0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_RfkRgc0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Y4iDIM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_Y4YSIM0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Y4iDIc0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_ZvIT8M0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_Zu-i8M0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_ZvIT8c0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_aEaAYM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_aEQPYM0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aEaAYc0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_aXJWMM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_aXAMQM0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_aXJWMc0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_vILVIM0eEeKwCqQbxnBb_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_vH4aMM0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_vILVIc0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_VEXbsM0jEeKjW9KkdY00_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_VDBX4M0jEeKjW9KkdY00_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VEXbsc0jEeKjW9KkdY00_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_Si-4gM0tEeKjW9KkdY00_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_SivA4M0tEeKjW9KkdY00_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_Si-4gc0tEeKjW9KkdY00_w"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_VD9AcM0tEeKjW9KkdY00_w" type="3002">
+ <element xmi:type="uml:Property" href="testProfile.profile.uml#_VDuW8M0tEeKjW9KkdY00_w"/>
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_VD9Acc0tEeKjW9KkdY00_w"/>
+ </children>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_IkHZcc0eEeKwCqQbxnBb_w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_IkHZcs0eEeKwCqQbxnBb_w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_IkHZc80eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_IkHZdM0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_IkHZdc0eEeKwCqQbxnBb_w" visible="false" type="1019">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_IktPUs0eEeKwCqQbxnBb_w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_IktPU80eEeKwCqQbxnBb_w" key="showTitle" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_IkHZds0eEeKwCqQbxnBb_w"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_IkHZd80eEeKwCqQbxnBb_w"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_IkHZeM0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_IkHZec0eEeKwCqQbxnBb_w"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_In1b0M0eEeKwCqQbxnBb_w" visible="false" type="compartment_shape_display">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_In1b080eEeKwCqQbxnBb_w" source="PapyrusCSSForceValue">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_In1b1M0eEeKwCqQbxnBb_w" key="mutable" value="true"/>
+ </eAnnotations>
+ <styles xmi:type="notation:TitleStyle" xmi:id="_In1b0c0eEeKwCqQbxnBb_w"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_In1b0s0eEeKwCqQbxnBb_w"/>
+ </children>
+ <element xmi:type="uml:Stereotype" href="testProfile.profile.uml#_WJYD4GkdEeGGJOTenKBKAg"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_Ij0egc0eEeKwCqQbxnBb_w" x="215" y="95"/>
+ </children>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_lN77kXc8EeGEMdTf3PnPPg"/>
+ <element xmi:type="uml:Profile" href="testProfile.profile.uml#_UVrRoGkdEeGGJOTenKBKAg"/>
+</notation:Diagram>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.uml b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.uml
new file mode 100644
index 00000000000..d98c45e0609
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/resource/testProfile.profile.uml
@@ -0,0 +1,452 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<uml:Profile xmi:version="20110701" xmlns:xmi="http://www.omg.org/spec/XMI/20110701" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:uml="http://www.eclipse.org/uml2/4.0.0/UML" xmi:id="_UVrRoGkdEeGGJOTenKBKAg" name="testProfile" metaclassReference="_YcYBQGkdEeGGJOTenKBKAg">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_CL6gEHc4EeGpWpXSc4xZww" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <contents xmi:type="ecore:EPackage" xmi:id="_dqAQQM0tEeKjW9KkdY00_w" name="testProfile" nsURI="http:///schemas/testProfile/_dg9pAM0tEeKjW9KkdY00_w/4" nsPrefix="testProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dq95kM0tEeKjW9KkdY00_w" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dq95kc0tEeKjW9KkdY00_w" key="Version" value="0.0.5"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dq95ks0tEeKjW9KkdY00_w" key="Comment" value="update profile for multi evaluation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dq95k80tEeKjW9KkdY00_w" key="Copyright" value="CEA LIST"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dq95lM0tEeKjW9KkdY00_w" key="Date" value="2013-06-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_dq95lc0tEeKjW9KkdY00_w" key="Author" value="P. Tessier"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_dqAQQc0tEeKjW9KkdY00_w" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dqAQQs0tEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WJYD4GkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQQ80tEeKjW9KkdY00_w" name="testReftoStereotype2" ordered="false" upperBound="-1" eType="_dqAQZ80tEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQRc0tEeKjW9KkdY00_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQR80tEeKjW9KkdY00_w" name="testUnaryReftoStereotype2" ordered="false" eType="_dqAQZ80tEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQSc0tEeKjW9KkdY00_w" name="testDataType" ordered="false" lowerBound="1" eType="_dqAQa80tEeKjW9KkdY00_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQS80tEeKjW9KkdY00_w" name="testMyPrimituveType" ordered="false" lowerBound="1" eType="_dqAQbc0tEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQTc0tEeKjW9KkdY00_w" name="testInt" ordered="false" unique="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQT80tEeKjW9KkdY00_w" name="testMultiString" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQUc0tEeKjW9KkdY00_w" name="testRefToMetaclass" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQU80tEeKjW9KkdY00_w" name="testRefToEnumeration" ordered="false" lowerBound="1" eType="_dqAQb80tEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQVc0tEeKjW9KkdY00_w" name="testMultiDataType" ordered="false" upperBound="-1" eType="_dqAQa80tEeKjW9KkdY00_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQV80tEeKjW9KkdY00_w" name="testMultiprimitiveType" ordered="false" upperBound="-1" eType="_dqAQbc0tEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQWc0tEeKjW9KkdY00_w" name="testMultiInt" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQW80tEeKjW9KkdY00_w" name="testMultiEnumeration" ordered="false" unique="false" upperBound="-1" eType="_dqAQb80tEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQXc0tEeKjW9KkdY00_w" name="testBoolean" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQX80tEeKjW9KkdY00_w" name="testMultiBoolean" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQYc0tEeKjW9KkdY00_w" name="testString" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQY80tEeKjW9KkdY00_w" name="testReal" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Real"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_dqAQZc0tEeKjW9KkdY00_w" name="testMultiReal" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Real"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_dqAQZ80tEeKjW9KkdY00_w" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dqAQaM0tEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WxelsGkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_dqAQac0tEeKjW9KkdY00_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_dqAQa80tEeKjW9KkdY00_w" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dqAQbM0tEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_aNRXIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EDataType" xmi:id="_dqAQbc0tEeKjW9KkdY00_w" name="MyPrimitiveType" instanceClassName="java.lang.String">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dqAQbs0tEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_apMeIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_dqAQb80tEeKjW9KkdY00_w" name="Enumeration1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_dqAQcM0tEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Zym0YGkdEeGGJOTenKBKAg"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dqAQcc0tEeKjW9KkdY00_w" name="EnumerationLiteral1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dqAQcs0tEeKjW9KkdY00_w" name="EnumerationLiteral2" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_dqAQc80tEeKjW9KkdY00_w" name="EnumerationLiteral3" value="2"/>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_4y4JwM0nEeKjW9KkdY00_w" name="testProfile" nsURI="http:///schemas/testProfile/_4qj7QM0nEeKjW9KkdY00_w/3" nsPrefix="testProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4zxhoM0nEeKjW9KkdY00_w" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4zxhoc0nEeKjW9KkdY00_w" key="Version" value="0.0.4"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4zxhos0nEeKjW9KkdY00_w" key="Comment" value="update profile for multi evaluation"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4zxho80nEeKjW9KkdY00_w" key="Copyright" value="CEA LIST"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4zxhpM0nEeKjW9KkdY00_w" key="Date" value="2013-06-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4zxhpc0nEeKjW9KkdY00_w" key="Author" value="P. Tessier"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_4y4Jwc0nEeKjW9KkdY00_w" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4y4Jws0nEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WJYD4GkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4Jw80nEeKjW9KkdY00_w" name="testReftoStereotype2" ordered="false" upperBound="-1" eType="_4y4J480nEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4Jxc0nEeKjW9KkdY00_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4Jx80nEeKjW9KkdY00_w" name="testUnaryReftoStereotype2" ordered="false" eType="_4y4J480nEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4Jyc0nEeKjW9KkdY00_w" name="testDataType" ordered="false" lowerBound="1" eType="_4y4J580nEeKjW9KkdY00_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4Jy80nEeKjW9KkdY00_w" name="testMyPrimituveType" ordered="false" lowerBound="1" eType="_4y4J6c0nEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4Jzc0nEeKjW9KkdY00_w" name="testInt" ordered="false" unique="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4Jz80nEeKjW9KkdY00_w" name="testMultiString" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4J0c0nEeKjW9KkdY00_w" name="testRefToMetaclass" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J080nEeKjW9KkdY00_w" name="testRefToEnumeration" ordered="false" lowerBound="1" eType="_4y4J680nEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4J1c0nEeKjW9KkdY00_w" name="testMultiDataType" ordered="false" upperBound="-1" eType="_4y4J580nEeKjW9KkdY00_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J180nEeKjW9KkdY00_w" name="testMultiprimitiveType" ordered="false" upperBound="-1" eType="_4y4J6c0nEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J2c0nEeKjW9KkdY00_w" name="testMultiInt" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J280nEeKjW9KkdY00_w" name="testMultiEnumeration" ordered="false" unique="false" upperBound="-1" eType="_4y4J680nEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J3c0nEeKjW9KkdY00_w" name="testBoolean" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J380nEeKjW9KkdY00_w" name="testMultiBoolean" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4y4J4c0nEeKjW9KkdY00_w" name="testString" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_4y4J480nEeKjW9KkdY00_w" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4y4J5M0nEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WxelsGkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4y4J5c0nEeKjW9KkdY00_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_4y4J580nEeKjW9KkdY00_w" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4y4J6M0nEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_aNRXIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EDataType" xmi:id="_4y4J6c0nEeKjW9KkdY00_w" name="MyPrimitiveType" instanceClassName="java.lang.String">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4y4J6s0nEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_apMeIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_4y4J680nEeKjW9KkdY00_w" name="Enumeration1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4y4J7M0nEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Zym0YGkdEeGGJOTenKBKAg"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_4y4J7c0nEeKjW9KkdY00_w" name="EnumerationLiteral1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_4y4J7s0nEeKjW9KkdY00_w" name="EnumerationLiteral2" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_4y4J780nEeKjW9KkdY00_w" name="EnumerationLiteral3" value="2"/>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_bx4ckM0jEeKjW9KkdY00_w" name="testProfile" nsURI="http:///schemas/testProfile/_bs09cM0jEeKjW9KkdY00_w/2" nsPrefix="testProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_by6-YM0jEeKjW9KkdY00_w" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_by6-Yc0jEeKjW9KkdY00_w" key="Version" value="0.0.3"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_by6-Ys0jEeKjW9KkdY00_w" key="Comment" value="add test"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_by6-Y80jEeKjW9KkdY00_w" key="Copyright" value="CEA LIST"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_by6-ZM0jEeKjW9KkdY00_w" key="Date" value="2013-06-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_by6-Zc0jEeKjW9KkdY00_w" key="Author" value="P. Tessier"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_bx4ckc0jEeKjW9KkdY00_w" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bx4cks0jEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WJYD4GkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4ck80jEeKjW9KkdY00_w" name="testReftoStereotype2" ordered="false" upperBound="-1" eType="_bx4cs80jEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4clc0jEeKjW9KkdY00_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4cl80jEeKjW9KkdY00_w" name="testUnaryReftoStereotype2" ordered="false" eType="_bx4cs80jEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4cmc0jEeKjW9KkdY00_w" name="testDataType" ordered="false" lowerBound="1" eType="_bx4ct80jEeKjW9KkdY00_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cm80jEeKjW9KkdY00_w" name="testMyPrimituveType" ordered="false" lowerBound="1" eType="_bx4cuc0jEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cnc0jEeKjW9KkdY00_w" name="testInt" ordered="false" unique="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cn80jEeKjW9KkdY00_w" name="testMultiString" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4coc0jEeKjW9KkdY00_w" name="testRefToMetaclass" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4co80jEeKjW9KkdY00_w" name="testRefToEnumeration" ordered="false" lowerBound="1" eType="_bx4cu80jEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4cpc0jEeKjW9KkdY00_w" name="testMultiDataType" ordered="false" upperBound="-1" eType="_bx4ct80jEeKjW9KkdY00_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cp80jEeKjW9KkdY00_w" name="testMultiprimitiveType" ordered="false" upperBound="-1" eType="_bx4cuc0jEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cqc0jEeKjW9KkdY00_w" name="testMultiInt" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cq80jEeKjW9KkdY00_w" name="testMultiEnumeration" ordered="false" upperBound="-1" eType="_bx4cu80jEeKjW9KkdY00_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4crc0jEeKjW9KkdY00_w" name="testBoolean" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4cr80jEeKjW9KkdY00_w" name="testMultiBoolean" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_bx4csc0jEeKjW9KkdY00_w" name="testString" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_bx4cs80jEeKjW9KkdY00_w" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bx4ctM0jEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WxelsGkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_bx4ctc0jEeKjW9KkdY00_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_bx4ct80jEeKjW9KkdY00_w" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bx4cuM0jEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_aNRXIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EDataType" xmi:id="_bx4cuc0jEeKjW9KkdY00_w" name="MyPrimitiveType" instanceClassName="java.lang.String">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bx4cus0jEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_apMeIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_bx4cu80jEeKjW9KkdY00_w" name="Enumeration1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_bx4cvM0jEeKjW9KkdY00_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Zym0YGkdEeGGJOTenKBKAg"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_bx4cvc0jEeKjW9KkdY00_w" name="EnumerationLiteral1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_bx4cvs0jEeKjW9KkdY00_w" name="EnumerationLiteral2" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_bx4cv80jEeKjW9KkdY00_w" name="EnumerationLiteral3" value="2"/>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_4q5okM0eEeKwCqQbxnBb_w" name="testProfile" nsURI="http:///schemas/testProfile/_4lZdgM0eEeKwCqQbxnBb_w/1" nsPrefix="testProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4r8xcM0eEeKwCqQbxnBb_w" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4r8xcc0eEeKwCqQbxnBb_w" key="Version" value="0.0.2"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4r8xcs0eEeKwCqQbxnBb_w" key="Comment" value="Add new Test"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4r8xc80eEeKwCqQbxnBb_w" key="Copyright" value="CEA LIST"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4r8xdM0eEeKwCqQbxnBb_w" key="Date" value="2013-06-04"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_4r8xdc0eEeKwCqQbxnBb_w" key="Author" value="P. Tessier"/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_4q5okc0eEeKwCqQbxnBb_w" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4q5oks0eEeKwCqQbxnBb_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WJYD4GkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5ok80eEeKwCqQbxnBb_w" name="testReftoStereotype2" ordered="false" upperBound="-1" eType="_4q5osc0eEeKwCqQbxnBb_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5olc0eEeKwCqQbxnBb_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5ol80eEeKwCqQbxnBb_w" name="testUnaryReftoStereotype2" ordered="false" eType="_4q5osc0eEeKwCqQbxnBb_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5omc0eEeKwCqQbxnBb_w" name="testDataType" ordered="false" lowerBound="1" eType="_4q5otc0eEeKwCqQbxnBb_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5om80eEeKwCqQbxnBb_w" name="testMyPrimituveType" ordered="false" lowerBound="1" eType="_4q5ot80eEeKwCqQbxnBb_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5onc0eEeKwCqQbxnBb_w" name="testInt" ordered="false" unique="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5on80eEeKwCqQbxnBb_w" name="testMultiString" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5ooc0eEeKwCqQbxnBb_w" name="testRefToMetaclass" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5oo80eEeKwCqQbxnBb_w" name="testRefToEnumeration" ordered="false" lowerBound="1" eType="_4q5ouc0eEeKwCqQbxnBb_w"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5opc0eEeKwCqQbxnBb_w" name="testMultiDataType" ordered="false" upperBound="-1" eType="_4q5otc0eEeKwCqQbxnBb_w" containment="true"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5op80eEeKwCqQbxnBb_w" name="testMultiprimitiveType" ordered="false" upperBound="-1" eType="_4q5ot80eEeKwCqQbxnBb_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5oqc0eEeKwCqQbxnBb_w" name="testMultiInt" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5oq80eEeKwCqQbxnBb_w" name="testMultiEnumeration" ordered="false" upperBound="-1" eType="_4q5ouc0eEeKwCqQbxnBb_w"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5orc0eEeKwCqQbxnBb_w" name="testBoolean" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_4q5or80eEeKwCqQbxnBb_w" name="testMultiBoolean" ordered="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Boolean"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_4q5osc0eEeKwCqQbxnBb_w" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4q5oss0eEeKwCqQbxnBb_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WxelsGkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_4q5os80eEeKwCqQbxnBb_w" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_4q5otc0eEeKwCqQbxnBb_w" name="DataType1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4q5ots0eEeKwCqQbxnBb_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_aNRXIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EDataType" xmi:id="_4q5ot80eEeKwCqQbxnBb_w" name="MyPrimitiveType" instanceClassName="java.lang.String">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4q5ouM0eEeKwCqQbxnBb_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_apMeIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_4q5ouc0eEeKwCqQbxnBb_w" name="Enumeration1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_4q5ous0eEeKwCqQbxnBb_w" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Zym0YGkdEeGGJOTenKBKAg"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_4q5ou80eEeKwCqQbxnBb_w" name="EnumerationLiteral1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_4q5ovM0eEeKwCqQbxnBb_w" name="EnumerationLiteral2" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_4q5ovc0eEeKwCqQbxnBb_w" name="EnumerationLiteral3" value="2"/>
+ </eClassifiers>
+ </contents>
+ <contents xmi:type="ecore:EPackage" xmi:id="_sVoXAHc8EeGEMdTf3PnPPg" name="testProfile" nsURI="http:///schemas/testProfile/_rNfDMHc8EeGEMdTf3PnPPg/0" nsPrefix="testProfile">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_v37ZEXc8EeGEMdTf3PnPPg" source="PapyrusVersion">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_v37ZEnc8EeGEMdTf3PnPPg" key="Version" value="0.0.1"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_v37ZE3c8EeGEMdTf3PnPPg" key="Comment" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_v37ZFHc8EeGEMdTf3PnPPg" key="Copyright" value=""/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_v37ZFXc8EeGEMdTf3PnPPg" key="Date" value="2012-03-26"/>
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_v37ZFnc8EeGEMdTf3PnPPg" key="Author" value=""/>
+ </eAnnotations>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_sVoXAXc8EeGEMdTf3PnPPg" name="Stereotype1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sVoXAnc8EeGEMdTf3PnPPg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WJYD4GkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sVo-EHc8EeGEMdTf3PnPPg" name="testReftoStereotype2" ordered="false" upperBound="-1" eType="_sVqMMnc8EeGEMdTf3PnPPg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sVo-Enc8EeGEMdTf3PnPPg" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sVo-FHc8EeGEMdTf3PnPPg" name="testUnaryReftoStereotype2" ordered="false" eType="_sVqMMnc8EeGEMdTf3PnPPg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_sVplIHc8EeGEMdTf3PnPPg" name="testMyPrimituveType" ordered="false" lowerBound="1" eType="_sVqzQHc8EeGEMdTf3PnPPg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_sVplInc8EeGEMdTf3PnPPg" name="testInt" ordered="false" unique="false">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//Integer"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_sVplJHc8EeGEMdTf3PnPPg" name="testMultiString" ordered="false" unique="false" upperBound="-1">
+ <eType xmi:type="ecore:EDataType" href="http://www.eclipse.org/uml2/4.0.0/Types#//String"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sVplJnc8EeGEMdTf3PnPPg" name="testRefToMetaclass" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Class"/>
+ </eStructuralFeatures>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_sVqMMHc8EeGEMdTf3PnPPg" name="testRefToEnumeration" ordered="false" lowerBound="1" eType="_sVqzQnc8EeGEMdTf3PnPPg"/>
+ <eStructuralFeatures xmi:type="ecore:EAttribute" xmi:id="_v33HoHc8EeGEMdTf3PnPPg" name="testDataType" ordered="false" lowerBound="1" eType="_v33usHc8EeGEMdTf3PnPPg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EClass" xmi:id="_sVqMMnc8EeGEMdTf3PnPPg" name="Stereotype2">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sVqMM3c8EeGEMdTf3PnPPg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_WxelsGkdEeGGJOTenKBKAg"/>
+ <eStructuralFeatures xmi:type="ecore:EReference" xmi:id="_sVqMNHc8EeGEMdTf3PnPPg" name="base_Element" ordered="false" lowerBound="1">
+ <eType xmi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
+ </eStructuralFeatures>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EDataType" xmi:id="_sVqzQHc8EeGEMdTf3PnPPg" name="MyPrimitiveType" instanceClassName="java.lang.String">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sVqzQXc8EeGEMdTf3PnPPg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_apMeIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EEnum" xmi:id="_sVqzQnc8EeGEMdTf3PnPPg" name="Enumeration1">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_sVqzQ3c8EeGEMdTf3PnPPg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_Zym0YGkdEeGGJOTenKBKAg"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_sVqzRHc8EeGEMdTf3PnPPg" name="EnumerationLiteral1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_sVqzRXc8EeGEMdTf3PnPPg" name="EnumerationLiteral2" value="1"/>
+ <eLiterals xmi:type="ecore:EEnumLiteral" xmi:id="_sVqzRnc8EeGEMdTf3PnPPg" name="EnumerationLiteral3" value="2"/>
+ </eClassifiers>
+ <eClassifiers xmi:type="ecore:EDataType" xmi:id="_v33usHc8EeGEMdTf3PnPPg" name="DataType1" instanceClassName="java.lang.String">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_v33usXc8EeGEMdTf3PnPPg" source="http://www.eclipse.org/uml2/2.0.0/UML" references="_aNRXIGkdEeGGJOTenKBKAg"/>
+ </eClassifiers>
+ </contents>
+ </eAnnotations>
+ <elementImport xmi:type="uml:ElementImport" xmi:id="_YcYBQGkdEeGGJOTenKBKAg" alias="Element">
+ <importedElement xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
+ </elementImport>
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_UVrRomkdEeGGJOTenKBKAg">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_WJYD4GkdEeGGJOTenKBKAg" name="Stereotype1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_dcMxQGkdEeGGJOTenKBKAg" name="testReftoStereotype2" type="_WxelsGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jnpm4GkdEeGGJOTenKBKAg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jnpm4WkdEeGGJOTenKBKAg" value="*"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_erNiEGkdEeGGJOTenKBKAg" name="base_Element" association="_erNiEWkdEeGGJOTenKBKAg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_meyzIGkdEeGGJOTenKBKAg" name="testUnaryReftoStereotype2" visibility="public" type="_WxelsGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_vekKgGkdEeGGJOTenKBKAg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_vekKgWkdEeGGJOTenKBKAg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_vetUcGkdEeGGJOTenKBKAg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_wshLYGkdEeGGJOTenKBKAg" name="testDataType" visibility="public" type="_aNRXIGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_1DBRkGkdEeGGJOTenKBKAg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_1DBRkWkdEeGGJOTenKBKAg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_1DBRkmkdEeGGJOTenKBKAg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_1ta5cGkdEeGGJOTenKBKAg" name="testMyPrimituveType" visibility="public" type="_apMeIGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_7KKO8GkdEeGGJOTenKBKAg" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_7KKO8WkdEeGGJOTenKBKAg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_7KTY4GkdEeGGJOTenKBKAg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_71vikGkdEeGGJOTenKBKAg" name="testInt" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_AhPBUGkeEeGGJOTenKBKAg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_AhPBUWkeEeGGJOTenKBKAg" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_AhPBUmkeEeGGJOTenKBKAg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_BfRW4GkeEeGGJOTenKBKAg" name="testMultiString" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_HnmnEGkeEeGGJOTenKBKAg"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_HnmnEWkeEeGGJOTenKBKAg" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_HnmnEmkeEeGGJOTenKBKAg">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Lb0QgGz4EeGEKeJyQaxg3g" name="testRefToMetaclass">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Class"/>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_jAiq8G38EeGag98Jn1kDVw" name="testRefToEnumeration" visibility="public" type="_Zym0YGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jQ6CMG38EeGag98Jn1kDVw" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jQ6CMW38EeGag98Jn1kDVw" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_jQ6CMm38EeGag98Jn1kDVw">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Re-boM0eEeKwCqQbxnBb_w" name="testMultiDataType" visibility="public" type="_aNRXIGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_XjIWcM0eEeKwCqQbxnBb_w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_XjSHcM0eEeKwCqQbxnBb_w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_XjlCYM0eEeKwCqQbxnBb_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Y4YSIM0eEeKwCqQbxnBb_w" name="testMultiprimitiveType" visibility="public" type="_apMeIGkdEeGGJOTenKBKAg">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_e4YFsM0eEeKwCqQbxnBb_w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_e4hPoM0eEeKwCqQbxnBb_w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_e40KkM0eEeKwCqQbxnBb_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_Zu-i8M0eEeKwCqQbxnBb_w" name="testMultiInt" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Integer"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_jNivIM0eEeKwCqQbxnBb_w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_jNivIc0eEeKwCqQbxnBb_w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_jN1qEM0eEeKwCqQbxnBb_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_aEQPYM0eEeKwCqQbxnBb_w" name="testMultiEnumeration" visibility="public" type="_Zym0YGkdEeGGJOTenKBKAg" isUnique="false">
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_or6cUM0eEeKwCqQbxnBb_w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_or6cUc0eEeKwCqQbxnBb_w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_osNXQM0eEeKwCqQbxnBb_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_aXAMQM0eEeKwCqQbxnBb_w" name="testBoolean" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_ujbpUM0eEeKwCqQbxnBb_w" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_ujkzQM0eEeKwCqQbxnBb_w" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_uj3uMM0eEeKwCqQbxnBb_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_vH4aMM0eEeKwCqQbxnBb_w" name="testMultiBoolean" visibility="public" isUnique="false">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolean"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_0qj_oM0eEeKwCqQbxnBb_w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_0qtwoM0eEeKwCqQbxnBb_w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_0rArkM0eEeKwCqQbxnBb_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_VDBX4M0jEeKjW9KkdY00_w" name="testString" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#String"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_YNNb8M0jEeKjW9KkdY00_w" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_YNg98M0jEeKjW9KkdY00_w" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_YOGz0M0jEeKjW9KkdY00_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_SivA4M0tEeKjW9KkdY00_w" name="testReal" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_UppDAM0tEeKjW9KkdY00_w" value="1"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Upxl4M0tEeKjW9KkdY00_w" value="1"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_UqG9EM0tEeKjW9KkdY00_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_VDuW8M0tEeKjW9KkdY00_w" name="testMultiReal" visibility="public">
+ <type xmi:type="uml:PrimitiveType" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Real"/>
+ <lowerValue xmi:type="uml:LiteralInteger" xmi:id="_Z-yiwM0tEeKjW9KkdY00_w"/>
+ <upperValue xmi:type="uml:LiteralUnlimitedNatural" xmi:id="_Z-53gM0tEeKjW9KkdY00_w" value="*"/>
+ <defaultValue xmi:type="uml:LiteralString" xmi:id="_Z_MLYM0tEeKjW9KkdY00_w">
+ <value xsi:nil="true"/>
+ </defaultValue>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Stereotype" xmi:id="_WxelsGkdEeGGJOTenKBKAg" name="Stereotype2">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_fTFaYGkdEeGGJOTenKBKAg" name="base_Element" association="_fTFaYWkdEeGGJOTenKBKAg">
+ <type xmi:type="uml:Class" href="pathmap://UML_METAMODELS/UML.metamodel.uml#Element"/>
+ </ownedAttribute>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Enumeration" xmi:id="_Zym0YGkdEeGGJOTenKBKAg" name="Enumeration1">
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_fc4W8G38EeGag98Jn1kDVw" name="EnumerationLiteral1"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_f6NMIG38EeGag98Jn1kDVw" name="EnumerationLiteral2"/>
+ <ownedLiteral xmi:type="uml:EnumerationLiteral" xmi:id="_gPCzsG38EeGag98Jn1kDVw" name="EnumerationLiteral3"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:DataType" xmi:id="_aNRXIGkdEeGGJOTenKBKAg" name="DataType1"/>
+ <packagedElement xmi:type="uml:PrimitiveType" xmi:id="_apMeIGkdEeGGJOTenKBKAg" name="MyPrimitiveType"/>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_erNiEWkdEeGGJOTenKBKAg" name="E_Stereotype1_Element1" memberEnd="_erNiEmkdEeGGJOTenKBKAg _erNiEGkdEeGGJOTenKBKAg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_erNiEmkdEeGGJOTenKBKAg" name="extension_Stereotype1" type="_WJYD4GkdEeGGJOTenKBKAg" aggregation="composite" association="_erNiEWkdEeGGJOTenKBKAg"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Extension" xmi:id="_fTFaYWkdEeGGJOTenKBKAg" name="E_Stereotype2_Element1" memberEnd="_fTFaYmkdEeGGJOTenKBKAg _fTFaYGkdEeGGJOTenKBKAg">
+ <ownedEnd xmi:type="uml:ExtensionEnd" xmi:id="_fTFaYmkdEeGGJOTenKBKAg" name="extension_Stereotype2" type="_WxelsGkdEeGGJOTenKBKAg" aggregation="composite" association="_fTFaYWkdEeGGJOTenKBKAg"/>
+ </packagedElement>
+</uml:Profile>
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java
new file mode 100644
index 00000000000..b8b86aff681
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AbstractPapyrusTestCase.java
@@ -0,0 +1,241 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import java.io.ByteArrayInputStream;
+
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.uml.diagram.clazz.CreateClassDiagramCommand;
+import org.eclipse.papyrus.uml.diagram.clazz.part.UMLDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.uml2.uml.Element;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+
+
+/**
+ * The Class AbstractPapyrusTestCase.
+ */
+@SuppressWarnings("deprecation")
+public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest {
+
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:";
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: ";
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: ";
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: ";
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null";
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: ";
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo";
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo";
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution";
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed";
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created";
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State";
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER";
+
+ /** The papyrus editor. */
+ protected IMultiDiagramEditor papyrusEditor;
+
+ /** The di resource set. */
+ protected ModelSet diResourceSet;
+
+ /** The project. */
+ protected IProject project;
+
+ /** The file. */
+ protected IFile file;
+
+ /** The root. */
+ protected IWorkspaceRoot root;
+
+ /** The page. */
+ protected IWorkbenchPage page;
+
+ /** The diagram editor. */
+ protected UMLDiagramEditor diagramEditor = null;
+
+ /** The clazzdiagramedit part. */
+ protected DiagramEditPart clazzdiagrameditPart;
+
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ projectCreation();
+
+ // while( !(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor()instanceof IMultiDiagramEditor)){}
+ // IEditorPart editorPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor();
+ // papyrusEditor=((PapyrusMultiDiagramEditor)editorPart);
+ }
+
+ /**
+ * Gets the root view.
+ *
+ * @return the root view
+ */
+ protected View getRootView() {
+ return getDiagramEditPart().getDiagramView();
+ }
+
+ /**
+ * Gets the root semantic model.
+ *
+ * @return the root semantic model
+ */
+ protected Element getRootSemanticModel() {
+ return (Element)getRootView().getElement();
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ *
+ * @throws Exception
+ */
+ @After
+ public void tearDown() throws Exception {
+ papyrusEditor.doSave(new NullProgressMonitor());
+ //diResourceSet.save( new NullProgressMonitor());
+ //diagramEditor.close(true);
+ papyrusEditor = null;
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ page.closeAllEditors(true);
+ }
+ });
+
+ project.delete(true, new NullProgressMonitor());
+ }
+
+ /**
+ * Gets the diagram edit part.
+ *
+ * @return the diagram edit part
+ */
+ protected DiagramEditPart getDiagramEditPart() {
+ if(clazzdiagrameditPart == null) {
+ diagramEditor = (UMLDiagramEditor)papyrusEditor.getActiveEditor();
+ clazzdiagrameditPart = (DiagramEditPart)papyrusEditor.getAdapter(DiagramEditPart.class);
+ Assert.assertNotNull("Cannot find the diagram editor", diagramEditor);
+ Assert.assertNotNull("Cannot find the Diagram edit part", clazzdiagrameditPart);
+ }
+ return clazzdiagrameditPart;
+ }
+
+ /**
+ * Project creation.
+ */
+ protected void projectCreation() throws Exception {
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ root = workspace.getRoot();
+ project = root.getProject("StereotypePropertyTests");
+ file = project.getFile("StereotypePropertyTests.di");
+ this.diResourceSet = new DiResourceSet();
+
+ //at this point, no resources have been created
+ if(!project.exists()) {
+ project.create(null);
+ }
+ if(!project.isOpen()) {
+ project.open(null);
+ }
+
+ if(file.exists()) {
+ file.delete(true, new NullProgressMonitor());
+ }
+
+ if(!file.exists()) {
+ file.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
+ diResourceSet.createsModels(file);
+ new CreateUMLModelCommand().createModel(this.diResourceSet);
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); //High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ //Ignore exceptions
+ }
+ // diResourceSet.createsModels(file);
+ ICreationCommand command = new CreateClassDiagramCommand();
+ command.createDiagram(diResourceSet, null, "ClazzDiagram");
+ diResourceSet.save(new NullProgressMonitor());
+ }
+
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ try {
+ page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ papyrusEditor = (IMultiDiagramEditor)page.openEditor(new FileEditorInput(file), PapyrusMultiDiagramEditor.EDITOR_ID);
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ }
+ }
+ });
+
+ Assert.assertNotNull(papyrusEditor);
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/Activator.java
new file mode 100644
index 00000000000..0ceff47b51e
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/Activator.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AllTests.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AllTests.java
new file mode 100644
index 00000000000..85ca237d1af
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AllTests.java
@@ -0,0 +1,33 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * All tests together.
+ */
+@RunWith(Suite.class)
+@SuiteClasses({
+ // canonical
+TestProfileApplication.class,
+TestStereotypeApplication.class,
+TestLayoutWithStereotype.class
+
+})
+public class AllTests {
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AppliedProfileCommand.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AppliedProfileCommand.java
new file mode 100644
index 00000000000..604a69cdeef
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/AppliedProfileCommand.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import java.util.Collections;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.papyrus.uml.tools.utils.PackageUtil;
+import org.eclipse.uml2.uml.Package;
+import org.eclipse.uml2.uml.Profile;
+
+
+public class AppliedProfileCommand extends AbstractTransactionalCommand {
+
+ private Profile profile;
+ private Package model;
+
+ public AppliedProfileCommand(TransactionalEditingDomain domain, Package model, Profile profile) {
+ super(domain, "Apply profile", Collections.EMPTY_LIST);
+ this.model=model;
+ this.profile=profile;
+
+ }
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ PackageUtil.applyProfile(model, profile, false);
+ System.out.println("test");
+ return null;
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestLayoutWithStereotype.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestLayoutWithStereotype.java
new file mode 100644
index 00000000000..84feb0f055d
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestLayoutWithStereotype.java
@@ -0,0 +1,807 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.Label;
+import org.eclipse.draw2d.RectangleFigure;
+import org.eclipse.draw2d.geometry.Rectangle;
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.commands.ICommandProxy;
+import org.eclipse.gmf.runtime.diagram.ui.commands.SetBoundsCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.gmf.runtime.diagram.ui.figures.ResizableCompartmentFigure;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
+import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
+import org.eclipse.gmf.runtime.emf.core.util.EObjectAdapter;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IShapeCompartmentEditPart;
+import org.eclipse.papyrus.junit.utils.classification.InvalidTest;
+import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper;
+import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.AutomaticCompartmentLayoutManager;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.EditingFlowPage;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.StereotypePropertiesCompartment;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Stereotype;
+import org.junit.Before;
+import org.junit.Test;
+
+/**
+ * the purpose of this class is to test the layout
+ *
+ */
+public class TestLayoutWithStereotype extends AbstractPapyrusTestCase {
+
+ protected static final String ST_LEFT = String.valueOf("\u00AB");
+
+ protected static final String ST_RIGHT = String.valueOf("\u00BB");
+
+ private static final String TEST_PROFILE_STEREOTYPE1 = "testProfile::Stereotype1";
+
+ @InvalidTest("Works on Windows, Fails on Linux. To be investigated further")
+ @Test
+ public void testLayoutStereotypeApplicationOnClass() {
+ testToCreateANode(UMLElementTypes.Class_2008);
+ }
+
+ @Test
+ public void testLayoutStereotypeApplicationOnPackage() {
+ //testToCreateAPackage(UMLElementTypes.Package_2007);
+
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+
+ //VARIABLES
+ org.eclipse.uml2.uml.Class class1 = null;
+ //stereotype that is applied on class1
+ Stereotype stereotypeTest = null;
+ //view of the class
+ View NotationClass1 = null;
+ ClassifierFigure class1figure = null;
+ //editpart of class1
+ GraphicalEditPart classEditPart = null;
+ //compartment of stereotype
+ View appliedStereotypeCompartmentNotation = null;
+ //compartment Shape
+ View shapeCompartmentView = null;
+ //the view of the applied stereotype property
+ View stereotypePropertyView = null;
+ GraphicalEditPart stereotypeCompartmentEdipart = null;
+ GraphicalEditPart stereotypePropertyEdipart = null;
+
+
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
+ //1 element element due to the reference to the profile
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1);
+
+
+ {//execution of the command
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ }
+
+
+
+ //get the created Class
+ class1 = (org.eclipse.uml2.uml.Class)((org.eclipse.uml2.uml.Package)getRootSemanticModel()).getPackagedElement("Class1");
+ assertNotNull("created class must be not null", class1);
+ //look for the editpart that the class
+ classEditPart = (ClassEditPart)getDiagramEditPart().getChildren().get(0);
+ //test if stereotype can be applied
+ assertTrue("stereotype1 must be applicable on class1", class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null);
+
+
+ //look for the applied stereotype compartment
+ NotationClass1 = classEditPart.getNotationView();
+ {//execution of the command
+ SetBoundsCommand resizeCommand = new SetBoundsCommand(diagramEditor.getEditingDomain(), "resize", new EObjectAdapter(NotationClass1), new Rectangle(0, 0, 200, 200));
+
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, resizeCommand.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(resizeCommand));
+ }
+ {//test about the layout
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ class1figure = ((ClassifierFigure)nodePlate.getChildren().get(0));
+ class1figure.setBounds(new Rectangle(0, 0, 200, 200));
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", class1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager);
+ class1figure.getLayoutManager().layout(class1figure);
+ assertEquals("The figure of the Class has not the good X coordinate", class1figure.getBounds().x, 0);
+ assertEquals("The figure of the Class has not the good Y coordinate", class1figure.getBounds().y, 0);
+ assertEquals("The figure of the Class has not the good width coordinate", class1figure.getBounds().width, 200);
+ assertEquals("The figure of the Class has not the good height coordinate", class1figure.getBounds().height, 200);
+
+ // At this moment the class figure must contain 4 sub-figures 1label+ 3compartments
+ assertEquals("The number of figure children must be equal to 4", class1figure.getChildren().size(), 4);
+
+ //wrappinglabel for name
+ assertTrue("The sub figure [0] is not a wrapping label", class1figure.getChildren().get(0) instanceof WrappingLabel);
+ WrappingLabel labelClass = (WrappingLabel)class1figure.getChildren().get(0);
+
+ assertEquals("The label of the Class has not the good X coordinate", labelClass.getBounds().x, 1);
+ assertEquals("The label of the Class has not the good Y coordinate", labelClass.getBounds().y, 3);
+ assertEquals("The label of the Class has not the good width coordinate", labelClass.getBounds().width, 200);
+ assertEquals("The label of the Class has not the good heightcoordinate", labelClass.getBounds().height, 16);
+ assertEquals("The label of the Class does not display Class1", labelClass.getText(), "Class1");
+
+ assertTrue("The sub figure [0] is not a compartment", class1figure.getChildren().get(1) instanceof RectangleFigure);
+ RectangleFigure propertiesClass = (RectangleFigure)class1figure.getChildren().get(1);
+ assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure", propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+ // compartment for attribute
+ assertEquals("The compartment attribute of the Class has not the good X coordinate", propertiesClass.getBounds().x, 1);
+ assertEquals("The compartment attribute of the Class has not the good Y coordinate", propertiesClass.getBounds().y, 20);
+ assertEquals("The compartment attribute of the Class has not the good width coordinate", propertiesClass.getBounds().width, 200);
+ assertEquals("The compartment attribute of the Class has not the good height coordinate", propertiesClass.getBounds().height, 59);
+
+
+ //compartment for operation
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", class1figure.getChildren().get(2) instanceof RectangleFigure);
+ RectangleFigure operationsClass = (RectangleFigure)class1figure.getChildren().get(2);
+ assertTrue("The sub figure [0] is not the operation compartment is not a ResizableCompartmentFigure", operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertEquals("The compartment operation of the Class has not the good X coordinate", operationsClass.getBounds().x, 1);
+ assertEquals("The compartment operation of the Class has not the good y coordinate", operationsClass.getBounds().y, 80);
+ assertEquals("The compartment operation of the Class has not the good width coordinate", operationsClass.getBounds().width, 200);
+ assertEquals("The compartment operation of the Class has not the good height coordinate", operationsClass.getBounds().height, 59);
+
+
+ // compartment for nested classifier
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", class1figure.getChildren().get(3) instanceof RectangleFigure);
+ RectangleFigure innerclassifiersClass = (RectangleFigure)class1figure.getChildren().get(3);
+ assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure", innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertEquals("The compartment nested classifier of the Class has not the good X coordinate", innerclassifiersClass.getBounds().x, 1);
+ assertEquals("The compartment nested classifier of the Class has not the good Y coordinate", innerclassifiersClass.getBounds().y, 140);
+ assertEquals("The compartment nested classifier of the Class has not the good width coordinate", innerclassifiersClass.getBounds().width, 200);
+ assertEquals("The compartment nested classifier of the Class has not the good Height coordinate", innerclassifiersClass.getBounds().height, 59);
+
+ }
+
+ {// execution of the application of the stereotype
+ ArrayList<Stereotype> stereotypeslist = new ArrayList<Stereotype>();
+ stereotypeslist.add(class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1));
+ ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)classEditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain());
+ diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand);
+ assertTrue("No applied stereotype found on the element ", class1.getAppliedStereotypes().size() != 0);
+ }
+
+
+
+ for(int i = 0; i < NotationClass1.getTransientChildren().size(); i++) {
+ View view = (View)NotationClass1.getTransientChildren().get(i);
+ if(view.getType().equals(AppliedStereotypeCompartmentEditPart.ID)) {
+ appliedStereotypeCompartmentNotation = view;
+ }
+ if(view.getType().equals(IShapeCompartmentEditPart.VIEW_TYPE)) {
+ shapeCompartmentView = view;
+ }
+ }
+ // the mechanism of stereotype display is running.
+ //the thread is synchronous
+ assertTrue("No stereotype Compartment found in the notation", appliedStereotypeCompartmentNotation != null);
+ assertTrue("No stereotype shape Compartment found in the notation", shapeCompartmentView != null);
+
+ //now display stereotypes
+ stereotypeTest = class1.getAppliedStereotypes().get(0);
+
+ {//display stereotype1
+ RecordingCommand displayStereotypeCommand = AppliedStereotypeHelper.getAppliedStereotypeToDisplayCommand(diagramEditor.getEditingDomain(), NotationClass1, stereotypeTest.getQualifiedName(), UMLVisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION);
+
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayStereotypeCommand);
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
+
+ //get the label
+ org.eclipse.draw2d.Label stereotypeLabel = ((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
+ assertTrue("stereotype label must be not null", stereotypeLabel != null);
+ assertEquals("text of stereotype label be equals to " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypeLabel.getText(), ST_LEFT + "stereotype1" + ST_RIGHT);
+ }
+
+ {//test about the layout
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ class1figure = ((ClassifierFigure)nodePlate.getChildren().get(0));
+ class1figure.setBounds(new Rectangle(0, 0, 200, 200));
+ assertTrue("The figure of «stereotype1»Class1 is not an automaticCompartmentLayoutManager", class1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager);
+ class1figure.getLayoutManager().layout(class1figure);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good X coordinate", class1figure.getBounds().x, 0);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good Y coordinate", class1figure.getBounds().y, 0);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good width coordinate", class1figure.getBounds().width, 200);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good height coordinate", class1figure.getBounds().height, 200);
+
+ // At this moment the class figure must contain 5 sub-figures 1 label for stereotype+ 1label for name+ 3compartments
+ assertEquals("The number of children «stereotype1»Class1 is not equals to 5", class1figure.getChildren().size(), 5);
+
+
+ //wrappingLabel for stereotype
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a label", class1figure.getChildren().get(0) instanceof Label);
+ Label stereotypelabelClass = (Label)class1figure.getChildren().get(0);
+
+ assertEquals("The label of the Class has not the good X coordinate", stereotypelabelClass.getBounds().x, 1);
+ assertEquals("The label of the Class has not the good Y coordinate", stereotypelabelClass.getBounds().y, 3);
+ assertEquals("The label of the Class has not the good width coordinate", stereotypelabelClass.getBounds().width, 200);
+ assertEquals("The label of the Class has not the good heightcoordinate", stereotypelabelClass.getBounds().height, 15);
+ assertEquals("The label of the Class does not display " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypelabelClass.getText(), ST_LEFT + "stereotype1" + ST_RIGHT);
+
+
+ //wrappingLabel for name
+ assertTrue("The sub figure [1] of «stereotype1»Class1 is not a wrapping label", class1figure.getChildren().get(1) instanceof WrappingLabel);
+ WrappingLabel labelClass = (WrappingLabel)class1figure.getChildren().get(1);
+
+ assertEquals("The label of the Class has not the good X coordinate", labelClass.getBounds().x, 1);
+ assertEquals("The label of the Class has not the good Y coordinate", labelClass.getBounds().y, 19);
+ assertEquals("The label of the Class has not the good width coordinate", labelClass.getBounds().width, 200);
+ assertEquals("The label of the Class has not the good heightcoordinate", labelClass.getBounds().height, 16);
+ assertEquals("The label of the Class does not display Class1", labelClass.getText(), "Class1");
+
+ // compartment for property of stereotype
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a compartment", class1figure.getChildren().get(2) instanceof RectangleFigure);
+ RectangleFigure stereotypePropertiesClass = (RectangleFigure)class1figure.getChildren().get(2);
+ assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure", stereotypePropertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+
+ assertEquals("The compartment attribute of the Class has not the good X coordinate", stereotypePropertiesClass.getBounds().x, 1);
+ assertEquals("The compartment attribute of the Class has not the good Y coordinate", stereotypePropertiesClass.getBounds().y, 36);
+ assertEquals("The compartment attribute of the Class has not the good width coordinate", stereotypePropertiesClass.getBounds().width, 200);
+ assertEquals("The compartment attribute of the Class has not the good height coordinate", stereotypePropertiesClass.getBounds().height, 54);
+
+
+ // compartment attribute
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a compartment", class1figure.getChildren().get(2) instanceof RectangleFigure);
+ RectangleFigure propertiesClass = (RectangleFigure)class1figure.getChildren().get(2);
+ assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure", propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+
+ assertEquals("The compartment attribute of the Class has not the good X coordinate", propertiesClass.getBounds().x, 1);
+ assertEquals("The compartment attribute of the Class has not the good Y coordinate", propertiesClass.getBounds().y, 36);
+ assertEquals("The compartment attribute of the Class has not the good width coordinate", propertiesClass.getBounds().width, 200);
+ assertEquals("The compartment attribute of the Class has not the good height coordinate", propertiesClass.getBounds().height, 54);
+
+
+ //compartment for operation
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", class1figure.getChildren().get(3) instanceof RectangleFigure);
+ RectangleFigure operationsClass = (RectangleFigure)class1figure.getChildren().get(3);
+ assertTrue("The sub figure [2] is not the operation compartment is not a ResizableCompartmentFigure", operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertEquals("The compartment operation of the Class has not the good X coordinate", operationsClass.getBounds().x, 1);
+ assertEquals("The compartment operation of the Class has not the good y coordinate", operationsClass.getBounds().y, 91);
+ assertEquals("The compartment operation of the Class has not the good width coordinate", operationsClass.getBounds().width, 200);
+ assertEquals("The compartment operation of the Class has not the good height coordinate", operationsClass.getBounds().height, 54);
+
+ //compartment for nested classifier
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", class1figure.getChildren().get(4) instanceof RectangleFigure);
+ RectangleFigure innerclassifiersClass = (RectangleFigure)class1figure.getChildren().get(4);
+ assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure", innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertEquals("The compartment nested classifier of the Class has not the good X coordinate", innerclassifiersClass.getBounds().x, 1);
+ assertEquals("The compartment nested classifier of the Class has not the good Y coordinate", innerclassifiersClass.getBounds().y, 146);
+ assertEquals("The compartment nested classifier of the Class has not the good width coordinate", innerclassifiersClass.getBounds().width, 200);
+ assertEquals("The compartment nested classifier of the Class has not the good Height coordinate", innerclassifiersClass.getBounds().height, 54);
+
+ }
+
+
+
+
+
+ {//test display of property of stereotype in compartment
+ RecordingCommand displayPropertyStereotypeCommand = AppliedStereotypeHelper.getAddAppliedStereotypePropertiesCommand(diagramEditor.getEditingDomain(), NotationClass1, stereotypeTest.getQualifiedName() + ".testInt");
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayPropertyStereotypeCommand);
+
+ //the compartment must be visible
+ assertTrue("the compartment must be visible", appliedStereotypeCompartmentNotation.isVisible() == true);
+ //look for view that represents the property of the applied stereotype
+ stereotypePropertyView = (View)appliedStereotypeCompartmentNotation.getChildren().get(0);
+ assertNotNull("the view of the applied stereotype property must be created", stereotypePropertyView);
+ //look for the editpart that represents the property of applied stereotype
+ stereotypeCompartmentEdipart = (GraphicalEditPart)classEditPart.getChildBySemanticHint(AppliedStereotypeCompartmentEditPart.ID);
+ stereotypePropertyEdipart = (GraphicalEditPart)stereotypeCompartmentEdipart.getChildBySemanticHint(AppliedStereotypeMultilinePropertyEditPart.ID);
+ assertNotNull("the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart);
+ assertNotNull("the editpart of the applied stereotype property must be created", stereotypePropertyEdipart);
+ EditingFlowPage textarea = (EditingFlowPage)stereotypePropertyEdipart.getFigure();
+ assertEquals("text of stereotype label be equals to «stereotype1» ", ((TextFlowEx)textarea.getChildren().get(0)).getText(), "testInt=0");
+ }
+
+ {//test about the layout
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ class1figure = ((ClassifierFigure)nodePlate.getChildren().get(0));
+ class1figure.setBounds(new Rectangle(0, 0, 200, 200));
+ assertTrue("The figure of «stereotype1»Class1 is not an automaticCompartmentLayoutManager", class1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager);
+ class1figure.getLayoutManager().layout(class1figure);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good X coordinate", class1figure.getBounds().x, 0);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good Y coordinate", class1figure.getBounds().y, 0);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good width coordinate", class1figure.getBounds().width, 200);
+ assertEquals("The figure of the «stereotype1»Class1 has not the good height coordinate", class1figure.getBounds().height, 200);
+
+ // At this moment the class figure must contain 5 sub-figures 1 label for stereotype+ 1label for name+ compartment of stereotypes+ 3compartments
+ assertEquals("The number of children «stereotype1»Class1 is not equals to 6", class1figure.getChildren().size(), 6);
+
+
+ //label for stereotype
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a label", class1figure.getChildren().get(0) instanceof Label);
+ Label stereotypelabelClass = (Label)class1figure.getChildren().get(0);
+
+ assertEquals("The label of the Class has not the good X coordinate", stereotypelabelClass.getBounds().x, 1);
+ assertEquals("The label of the Class has not the good Y coordinate", stereotypelabelClass.getBounds().y, 3);
+ assertEquals("The label of the Class has not the good width coordinate", stereotypelabelClass.getBounds().width, 200);
+ assertEquals("The label of the Class has not the good heightcoordinate", stereotypelabelClass.getBounds().height, 15);
+ assertEquals("The label of the Class does not display " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypelabelClass.getText(), ST_LEFT + "stereotype1" + ST_RIGHT);
+
+
+ //wrappingLabel for name
+ assertTrue("The sub figure [1] of «stereotype1»Class1 is not a wrapping label", class1figure.getChildren().get(1) instanceof WrappingLabel);
+ WrappingLabel labelClass = (WrappingLabel)class1figure.getChildren().get(1);
+
+ assertEquals("The label of the Class has not the good X coordinate", labelClass.getBounds().x, 1);
+ assertEquals("The label of the Class has not the good Y coordinate", labelClass.getBounds().y, 19);
+ assertEquals("The label of the Class has not the good width coordinate", labelClass.getBounds().width, 200);
+ assertEquals("The label of the Class has not the good heightcoordinate", labelClass.getBounds().height, 16);
+ assertEquals("The label of the Class does not display Class1", labelClass.getText(), "Class1");
+
+
+ // compartment for property of stereotypes
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", class1figure.getChildren().get(2) instanceof StereotypePropertiesCompartment);
+ StereotypePropertiesCompartment sterotypesPropertiesClass = (StereotypePropertiesCompartment)class1figure.getChildren().get(2);
+
+ assertTrue("the stereotype properties compartment does not conent the compartment for a stereotype", sterotypesPropertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ ResizableCompartmentFigure compartmentFigure = (ResizableCompartmentFigure)sterotypesPropertiesClass.getChildren().get(0);
+ assertTrue("The content of the sterotype properties compartment is not an EditingFlowPage", compartmentFigure.getContentPane().getChildren().get(0) instanceof EditingFlowPage);
+ EditingFlowPage stereotypeProperty = (EditingFlowPage)compartmentFigure.getContentPane().getChildren().get(0);
+ assertTrue("text of stereotype label be equals to «stereotype1» ", ((TextFlowEx)stereotypeProperty.getChildren().get(0)).getText().equals("testInt=0"));
+
+ assertEquals("The compartment property of stereotypes of the Class has not the good X coordinate", sterotypesPropertiesClass.getBounds().x, 1);
+ assertEquals("The compartment property of stereotypes of the Class has not the good Y coordinate", sterotypesPropertiesClass.getBounds().y, 36);
+ assertEquals("The compartment property of stereotypes of the Class has not the good width coordinate", sterotypesPropertiesClass.getBounds().width, 200);
+ assertEquals("The compartment property of stereotypes of the Class has not the good height coordinate", sterotypesPropertiesClass.getBounds().height, 51);
+
+ //compartment for attribute
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", class1figure.getChildren().get(3) instanceof RectangleFigure);
+ RectangleFigure propertiesClass = (RectangleFigure)class1figure.getChildren().get(3);
+ assertTrue("The sub figure [2] is not the attribute compartment is not a ResizableCompartmentFigure", propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+ assertEquals("The compartment attribute of the Class has not the good X coordinate", propertiesClass.getBounds().x, 1);
+ assertEquals("The compartment attribute of the Class has not the good Y coordinate", propertiesClass.getBounds().y, 88);
+ assertEquals("The compartment attribute of the Class has not the good width coordinate", propertiesClass.getBounds().width, 200);
+ assertEquals("The compartment attribute of the Class has not the good height coordinate", propertiesClass.getBounds().height, 37);
+
+
+ //compartment for operation
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", class1figure.getChildren().get(4) instanceof RectangleFigure);
+ RectangleFigure operationsClass = (RectangleFigure)class1figure.getChildren().get(4);
+ assertTrue("The sub figure [2] is not the operation compartment is not a ResizableCompartmentFigure", operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertEquals("The compartment operation of the Class has not the good X coordinate", operationsClass.getBounds().x, 1);
+ assertEquals("The compartment operation of the Class has not the good y coordinate", operationsClass.getBounds().y, 126);
+ assertEquals("The compartment operation of the Class has not the good width coordinate", operationsClass.getBounds().width, 200);
+ assertEquals("The compartment operation of the Class has not the good height coordinate", operationsClass.getBounds().height, 37);
+
+ //compartment for nested classifier
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", class1figure.getChildren().get(5) instanceof RectangleFigure);
+ RectangleFigure innerclassifiersClass = (RectangleFigure)class1figure.getChildren().get(5);
+ assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure", innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertEquals("The compartment nested classifier of the Class has not the good X coordinate", innerclassifiersClass.getBounds().x, 1);
+ assertEquals("The compartment nested classifier of the Class has not the good Y coordinate", innerclassifiersClass.getBounds().y, 164);
+ assertEquals("The compartment nested classifier of the Class has not the good width coordinate", innerclassifiersClass.getBounds().width, 200);
+ assertEquals("The compartment nested classifier of the Class has not the good Height coordinate", innerclassifiersClass.getBounds().height, 37);
+
+ }
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateAPackage(IElementType type) {
+
+ //VARIABLES
+ org.eclipse.uml2.uml.Package package1 = null;
+ //stereotype that is applied on class1
+ Stereotype stereotypeTest = null;
+ //view of the class
+ View NotationPackage1 = null;
+ PackageFigure package1figure = null;
+ //editpart of class1
+ GraphicalEditPart packageEditPart = null;
+ //compartment of stereotype
+ View appliedStereotypeCompartmentNotation = null;
+ //compartment Shape
+ View shapeCompartmentView = null;
+ //the view of the applied stereotype property
+ View stereotypePropertyView = null;
+ GraphicalEditPart stereotypeCompartmentEdipart = null;
+ GraphicalEditPart stereotypePropertyEdipart = null;
+
+
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
+ //1 element element due to the reference to the profile
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1);
+
+
+ {//execution of the command
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ }
+
+
+
+ //get the created Class
+ package1 = (org.eclipse.uml2.uml.Package)((org.eclipse.uml2.uml.Package)getRootSemanticModel()).getPackagedElement("Package1");
+ assertNotNull("created class must be not null", package1);
+ //look for the editpart that the class
+ packageEditPart = (PackageEditPart)getDiagramEditPart().getChildren().get(0);
+ //test if stereotype can be applied
+ assertTrue("stereotype1 must be applicable on class1", package1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null);
+
+
+ //look for the applied stereotype compartment
+ NotationPackage1 = packageEditPart.getNotationView();
+ {//execution of the command
+ SetBoundsCommand resizeCommand = new SetBoundsCommand(diagramEditor.getEditingDomain(), "resize", new EObjectAdapter(NotationPackage1), new Rectangle(0, 0, 200, 200));
+
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, resizeCommand.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(new ICommandProxy(resizeCommand));
+ }
+ {//test about the layout
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)packageEditPart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ package1figure = ((PackageFigure)nodePlate.getChildren().get(0));
+ package1figure.setBounds(new Rectangle(0, 0, 200, 200));
+ assertTrue("The figure of package1 is not an automaticCompartmentLayoutManager", package1figure.getLayoutManager() instanceof Package);
+ package1figure.getLayoutManager().layout(package1figure);
+ assertTrue("The figure of the Class has not the good X coordinate", package1figure.getBounds().x == 0);
+ assertTrue("The figure of the Class has not the good Y coordinate", package1figure.getBounds().y == 0);
+ assertTrue("The figure of the Class has not the good width coordinate", package1figure.getBounds().width == 200);
+ assertTrue("The figure of the Class has not the good height coordinate", package1figure.getBounds().height == 200);
+
+ // At this moment the class figure must contain 4 sub-figures 1label+ 3compartments
+ assertTrue("The number of figure children must be equal to 4", package1figure.getChildren().size() == 4);
+
+ //wrappinglabel for name
+ assertTrue("The sub figure [0] is not a wrapping label", package1figure.getChildren().get(0) instanceof WrappingLabel);
+ WrappingLabel labelClass = (WrappingLabel)package1figure.getChildren().get(0);
+
+ assertTrue("The label of the Class has not the good X coordinate", labelClass.getBounds().x == 1);
+ assertTrue("The label of the Class has not the good Y coordinate", labelClass.getBounds().y == 3);
+ assertTrue("The label of the Class has not the good width coordinate", labelClass.getBounds().width == 200);
+ assertTrue("The label of the Class has not the good heightcoordinate", labelClass.getBounds().height == 16);
+ assertEquals("The label of the Class does not display Class1", labelClass.getText(), "Class1");
+
+ assertTrue("The sub figure [0] is not a compartment", package1figure.getChildren().get(1) instanceof RectangleFigure);
+ RectangleFigure propertiesClass = (RectangleFigure)package1figure.getChildren().get(1);
+ assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure", propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+ // compartment for attribute
+ assertTrue("The compartment attribute of the Class has not the good X coordinate", propertiesClass.getBounds().x == 1);
+ assertTrue("The compartment attribute of the Class has not the good Y coordinate", propertiesClass.getBounds().y == 20);
+ assertTrue("The compartment attribute of the Class has not the good width coordinate", propertiesClass.getBounds().width == 200);
+ assertTrue("The compartment attribute of the Class has not the good height coordinate", propertiesClass.getBounds().height == 59);
+
+
+ //compartment for operation
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", package1figure.getChildren().get(2) instanceof RectangleFigure);
+ RectangleFigure operationsClass = (RectangleFigure)package1figure.getChildren().get(2);
+ assertTrue("The sub figure [0] is not the operation compartment is not a ResizableCompartmentFigure", operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertTrue("The compartment operation of the Class has not the good X coordinate", operationsClass.getBounds().x == 1);
+ assertTrue("The compartment operation of the Class has not the good y coordinate", operationsClass.getBounds().y == 80);
+ assertTrue("The compartment operation of the Class has not the good width coordinate", operationsClass.getBounds().width == 200);
+ assertTrue("The compartment operation of the Class has not the good height coordinate", operationsClass.getBounds().height == 59);
+
+
+ // compartment for nested classifier
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", package1figure.getChildren().get(3) instanceof RectangleFigure);
+ RectangleFigure innerclassifiersClass = (RectangleFigure)package1figure.getChildren().get(3);
+ assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure", innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertTrue("The compartment nested classifier of the Class has not the good X coordinate", innerclassifiersClass.getBounds().x == 1);
+ assertTrue("The compartment nested classifier of the Class has not the good Y coordinate", innerclassifiersClass.getBounds().y == 140);
+ assertTrue("The compartment nested classifier of the Class has not the good width coordinate", innerclassifiersClass.getBounds().width == 200);
+ assertTrue("The compartment nested classifier of the Class has not the good Height coordinate", innerclassifiersClass.getBounds().height == 59);
+
+ }
+
+ {// execution of the application of the stereotype
+ ArrayList<Stereotype> stereotypeslist = new ArrayList<Stereotype>();
+ stereotypeslist.add(package1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1));
+ ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)packageEditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain());
+ diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand);
+ assertTrue("No applied stereotype found on the element ", package1.getAppliedStereotypes().size() != 0);
+ }
+
+
+
+ for(int i = 0; i < NotationPackage1.getTransientChildren().size(); i++) {
+ View view = (View)NotationPackage1.getTransientChildren().get(i);
+ if(view.getType().equals(AppliedStereotypeCompartmentEditPart.ID)) {
+ appliedStereotypeCompartmentNotation = view;
+ }
+ if(view.getType().equals(IShapeCompartmentEditPart.VIEW_TYPE)) {
+ shapeCompartmentView = view;
+ }
+ }
+ // the mechanism of stereotype display is running.
+ //the thread is synchronous
+ assertTrue("No stereotype Compartment found in the notation", appliedStereotypeCompartmentNotation != null);
+ assertTrue("No stereotype shape Compartment found in the notation", shapeCompartmentView != null);
+
+ //now display stereotypes
+ stereotypeTest = package1.getAppliedStereotypes().get(0);
+
+ {//display stereotype1
+ RecordingCommand displayStereotypeCommand = AppliedStereotypeHelper.getAppliedStereotypeToDisplayCommand(diagramEditor.getEditingDomain(), NotationPackage1, stereotypeTest.getQualifiedName(), UMLVisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION);
+
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayStereotypeCommand);
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)packageEditPart.getFigure()).getChildren().get(0);
+
+ //get the label
+ org.eclipse.draw2d.Label stereotypeLabel = ((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
+ assertTrue("stereotype label must be not null", stereotypeLabel != null);
+ assertTrue("text of stereotype label be equals to " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypeLabel.getText().equals(ST_LEFT + "stereotype1" + ST_RIGHT));
+ }
+
+ {//test about the layout
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)packageEditPart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ package1figure = ((PackageFigure)nodePlate.getChildren().get(0));
+ package1figure.setBounds(new Rectangle(0, 0, 200, 200));
+ assertTrue("The figure of «stereotype1»Class1 is not an automaticCompartmentLayoutManager", package1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager);
+ package1figure.getLayoutManager().layout(package1figure);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good X coordinate", package1figure.getBounds().x == 0);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good Y coordinate", package1figure.getBounds().y == 0);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good width coordinate", package1figure.getBounds().width == 200);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good height coordinate", package1figure.getBounds().height == 200);
+
+ // At this moment the class figure must contain 5 sub-figures 1 label for stereotype+ 1label for name+ 3compartments
+ assertTrue("The number of children «stereotype1»Class1 is not equals to 6", package1figure.getChildren().size() == 5);
+
+
+ //wrappingLabel for stereotype
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a label", package1figure.getChildren().get(0) instanceof Label);
+ Label stereotypelabelClass = (Label)package1figure.getChildren().get(0);
+
+ assertTrue("The label of the Class has not the good X coordinate", stereotypelabelClass.getBounds().x == 1);
+ assertTrue("The label of the Class has not the good Y coordinate", stereotypelabelClass.getBounds().y == 3);
+ assertTrue("The label of the Class has not the good width coordinate", stereotypelabelClass.getBounds().width == 200);
+ assertTrue("The label of the Class has not the good heightcoordinate", stereotypelabelClass.getBounds().height == 15);
+ assertEquals("The label of the Class does not display " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypelabelClass.getText(), ST_LEFT + "stereotype1" + ST_RIGHT);
+
+
+ //wrappingLabel for name
+ assertTrue("The sub figure [1] of «stereotype1»Class1 is not a wrapping label", package1figure.getChildren().get(1) instanceof WrappingLabel);
+ WrappingLabel labelClass = (WrappingLabel)package1figure.getChildren().get(1);
+
+ assertTrue("The label of the Class has not the good X coordinate", labelClass.getBounds().x == 1);
+ assertTrue("The label of the Class has not the good Y coordinate", labelClass.getBounds().y == 19);
+ assertTrue("The label of the Class has not the good width coordinate", labelClass.getBounds().width == 200);
+ assertTrue("The label of the Class has not the good heightcoordinate", labelClass.getBounds().height == 16);
+ assertEquals("The label of the Class does not display Class1", labelClass.getText(), "Class1");
+
+ // compartment for property of stereotype
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a compartment", package1figure.getChildren().get(2) instanceof RectangleFigure);
+ RectangleFigure stereotypePropertiesClass = (RectangleFigure)package1figure.getChildren().get(2);
+ assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure", stereotypePropertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+
+ assertTrue("The compartment attribute of the Class has not the good X coordinate", stereotypePropertiesClass.getBounds().x == 1);
+ assertTrue("The compartment attribute of the Class has not the good Y coordinate", stereotypePropertiesClass.getBounds().y == 36);
+ assertTrue("The compartment attribute of the Class has not the good width coordinate", stereotypePropertiesClass.getBounds().width == 200);
+ assertTrue("The compartment attribute of the Class has not the good height coordinate", stereotypePropertiesClass.getBounds().height == 54);
+
+
+ // compartment attribute
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a compartment", package1figure.getChildren().get(2) instanceof RectangleFigure);
+ RectangleFigure propertiesClass = (RectangleFigure)package1figure.getChildren().get(2);
+ assertTrue("The sub figure [0] is not the attribute compartment is not a ResizableCompartmentFigure", propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+
+ assertTrue("The compartment attribute of the Class has not the good X coordinate", propertiesClass.getBounds().x == 1);
+ assertTrue("The compartment attribute of the Class has not the good Y coordinate", propertiesClass.getBounds().y == 36);
+ assertTrue("The compartment attribute of the Class has not the good width coordinate", propertiesClass.getBounds().width == 200);
+ assertTrue("The compartment attribute of the Class has not the good height coordinate", propertiesClass.getBounds().height == 54);
+
+
+ //compartment for operation
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", package1figure.getChildren().get(3) instanceof RectangleFigure);
+ RectangleFigure operationsClass = (RectangleFigure)package1figure.getChildren().get(3);
+ assertTrue("The sub figure [2] is not the operation compartment is not a ResizableCompartmentFigure", operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertTrue("The compartment operation of the Class has not the good X coordinate", operationsClass.getBounds().x == 1);
+ assertTrue("The compartment operation of the Class has not the good y coordinate", operationsClass.getBounds().y == 91);
+ assertTrue("The compartment operation of the Class has not the good width coordinate", operationsClass.getBounds().width == 200);
+ assertTrue("The compartment operation of the Class has not the good height coordinate", operationsClass.getBounds().height == 54);
+
+ //compartment for nested classifier
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", package1figure.getChildren().get(4) instanceof RectangleFigure);
+ RectangleFigure innerclassifiersClass = (RectangleFigure)package1figure.getChildren().get(4);
+ assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure", innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertTrue("The compartment nested classifier of the Class has not the good X coordinate", innerclassifiersClass.getBounds().x == 1);
+ assertTrue("The compartment nested classifier of the Class has not the good Y coordinate", innerclassifiersClass.getBounds().y == 146);
+ assertTrue("The compartment nested classifier of the Class has not the good width coordinate", innerclassifiersClass.getBounds().width == 200);
+ assertTrue("The compartment nested classifier of the Class has not the good Height coordinate", innerclassifiersClass.getBounds().height == 54);
+
+ }
+
+
+
+
+
+ {//test display of property of stereotype in compartment
+ RecordingCommand displayPropertyStereotypeCommand = AppliedStereotypeHelper.getAddAppliedStereotypePropertiesCommand(diagramEditor.getEditingDomain(), NotationPackage1, stereotypeTest.getQualifiedName() + ".testInt");
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayPropertyStereotypeCommand);
+
+ //the compartment must be visible
+ assertTrue("the compartment must be visible", appliedStereotypeCompartmentNotation.isVisible() == true);
+ //look for view that represents the property of the applied stereotype
+ stereotypePropertyView = (View)appliedStereotypeCompartmentNotation.getChildren().get(0);
+ assertNotNull("the view of the applied stereotype property must be created", stereotypePropertyView);
+ //look for the editpart that represents the property of applied stereotype
+ stereotypeCompartmentEdipart = (GraphicalEditPart)packageEditPart.getChildBySemanticHint(AppliedStereotypeCompartmentEditPart.ID);
+ stereotypePropertyEdipart = (GraphicalEditPart)stereotypeCompartmentEdipart.getChildBySemanticHint(AppliedStereotypeMultilinePropertyEditPart.ID);
+ assertNotNull("the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart);
+ assertNotNull("the editpart of the applied stereotype property must be created", stereotypePropertyEdipart);
+ EditingFlowPage textarea = (EditingFlowPage)stereotypePropertyEdipart.getFigure();
+ assertTrue("text of stereotype label be equals to «stereotype1» ", ((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0"));
+ }
+
+ {//test about the layout
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)packageEditPart.getFigure()).getChildren().get(0);
+ // now verify position of each subfigure
+ package1figure = ((PackageFigure)nodePlate.getChildren().get(0));
+ package1figure.setBounds(new Rectangle(0, 0, 200, 200));
+ assertTrue("The figure of «stereotype1»Class1 is not an automaticCompartmentLayoutManager", package1figure.getLayoutManager() instanceof AutomaticCompartmentLayoutManager);
+ package1figure.getLayoutManager().layout(package1figure);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good X coordinate", package1figure.getBounds().x == 0);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good Y coordinate", package1figure.getBounds().y == 0);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good width coordinate", package1figure.getBounds().width == 200);
+ assertTrue("The figure of the «stereotype1»Class1 has not the good height coordinate", package1figure.getBounds().height == 200);
+
+ // At this moment the class figure must contain 5 sub-figures 1 label for stereotype+ 1label for name+ compartment of stereotypes+ 3compartments
+ assertTrue("The number of children «stereotype1»Class1 is not equals to 6", package1figure.getChildren().size() == 6);
+
+
+ //label for stereotype
+ assertTrue("The sub figure [0] of «stereotype1»Class1 is not a label", package1figure.getChildren().get(0) instanceof Label);
+ Label stereotypelabelClass = (Label)package1figure.getChildren().get(0);
+
+ assertTrue("The label of the Class has not the good X coordinate", stereotypelabelClass.getBounds().x == 1);
+ assertTrue("The label of the Class has not the good Y coordinate", stereotypelabelClass.getBounds().y == 3);
+ assertTrue("The label of the Class has not the good width coordinate", stereotypelabelClass.getBounds().width == 200);
+ assertTrue("The label of the Class has not the good heightcoordinate", stereotypelabelClass.getBounds().height == 15);
+ assertEquals("The label of the Class does not display " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypelabelClass.getText(), ST_LEFT + "stereotype1" + ST_RIGHT);
+
+
+ //wrappingLabel for name
+ assertTrue("The sub figure [1] of «stereotype1»Class1 is not a wrapping label", package1figure.getChildren().get(1) instanceof WrappingLabel);
+ WrappingLabel labelClass = (WrappingLabel)package1figure.getChildren().get(1);
+
+ assertTrue("The label of the Class has not the good X coordinate", labelClass.getBounds().x == 1);
+ assertTrue("The label of the Class has not the good Y coordinate", labelClass.getBounds().y == 19);
+ assertTrue("The label of the Class has not the good width coordinate", labelClass.getBounds().width == 200);
+ assertTrue("The label of the Class has not the good heightcoordinate", labelClass.getBounds().height == 16);
+ assertEquals("The label of the Class does not display Class1", labelClass.getText(), "Class1");
+
+
+ // compartment for property of stereotypes
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", package1figure.getChildren().get(2) instanceof StereotypePropertiesCompartment);
+ StereotypePropertiesCompartment sterotypesPropertiesClass = (StereotypePropertiesCompartment)package1figure.getChildren().get(2);
+
+ assertTrue("the stereotype properties compartment does not conent the compartment for a stereotype", sterotypesPropertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ ResizableCompartmentFigure compartmentFigure = (ResizableCompartmentFigure)sterotypesPropertiesClass.getChildren().get(0);
+ assertTrue("The content of the sterotype properties compartment is not an EditingFlowPage", compartmentFigure.getContentPane().getChildren().get(0) instanceof EditingFlowPage);
+ EditingFlowPage stereotypeProperty = (EditingFlowPage)compartmentFigure.getContentPane().getChildren().get(0);
+ assertTrue("text of stereotype label be equals to «stereotype1» ", ((TextFlowEx)stereotypeProperty.getChildren().get(0)).getText().equals("testInt=0"));
+
+ assertTrue("The compartment property of stereotypes of the Class has not the good X coordinate", sterotypesPropertiesClass.getBounds().x == 1);
+ assertTrue("The compartment property of stereotypes of the Class has not the good Y coordinate", sterotypesPropertiesClass.getBounds().y == 36);
+ assertTrue("The compartment property of stereotypes of the Class has not the good width coordinate", sterotypesPropertiesClass.getBounds().width == 200);
+ assertTrue("The compartment property of stereotypes of the Class has not the good height coordinate", sterotypesPropertiesClass.getBounds().height == 51);
+
+ //compartment for attribute
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", package1figure.getChildren().get(3) instanceof RectangleFigure);
+ RectangleFigure propertiesClass = (RectangleFigure)package1figure.getChildren().get(3);
+ assertTrue("The sub figure [2] is not the attribute compartment is not a ResizableCompartmentFigure", propertiesClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+
+ assertTrue("The compartment attribute of the Class has not the good X coordinate", propertiesClass.getBounds().x == 1);
+ assertTrue("The compartment attribute of the Class has not the good Y coordinate", propertiesClass.getBounds().y == 88);
+ assertTrue("The compartment attribute of the Class has not the good width coordinate", propertiesClass.getBounds().width == 200);
+ assertTrue("The compartment attribute of the Class has not the good height coordinate", propertiesClass.getBounds().height == 37);
+
+
+ //compartment for operation
+ assertTrue("The sub figure [2] of «stereotype1»Class1 is not a compartment", package1figure.getChildren().get(4) instanceof RectangleFigure);
+ RectangleFigure operationsClass = (RectangleFigure)package1figure.getChildren().get(4);
+ assertTrue("The sub figure [2] is not the operation compartment is not a ResizableCompartmentFigure", operationsClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertTrue("The compartment operation of the Class has not the good X coordinate", operationsClass.getBounds().x == 1);
+ assertTrue("The compartment operation of the Class has not the good y coordinate", operationsClass.getBounds().y == 126);
+ assertTrue("The compartment operation of the Class has not the good width coordinate", operationsClass.getBounds().width == 200);
+ assertTrue("The compartment operation of the Class has not the good height coordinate", operationsClass.getBounds().height == 37);
+
+ //compartment for nested classifier
+ assertTrue("The figure of class1 is not an automaticCompartmentLayoutManager", package1figure.getChildren().get(5) instanceof RectangleFigure);
+ RectangleFigure innerclassifiersClass = (RectangleFigure)package1figure.getChildren().get(5);
+ assertTrue("The sub figure [0] is not the nested Classifier compartment is not a ResizableCompartmentFigure", innerclassifiersClass.getChildren().get(0) instanceof ResizableCompartmentFigure);
+ assertTrue("The compartment nested classifier of the Class has not the good X coordinate", innerclassifiersClass.getBounds().x == 1);
+ assertTrue("The compartment nested classifier of the Class has not the good Y coordinate", innerclassifiersClass.getBounds().y == 164);
+ assertTrue("The compartment nested classifier of the Class has not the good width coordinate", innerclassifiersClass.getBounds().width == 200);
+ assertTrue("The compartment nested classifier of the Class has not the good Height coordinate", innerclassifiersClass.getBounds().height == 37);
+
+ }
+ }
+
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
+ final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
+ URI modelUri = registeredProfile.uri;
+ @SuppressWarnings("deprecation")
+ final Resource modelResource = Util.getResourceSet(root).getResource(modelUri, true);
+ final Profile profile = (Profile)modelResource.getContents().get(0);
+ // PackageUtil.applyProfile(root,profile, false);
+ final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry());
+ AppliedProfileCommand appliedProfileCommand = new AppliedProfileCommand(domain, root, profile);
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(appliedProfileCommand));
+
+
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestProfileApplication.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestProfileApplication.java
new file mode 100644
index 00000000000..6fb1f576f16
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestProfileApplication.java
@@ -0,0 +1,52 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.junit.Test;
+
+
+public class TestProfileApplication extends AbstractPapyrusTestCase {
+
+ @Test
+ public void testProfileApplicationOnModel() throws ServiceException {
+ RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
+ final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
+ assertTrue("Registered profile not found", registeredProfile != null);
+ URI modelUri = registeredProfile.uri;
+ @SuppressWarnings("deprecation")
+ final Resource modelResource = Util.getResourceSet(root).getResource(modelUri, true);
+ assertTrue("the registered profile is not a profile", (modelResource.getContents().get(0) instanceof Profile));
+ assertTrue("strange profile", ("".equals(registeredProfile.qualifiednames)));
+ final Profile profile = (Profile)modelResource.getContents().get(0);
+ // PackageUtil.applyProfile(root,profile, false);
+ final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry());
+ AppliedProfileCommand appliedProfileCommand = new AppliedProfileCommand(domain, root, profile);
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(appliedProfileCommand));
+
+ assertTrue("Profile not applied", root.getAllAppliedProfiles().size() == 1);
+
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestStereotypeApplication.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestStereotypeApplication.java
new file mode 100644
index 00000000000..a25ae63cf21
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotypeproperty.tests/src/org/eclipse/papyrus/uml/diagram/stereotypeproperty/TestStereotypeApplication.java
@@ -0,0 +1,317 @@
+/*****************************************************************************
+ * Copyright (c) 2012 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.stereotypeproperty;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.emf.transaction.RecordingCommand;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.figures.BorderedNodeFigure;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.draw2d.ui.text.TextFlowEx;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
+import org.eclipse.papyrus.infra.gmfdiag.common.editpart.IShapeCompartmentEditPart;
+import org.eclipse.papyrus.uml.appearance.helper.AppliedStereotypeHelper;
+import org.eclipse.papyrus.uml.appearance.helper.UMLVisualInformationPapyrusConstant;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ClassEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.PackageEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.providers.UMLElementTypes;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.ClassifierFigure;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.EditingFlowPage;
+import org.eclipse.papyrus.uml.diagram.common.figure.node.PackageFigure;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeCompartmentEditPart;
+import org.eclipse.papyrus.uml.diagram.stereotype.edition.editpart.AppliedStereotypeMultilinePropertyEditPart;
+import org.eclipse.papyrus.uml.extensionpoints.profile.RegisteredProfile;
+import org.eclipse.papyrus.uml.extensionpoints.utils.Util;
+import org.eclipse.papyrus.uml.tools.commands.ApplyStereotypeCommand;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.Stereotype;
+import org.junit.Before;
+import org.junit.Test;
+
+
+public class TestStereotypeApplication extends AbstractPapyrusTestCase {
+
+
+ protected static final String ST_LEFT = String.valueOf("\u00AB");
+
+ protected static final String ST_RIGHT = String.valueOf("\u00BB");
+
+ private static final String TEST_PROFILE_STEREOTYPE1 = "testProfile::Stereotype1";
+
+ @Test
+ public void testStereotypeApplicationOnClass() {
+ testToCreateANode(UMLElementTypes.Class_2008);
+
+ }
+
+ @Test
+ public void testStereotypeApplicationOnPackage() {
+ testToCreateAPackage(UMLElementTypes.Package_2007);
+
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+
+ //VARIABLES
+ org.eclipse.uml2.uml.Class class1 = null;
+ //stereotype that is applied on class1
+ Stereotype stereotypeTest = null;
+ //view of the class
+ View NotationClass1 = null;
+ //editpart of class1
+ GraphicalEditPart classEditPart = null;
+ //compartment of stereotype
+ View appliedStereotypeCompartmentNotation = null;
+ //compartment Shape
+ View shapeCompartmentView = null;
+ //the view of the applied stereotype property
+ View stereotypePropertyView = null;
+ GraphicalEditPart stereotypeCompartmentEdipart = null;
+ GraphicalEditPart stereotypePropertyEdipart = null;
+
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
+ //1 element element due to the reference to the profile
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1);
+
+
+ {//execution of the command
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ }
+
+ //get the created Class
+ class1 = (org.eclipse.uml2.uml.Class)((org.eclipse.uml2.uml.Package)getRootSemanticModel()).getPackagedElement("Class1");
+ assertNotNull("created class must be not null", class1);
+ //look for the editpart that the class
+ classEditPart = (ClassEditPart)getDiagramEditPart().getChildren().get(0);
+ //test if stereotype can be applied
+ assertTrue("stereotype1 must be applicable on class1", class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null);
+
+ {// execution of the application of the stereotype
+ ArrayList<Stereotype> stereotypeslist = new ArrayList<Stereotype>();
+ stereotypeslist.add(class1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1));
+ ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)classEditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain());
+ diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand);
+ assertTrue("No applied stereotype found on the element ", class1.getAppliedStereotypes().size() != 0);
+ }
+
+ //look for the applied stereotype compartment
+ NotationClass1 = classEditPart.getNotationView();
+
+ for(int i = 0; i < NotationClass1.getTransientChildren().size(); i++) {
+ View view = (View)NotationClass1.getTransientChildren().get(i);
+ if(view.getType().equals(AppliedStereotypeCompartmentEditPart.ID)) {
+ appliedStereotypeCompartmentNotation = view;
+ }
+ if(view.getType().equals(IShapeCompartmentEditPart.VIEW_TYPE)) {
+ shapeCompartmentView = view;
+ }
+ }
+ // the mechanism of stereotype display is running.
+ //the thread is synchronous
+ assertTrue("No stereotype Compartment found in the notation", appliedStereotypeCompartmentNotation != null);
+ assertTrue("No stereotype shape Compartment found in the notation", shapeCompartmentView != null);
+
+ //now display stereotypes
+ stereotypeTest = class1.getAppliedStereotypes().get(0);
+
+ {//display stereotype1
+ RecordingCommand displayStereotypeCommand = AppliedStereotypeHelper.getAppliedStereotypeToDisplayCommand(diagramEditor.getEditingDomain(), NotationClass1, stereotypeTest.getQualifiedName(), UMLVisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION);
+
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayStereotypeCommand);
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)classEditPart.getFigure()).getChildren().get(0);
+
+ //get the label
+ org.eclipse.draw2d.Label stereotypeLabel = ((ClassifierFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
+ assertTrue("stereotype label must be not null", stereotypeLabel != null);
+ assertTrue("text of stereotype label be equals to" + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypeLabel.getText().equals(ST_LEFT + "stereotype1" + ST_RIGHT));
+ }
+
+ {//test display of property of stereotype in compartment
+ RecordingCommand displayPropertyStereotypeCommand = AppliedStereotypeHelper.getAddAppliedStereotypePropertiesCommand(diagramEditor.getEditingDomain(), NotationClass1, stereotypeTest.getQualifiedName() + ".testInt");
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayPropertyStereotypeCommand);
+
+ //the compartment must be visible
+ assertTrue("the compartment must be visible", appliedStereotypeCompartmentNotation.isVisible() == true);
+ //look for view that represents the property of the applied stereotype
+ stereotypePropertyView = (View)appliedStereotypeCompartmentNotation.getChildren().get(0);
+ assertNotNull("the view of the applied stereotype property must be created", stereotypePropertyView);
+ //look for the editpart that represents the property of applied stereotype
+ stereotypeCompartmentEdipart = (GraphicalEditPart)classEditPart.getChildBySemanticHint(AppliedStereotypeCompartmentEditPart.ID);
+ stereotypePropertyEdipart = (GraphicalEditPart)stereotypeCompartmentEdipart.getChildBySemanticHint(AppliedStereotypeMultilinePropertyEditPart.ID);
+ assertNotNull("the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart);
+ assertNotNull("the editpart of the applied stereotype property must be created", stereotypePropertyEdipart);
+ EditingFlowPage textarea = (EditingFlowPage)stereotypePropertyEdipart.getFigure();
+ assertTrue("text of stereotype label be equals to «stereotype1» ", ((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0"));
+ }
+ }
+
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ RegisteredProfile registeredProfile = RegisteredProfile.getRegisteredProfile("TestProfile");
+ final Model root = ((Model)getDiagramEditPart().resolveSemanticElement());
+ URI modelUri = registeredProfile.uri;
+ @SuppressWarnings("deprecation")
+ final Resource modelResource = Util.getResourceSet(root).getResource(modelUri, true);
+ final Profile profile = (Profile)modelResource.getContents().get(0);
+ // PackageUtil.applyProfile(root,profile, false);
+ final TransactionalEditingDomain domain = ServiceUtils.getInstance().getTransactionalEditingDomain(papyrusEditor.getServicesRegistry());
+ AppliedProfileCommand appliedProfileCommand = new AppliedProfileCommand(domain, root, profile);
+ domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(appliedProfileCommand));
+
+
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateAPackage(IElementType type) {
+
+ //VARIABLES
+ org.eclipse.uml2.uml.Package package1 = null;
+ //stereotype that is applied on class1
+ Stereotype stereotypeTest = null;
+ //view of the class
+ View Notationpackage1 = null;
+ //editpart of class1
+ GraphicalEditPart package1EditPart = null;
+ //compartment of stereotype
+ View appliedStereotypeCompartmentNotation = null;
+ //compartment Shape
+ View shapeCompartmentView = null;
+ //the view of the applied stereotype property
+ View stereotypePropertyView = null;
+ GraphicalEditPart stereotypeCompartmentEdipart = null;
+ GraphicalEditPart stereotypePropertyEdipart = null;
+
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
+ //1 element element due to the reference to the profile
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Model)getRootSemanticModel()).getAllAppliedProfiles().size() == 1);
+
+
+ {//execution of the command
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ }
+
+ //get the created Class
+ package1 = (org.eclipse.uml2.uml.Package)((org.eclipse.uml2.uml.Package)getRootSemanticModel()).getPackagedElement("Package1");
+ assertNotNull("created class must be not null", package1);
+ //look for the editpart that the class
+ package1EditPart = (PackageEditPart)getDiagramEditPart().getChildren().get(0);
+ //test if stereotype can be applied
+ assertTrue("stereotype1 must be applicable on class1", package1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1) != null);
+
+ {// execution of the application of the stereotype
+ ArrayList<Stereotype> stereotypeslist = new ArrayList<Stereotype>();
+ stereotypeslist.add(package1.getApplicableStereotype(TEST_PROFILE_STEREOTYPE1));
+ ApplyStereotypeCommand applyStereotypeCommand = new ApplyStereotypeCommand(((Element)package1EditPart.resolveSemanticElement()), stereotypeslist, diagramEditor.getEditingDomain());
+ diagramEditor.getEditingDomain().getCommandStack().execute(applyStereotypeCommand);
+ assertTrue("No applied stereotype found on the element ", package1.getAppliedStereotypes().size() != 0);
+ }
+
+ //look for the applied stereotype compartment
+ Notationpackage1 = package1EditPart.getNotationView();
+
+ for(int i = 0; i < Notationpackage1.getTransientChildren().size(); i++) {
+ View view = (View)Notationpackage1.getTransientChildren().get(i);
+ if(view.getType().equals(AppliedStereotypeCompartmentEditPart.ID)) {
+ appliedStereotypeCompartmentNotation = view;
+ }
+ if(view.getType().equals(IShapeCompartmentEditPart.VIEW_TYPE)) {
+ shapeCompartmentView = view;
+ }
+ }
+ // the mechanism of stereotype display is running.
+ //the thread is synchronous
+ assertTrue("No stereotype Compartment found in the notation", appliedStereotypeCompartmentNotation != null);
+ assertTrue("No stereotype shape Compartment found in the notation", shapeCompartmentView != null);
+
+ //now display stereotypes
+ stereotypeTest = package1.getAppliedStereotypes().get(0);
+
+ {//display stereotype1
+ RecordingCommand displayStereotypeCommand = AppliedStereotypeHelper.getAppliedStereotypeToDisplayCommand(diagramEditor.getEditingDomain(), Notationpackage1, stereotypeTest.getQualifiedName(), UMLVisualInformationPapyrusConstant.STEREOTYPE_COMPARTMENT_LOCATION);
+
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayStereotypeCommand);
+ org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure nodePlate = (org.eclipse.papyrus.infra.gmfdiag.common.figure.node.SVGNodePlateFigure)((BorderedNodeFigure)package1EditPart.getFigure()).getChildren().get(0);
+
+ //get the label
+ org.eclipse.draw2d.Label stereotypeLabel = ((PackageFigure)nodePlate.getChildren().get(0)).getStereotypesLabel();
+ assertTrue("stereotype label must be not null", stereotypeLabel != null);
+ assertTrue("text of stereotype label be equals to " + ST_LEFT + "stereotype1" + ST_RIGHT, stereotypeLabel.getText().equals(ST_LEFT + "stereotype1" + ST_RIGHT));
+ }
+
+ {//test display of property of stereotype in compartment
+ RecordingCommand displayPropertyStereotypeCommand = AppliedStereotypeHelper.getAddAppliedStereotypePropertiesCommand(diagramEditor.getEditingDomain(), Notationpackage1, stereotypeTest.getQualifiedName() + ".testInt");
+ diagramEditor.getEditingDomain().getCommandStack().execute(displayPropertyStereotypeCommand);
+
+ //the compartment must be visible
+ assertTrue("the compartment must be visible", appliedStereotypeCompartmentNotation.isVisible() == true);
+ //look for view that represents the property of the applied stereotype
+ stereotypePropertyView = (View)appliedStereotypeCompartmentNotation.getChildren().get(0);
+ assertNotNull("the view of the applied stereotype property must be created", stereotypePropertyView);
+ //look for the editpart that represents the property of applied stereotype
+ stereotypeCompartmentEdipart = (GraphicalEditPart)package1EditPart.getChildBySemanticHint(AppliedStereotypeCompartmentEditPart.ID);
+ stereotypePropertyEdipart = (GraphicalEditPart)stereotypeCompartmentEdipart.getChildBySemanticHint(AppliedStereotypeMultilinePropertyEditPart.ID);
+ assertNotNull("the editpart of the applied stereotype compartment must be created", stereotypeCompartmentEdipart);
+ assertNotNull("the editpart of the applied stereotype property must be created", stereotypePropertyEdipart);
+ EditingFlowPage textarea = (EditingFlowPage)stereotypePropertyEdipart.getFigure();
+ assertTrue("text of stereotype label be equals to " + ST_LEFT + "stereotype1" + ST_RIGHT, ((TextFlowEx)textarea.getChildren().get(0)).getText().equals("testInt=0"));
+ }
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.classpath b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.classpath
new file mode 100644
index 00000000000..2d1a4302f04
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.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/J2SE-1.5"/>
+ <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/diagram/org.eclipse.papyrus.uml.diagram.tests/.project b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project
new file mode 100644
index 00000000000..95c30608d35
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.diagram.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/diagram/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..44217f8c068
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,7 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.5
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..7f8cf5f0980
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,36 @@
+Manifest-Version: 1.0
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
+ org.eclipse.papyrus.editor;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui.resources.editor;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.diagram.common;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
+ org.eclipse.uml2.uml;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
+ org.eclipse.ui.ide;bundle-version="3.8.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.0.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
+ org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.0.0",
+ org.eclipse.gmf.runtime.common.core,
+ org.eclipse.papyrus.junit.utils;bundle-version="1.0.0",
+ org.eclipse.papyrus.uml.diagram.profile;bundle-version="1.0.0"
+Export-Package: org.eclipse.papyrus.uml.diagram.tests.canonical
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.0.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-Activator: org.eclipse.papyrus.uml.diagram.tests.Activator
+Bundle-SymbolicName: org.eclipse.papyrus.uml.diagram.tests
+Bundle-RequiredExecutionEnvironment: J2SE-1.5
+
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/about.html b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/about.html
new file mode 100644
index 00000000000..82d49bf5f81
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.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/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties
new file mode 100644
index 00000000000..a8e3182967e
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/build.properties
@@ -0,0 +1,7 @@
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ plugin.properties,\
+ about.html
+src.includes = about.html
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/plugin.properties b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/plugin.properties
new file mode 100644
index 00000000000..f02e1b958b6
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/plugin.properties
@@ -0,0 +1,12 @@
+#################################################################################
+# Copyright (c) 2008 CEA LIST.
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - initial API and implementation
+##################################################################################
+pluginName=Papyrus common Diagram (Incubation)
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java
new file mode 100644
index 00000000000..7d55e837aec
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/Activator.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests;
+
+import org.eclipse.ui.plugin.AbstractUIPlugin;
+import org.osgi.framework.BundleContext;
+
+/**
+ * The activator class controls the plug-in life cycle
+ */
+public class Activator extends AbstractUIPlugin {
+
+ // The plug-in ID
+ public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.diagram.tests"; //$NON-NLS-1$
+
+ // The shared instance
+ private static Activator plugin;
+
+ /**
+ * The constructor
+ */
+ public Activator() {
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
+ */
+ public void start(BundleContext context) throws Exception {
+ super.start(context);
+ plugin = this;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
+ */
+ public void stop(BundleContext context) throws Exception {
+ plugin = null;
+ super.stop(context);
+ }
+
+ /**
+ * Returns the shared instance
+ *
+ * @return the shared instance
+ */
+ public static Activator getDefault() {
+ return plugin;
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java
new file mode 100644
index 00000000000..a184532a5bb
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractPapyrusTestCase.java
@@ -0,0 +1,424 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import java.io.ByteArrayInputStream;
+import java.util.ArrayList;
+
+import org.eclipse.core.commands.ExecutionException;
+import org.eclipse.core.resources.IFile;
+import org.eclipse.core.resources.IProject;
+import org.eclipse.core.resources.IWorkspace;
+import org.eclipse.core.resources.IWorkspaceRoot;
+import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.runtime.IAdaptable;
+import org.eclipse.core.runtime.IProgressMonitor;
+import org.eclipse.core.runtime.NullProgressMonitor;
+import org.eclipse.emf.common.command.CommandStack;
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.emf.ecore.EPackage;
+import org.eclipse.emf.transaction.RunnableWithResult;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gmf.runtime.common.core.command.CommandResult;
+import org.eclipse.gmf.runtime.common.core.command.ICommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.DiagramEditPart;
+import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.commands.ICreationCommand;
+import org.eclipse.papyrus.commands.wrappers.GEFtoEMFCommandWrapper;
+import org.eclipse.papyrus.editor.PapyrusMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.editor.IMultiDiagramEditor;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.core.services.ExtensionServicesRegistry;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
+import org.eclipse.papyrus.junit.utils.tests.AbstractPapyrusTest;
+import org.eclipse.papyrus.uml.diagram.common.commands.CreateUMLModelCommand;
+import org.eclipse.papyrus.uml.diagram.common.part.UmlGmfDiagramEditor;
+import org.eclipse.papyrus.uml.diagram.profile.CreateProfileModelCommand;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.model.UmlUtils;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.ui.IWorkbenchPage;
+import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.intro.IIntroPart;
+import org.eclipse.ui.part.FileEditorInput;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.junit.After;
+import org.junit.Assert;
+import org.junit.Before;
+
+/**
+ * The Class AbstractPapyrusTestCase.
+ */
+public abstract class AbstractPapyrusTestCase extends AbstractPapyrusTest {
+
+ protected boolean operationFailed = false;
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:";
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: ";
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: ";
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: ";
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null";
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: ";
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo";
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo";
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution";
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed";
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created";
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State";
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER";
+
+ /** The papyrus editor. */
+ protected IMultiDiagramEditor papyrusEditor;
+
+ /** The di resource set. */
+ protected ModelSet diResourceSet;
+
+ /** The project. */
+ protected IProject project;
+
+ /** The file. */
+ protected IFile file;
+
+ /** The root. */
+ protected IWorkspaceRoot root;
+
+ /** The page. */
+ protected IWorkbenchPage page;
+
+ /** The diagram editor. */
+ protected UmlGmfDiagramEditor diagramEditor = null;
+
+ /** The diagram edit part. */
+ protected DiagramEditPart diagramEditPart;
+
+ /**
+ * @see junit.framework.TestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ public void setUp() throws Exception {
+ projectCreation();
+ }
+
+ /**
+ * Gets the root view.
+ *
+ * @return the root view
+ */
+ protected View getRootView() {
+ return getDiagramEditPart().getDiagramView();
+ }
+
+ /**
+ * Gets the root semantic model.
+ *
+ * @return the root semantic model
+ */
+ protected Element getRootSemanticModel() {
+ return (Element)getRootView().getElement();
+ }
+
+ /**
+ * @see junit.framework.TestCase#tearDown()
+ *
+ * @throws Exception
+ */
+ @After
+ public void tearDown() throws Exception {
+ RunnableWithResult<Boolean> runnable = new RunnableWithResult.Impl<Boolean>() {
+
+ public void run() {
+ try {
+ //if the diagram is a Profile we dont save it because we dont need to define it
+ if(!diagramEditPart.getDiagramView().getType().equals("PapyrusUMLProfileDiagram")) {
+ papyrusEditor.doSave(new NullProgressMonitor());
+ }
+
+ // diResourceSet.save( new NullProgressMonitor());
+ // diagramEditor.close(true);
+ papyrusEditor = null;
+ diagramEditPart = null;
+ diagramEditor = null;
+ page.closeAllEditors(false);
+ project.delete(true, new NullProgressMonitor());
+ setResult(true);
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ setResult(false);
+ }
+ }
+ };
+ Display.getDefault().syncExec(runnable);
+ if(!runnable.getResult()) {
+ Assert.fail("Cannot close the editor and delete the project");
+ }
+ }
+
+ /**
+ * Gets the diagram edit part.
+ *
+ * @return the diagram edit part
+ */
+ protected DiagramEditPart getDiagramEditPart() {
+ if(diagramEditPart == null) {
+ diagramEditor = (UmlGmfDiagramEditor)papyrusEditor.getActiveEditor();
+ diagramEditPart = (DiagramEditPart)papyrusEditor.getAdapter(DiagramEditPart.class);
+ Assert.assertNotNull("Cannot find the diagram editor", diagramEditor);
+ Assert.assertNotNull("Cannot find the Diagram edit part", diagramEditPart);
+ }
+ return diagramEditPart;
+ }
+
+ protected abstract ICreationCommand getDiagramCommandCreation();
+
+ /**
+ * Returns the Project
+ */
+ protected abstract String getProjectName();
+
+ /**
+ * Returns the File
+ */
+ protected abstract String getFileName();
+
+ protected String[] getRequiredProfiles() {
+ return new String[0];
+ }
+
+ /**
+ * Project creation.
+ */
+ protected void projectCreation() throws Exception {
+ // assert the intro is not visible
+ Runnable closeIntroRunnable = new Runnable() {
+
+ public void run() {
+ try {
+ IIntroPart introPart = PlatformUI.getWorkbench().getIntroManager().getIntro();
+ if(introPart != null) {
+ PlatformUI.getWorkbench().getIntroManager().closeIntro(introPart);
+ }
+ } catch (Exception ex) {
+ ex.printStackTrace(System.out);
+ Assert.fail(ex.getMessage());
+ }
+ }
+ };
+ Display.getDefault().syncExec(closeIntroRunnable);
+ IWorkspace workspace = ResourcesPlugin.getWorkspace();
+ root = workspace.getRoot();
+ /*
+ * final String timestamp = Long.toString(System.currentTimeMillis());
+ *
+ * project = root.getProject("DiagramTestProject_" + timestamp); file =
+ * project.getFile("DiagramTest_" + timestamp + ".di"); //$NON-NLS-2$
+ */
+ project = root.getProject(getProjectName());
+ file = project.getFile(getFileName());
+ this.diResourceSet = new DiResourceSet();
+ // at this point, no resources have been created
+
+ if(!project.exists()) {
+ project.create(null);
+ }
+ if(!project.isOpen()) {
+ project.open(null);
+ }
+ if(file.exists()) {
+ file.delete(true, new NullProgressMonitor());
+ }
+ if(!file.exists()) {
+ file.create(new ByteArrayInputStream(new byte[0]), true, new NullProgressMonitor());
+ diResourceSet.createsModels(file);
+ if(!file.getName().endsWith(".profile.di")) {
+
+ new CreateUMLModelCommand().createModel(this.diResourceSet);
+
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+
+ // Apply the required profiles
+ ArrayList<IFile> modifiedFiles = new ArrayList<IFile>();
+ modifiedFiles.add(file);
+ ICommand commandProfiles = new AbstractTransactionalCommand(diResourceSet.getTransactionalEditingDomain(), "Apply profiles", modifiedFiles) {
+
+ @Override
+ protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
+ UmlModel resModel = UmlUtils.getUmlModel(diResourceSet);
+ EObject obj;
+ try {
+ obj = resModel.lookupRoot();
+ } catch (NotFoundException e) {
+ return CommandResult.newErrorCommandResult(e);
+ }
+ if(obj instanceof Model) {
+ Model model = (Model)obj;
+ for(String uri : getRequiredProfiles()) {
+ EPackage definition = EPackage.Registry.INSTANCE.getEPackage(uri);
+ if(definition != null) {
+ Profile profile = UMLUtil.getProfile(definition, model);
+ model.applyProfile(profile);
+ }
+ }
+ }
+ return CommandResult.newOKCommandResult();
+ }
+ };
+ commandProfiles.execute(new NullProgressMonitor(), null);
+
+ } else {
+ new CreateProfileModelCommand().createModel(this.diResourceSet);
+ ServicesRegistry registry = new ExtensionServicesRegistry(org.eclipse.papyrus.infra.core.Activator.PLUGIN_ID);
+ try {
+ registry.add(ModelSet.class, Integer.MAX_VALUE, diResourceSet); // High priority to override all contributions
+ registry.startRegistry();
+ } catch (ServiceException ex) {
+ // Ignore exceptions
+ }
+ }
+ ICreationCommand command = getDiagramCommandCreation();
+ command.createDiagram(diResourceSet, null, "DiagramToTest");
+ diResourceSet.save(new NullProgressMonitor());
+ }
+ Runnable runnable = new Runnable() {
+
+ public void run() {
+ try {
+ page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
+ papyrusEditor = (IMultiDiagramEditor)page.openEditor(new FileEditorInput(file), PapyrusMultiDiagramEditor.EDITOR_ID);
+ } catch (Exception ex) {
+ Assert.fail(ex.getMessage());
+ ex.printStackTrace(System.out);
+ }
+ }
+ };
+ Display.getDefault().syncExec(runnable);
+ Assert.assertNotNull("Failed to open the editor", papyrusEditor);
+ }
+
+ /**
+ * Call {@link AbstractPapyrusTestCase#execute(Command) execute} on the UI
+ * thread.
+ */
+ protected void executeOnUIThread(final Command command) {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ execute(command);
+ }
+ });
+ }
+
+ /** Call {@link AbstractPapyrusTestCase#undo() undo} on the UI thread. */
+ protected void undoOnUIThread() {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ undo();
+ }
+ });
+ }
+
+ /** Call {@link AbstractPapyrusTestCase#redo() redo} on the UI thread. */
+ protected void redoOnUIThread() {
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ redo();
+ }
+ });
+ }
+
+ protected void assertLastOperationSuccessful() {
+ Assert.assertFalse("The operation failed. Look at the log, or put a breakpoint on ExecutionException or DefaultOperationHistory#notifyNotOK to find the cause.", this.operationFailed);
+ }
+
+ /**
+ * Reset the "operation failed" state. Call this before executing each
+ * operation for which you want to test whether if failed with {@link AbstractPapyrusTestCase#assertLastOperationSuccessful()}.
+ */
+ protected void resetLastOperationFailedState() {
+ this.operationFailed = false;
+ }
+
+ /** Execute the given command in the diagram editor. */
+ protected void execute(final Command command) {
+ resetLastOperationFailedState();
+ getCommandStack().execute(new GEFtoEMFCommandWrapper(command));
+ assertLastOperationSuccessful();
+ }
+
+ /** Undo the last command done in the diagram editor. */
+ protected void undo() {
+ resetLastOperationFailedState();
+ final CommandStack commandStack = getCommandStack();
+ Assert.assertTrue("We should be able to undo", commandStack.canUndo());
+ commandStack.undo();
+ assertLastOperationSuccessful();
+ }
+
+ /** Redo the last command undone in the diagram editor. */
+ protected void redo() {
+ resetLastOperationFailedState();
+ final CommandStack commandStack = getCommandStack();
+ Assert.assertTrue("We should be able to redo", commandStack.canRedo());
+ commandStack.redo();
+ assertLastOperationSuccessful();
+ }
+
+ /** The command stack to use to execute commands on the diagram. */
+ protected CommandStack getCommandStack() {
+ // not "diagramEditor.getDiagramEditDomain().getDiagramCommandStack()"
+ // because it messes up undo contexts
+ return this.diagramEditor.getEditingDomain().getCommandStack();
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java
new file mode 100644
index 00000000000..359508d776f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestMultiLink.java
@@ -0,0 +1,434 @@
+/*****************************************************************************
+ * Copyright (c) 2010 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.ConnectionAnchor;
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.NodeEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeNodeEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+import org.eclipse.uml2.uml.Relationship;
+import org.junit.Before;
+
+/**
+ * The Class MultiLink.
+ */
+public abstract class AbstractTestMultiLink extends AbstractPapyrusTestCase {
+
+ protected static final String THE_BRANCH_TO_RECONNECT_EXISTS = "the branch to reconnect exists";
+
+ protected static final String BRANCH_EXISTS_RECONNECTION_ON_TARGET = "branch exists reconnection on target ";
+
+ protected static final String RECONNECTION_TARGET = "Reconnection target ";
+
+ protected static final String BRANCH_EXISTS_RECONNECTION_ON_SOURCE = "branch exists reconnection on Source ";
+
+ protected static final String RECONNECTION_SOURCE = "Reconnection Source ";
+
+ GraphicalEditPart source = null;
+
+ GraphicalEditPart target = null;
+
+ GraphicalEditPart thirdPlayer = null;
+
+ GraphicalEditPart fourthPlayer = null;
+
+ GraphicalEditPart guestPlayer = null;
+
+ ConnectionEditPart binaryLink = null;
+
+ ShapeNodeEditPart linkNode = null;
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:";
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: ";
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: ";
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: ";
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null";
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: ";
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo";
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo";
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution";
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed";
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created";
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State";
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER";
+
+ /** The root compartment. */
+ protected ShapeCompartmentEditPart rootCompartment = null;
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ //DELETION OF ALL THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, linkNode != null);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = linkNode.getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ public static Point getIntersectionPoint(ConnectionEditPart connEP, boolean source) {
+ ConnectionAnchor sourceAnchor;
+ ConnectionAnchor targetAnchor;
+ NodeEditPart sourceEP = (NodeEditPart)connEP.getSource();
+ NodeEditPart targetEP = (NodeEditPart)connEP.getTarget();
+ Point endLocation;
+ sourceAnchor = sourceEP.getSourceConnectionAnchor(connEP);
+ targetAnchor = targetEP.getTargetConnectionAnchor(connEP);
+ if(source) {
+ endLocation = sourceAnchor.getLocation(targetAnchor.getReferencePoint()).getCopy();
+ } else {
+ endLocation = targetAnchor.getLocation(sourceAnchor.getReferencePoint()).getCopy();
+ }
+ return endLocation;
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 6);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = linkNode.getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type) {
+ //DROP
+ //INIT
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().get(5) instanceof Relationship);
+ Relationship relationship = (Relationship)getRootSemanticModel().getOwnedElements().get(5);
+ //DO
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(relationship);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ //UNDO
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 5);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ //REDO
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param branchType
+ * type of the branch to create
+ * @param flow
+ * TODO
+ *
+ */
+ public void testToCreateAMultiLink(IElementType branchType, boolean flow) {
+ //test to create the branch for dependency to node
+ Command cmd = target.getCommand(createConnectionViewRequest(branchType, binaryLink, thirdPlayer));
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ //Undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(CREATION + TEST_THE_REDO, getDiagramEditPart().getChildren().get(5) != null);
+ linkNode = (ShapeNodeEditPart)getDiagramEditPart().getChildren().get(5);
+ //test to create the branch from node to multidependency
+ if(flow) {
+ cmd = linkNode.getCommand(createConnectionViewRequest(branchType, fourthPlayer, linkNode));
+ } else {//test to create the branch from multidependency to node
+ cmd = linkNode.getCommand(createConnectionViewRequest(branchType, linkNode, fourthPlayer));
+ }
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 3);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ }
+
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_BRANCH_TO_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(guestPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = guestPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET, branch.getTarget().equals(guestPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, branch.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, branch.getTarget().equals(guestPlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ }
+
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_BRANCH_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(guestPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = guestPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 4);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(guestPlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(BRANCH_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(guestPlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ }
+
+ public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart)getDiagramEditPart()).getDiagramPreferencesHint());
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+ protected abstract CreateViewRequest createViewRequestShapeContainer();
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ CreateViewRequest requestcreation = createViewRequestShapeContainer();
+ //1st node
+ requestcreation.setLocation(new Point(10, 10));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 1);
+ requestcreation.setLocation(new Point(400, 10));
+ //2d node
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 2);
+ requestcreation.setLocation(new Point(200, 200));
+ //3d node
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 3);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ thirdPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ //4d node
+ requestcreation.setLocation(new Point(400, 400));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ fourthPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ //4d guest
+ requestcreation.setLocation(new Point(600, 400));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 5);
+ guestPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(4);
+ }
+
+ public void installbinaryLink(IElementType type) {
+ //binaryLink
+ Command command = target.getCommand(createConnectionViewRequest(type, source, target));
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ binaryLink = (ConnectionEditPart)source.getSourceConnections().get(0);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected View getRootView() {
+ return (View)getDiagramEditPart().getModel();
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageMultiLink(IElementType binaryLinkType, IElementType branchType, boolean flow) {
+ installbinaryLink(binaryLinkType);
+ testToCreateAMultiLink(branchType, flow);
+ testTargetReconnectAMultiLink(branchType);
+ if(flow) {
+ testSourceReconnectAMultiLink(branchType);
+ }
+ testDestroy(branchType);
+ //end of the test
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getDiagramEditPart().getChildren().get(5) instanceof ShapeNodeEditPart);
+ linkNode = (ShapeNodeEditPart)getDiagramEditPart().getChildren().get(5);
+ testViewDeletion(branchType);
+ testDrop(branchType);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java
new file mode 100644
index 00000000000..bad81c23c8b
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/AbstractTestNode.java
@@ -0,0 +1,395 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Remi Schnekenburger (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.ecore.EClass;
+import org.eclipse.emf.ecore.EReference;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.swt.widgets.Display;
+import org.eclipse.uml2.uml.Element;
+import org.junit.Before;
+
+/**
+ * Abstract class to test nodes
+ */
+public abstract class AbstractTestNode extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** <code>true</code> if semantic tests should be run on graphical manipulation */
+ private boolean testSemantic;
+
+ /** command computed on the ui thread */
+ protected Command command;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ testSemantic = isSemanticTest();
+ }
+
+ /**
+ * Returns <code>true</code> if semantic tests should be also performed
+ *
+ * @return <code>true</code> if semantic tests should be also performed
+ */
+ protected boolean isSemanticTest() {
+ return false;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected abstract View getRootView();
+
+ /**
+ * Returns the container edit part
+ */
+ protected abstract IGraphicalEditPart getContainerEditPart();
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove) {
+ // create a node
+ testToCreateANode(type);
+ // creates a second one
+ testToCreateANode(type, 1, 1, 1, 1);
+ // destroy the first element
+ testDestroy(type, 2, 2, 1, 1);
+ // destroy the second one
+ testDestroy(type, 1, 1, 1, 1);
+ // the node has been destroyed, the UML element also. restore one element
+ undoOnUIThread();
+ // the node and the UML element are present
+ testViewDeletion(type);
+ // The node has been deleted, the uml element is still present
+ testDrop(type, eClass);
+ // the node and element are present
+ if(containerMove) {
+ testChangeContainer(type, containerType);
+ }
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove, EReference containmentFeature) {
+ // create a node
+ testToCreateANode(type);
+ // creates a second one
+ testToCreateANode(type, 1, 1, 1, 1);
+ // destroy the first element
+ testDestroy(type, 2, 2, 1, 1);
+ // destroy the second one
+ testDestroy(type, 1, 1, 1, 1);
+ // the node has been destroyed, the UML element also. restore one element
+ undoOnUIThread();
+ // the node and the UML element are present
+ testViewDeletion(type);
+ // The node has been deleted, the uml element is still present
+ testDrop(type, eClass);
+ // the node and element are present
+ if(containerMove) {
+ testChangeContainer(type, containerType);
+ }
+ }
+
+ /**
+ * Test to manage child node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ * @deprecated, @use {@link AbstractTestNode#testToManageNode(IElementType, EClass, IElementType, boolean)}
+ */
+ @Deprecated
+ public void testToManageChildNode(IElementType type, EClass eClass, IElementType containerType, boolean containerMove) {
+ testToManageNode(type, eClass, containerType, containerMove);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ testDestroy(type, 1, 1, 1, 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int removedGraphicalChildren, int removedSemanticChildren) {
+ // DESTROY SEMANTIC + VIEW
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedGraphicalChildren, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((GraphicalEditPart)getContainerEditPart().getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ executeOnUIThread(command);
+ assertEquals(DESTROY_DELETION + TEST_THE_EXECUTION, expectedGraphicalChildren - removedGraphicalChildren, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ assertEquals(DESTROY_DELETION + INITIALIZATION_TEST, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ undoOnUIThread();
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedGraphicalChildren, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ redoOnUIThread();
+ assertEquals(DESTROY_DELETION + TEST_THE_REDO, expectedGraphicalChildren - removedGraphicalChildren, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ assertEquals(DESTROY_DELETION + TEST_THE_UNDO, expectedSemanticChildren - removedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type, EClass eClass) {
+ //DROP
+ assertEquals(DROP + INITIALIZATION_TEST, 0, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ assertEquals(DROP + INITIALIZATION_TEST, 1, getRootSemanticModel().getOwnedElements().size());
+ }
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ for(Element element : getRootSemanticModel().getOwnedElements()) {
+ if(element != null && element.eClass().equals(eClass)) {
+ list.add(element);
+ }
+ }
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(40, 40));
+ Command command = getContainerEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute the drop
+ executeOnUIThread(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getContainerEditPart().getChildren().size() != 0);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() != 0);
+ // undo the drop
+ undoOnUIThread();
+ assertEquals(DROP + TEST_THE_UNDO, 0, getContainerEditPart().getChildren().size());
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() != 0);
+ // redo the drop
+ redoOnUIThread();
+ assertTrue(DROP + TEST_THE_REDO, getContainerEditPart().getChildren().size() != 0);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() != 0);
+ }
+
+ /**
+ * Test change container.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testChangeContainer(IElementType type, IElementType containerType) {
+ //CHANGE CONTAINER
+ assertEquals(CHANGE_CONTAINER + INITIALIZATION_TEST, 1, getContainerEditPart().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + INITIALIZATION_TEST, 1, getRootSemanticModel().getOwnedElements().size());
+ final Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(containerType, getContainerEditPart().getDiagramPreferencesHint());
+ command = null;
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ command = getContainerEditPart().getCommand(requestcreation);
+ }
+ });
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ executeOnUIThread(command);
+ assertEquals(CONTAINER_CREATION + TEST_THE_EXECUTION, 2, getRootView().getChildren().size());
+ GraphicalEditPart containerEditPart = (GraphicalEditPart)getContainerEditPart().getChildren().get(1);
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
+ changeBoundsRequest.setEditParts((EditPart)getContainerEditPart().getChildren().get(0));
+ changeBoundsRequest.setLocation(new Point(30, 30));
+ ShapeCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < containerEditPart.getChildren().size()) {
+ if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
+ compartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ command = compartment.getCommand(changeBoundsRequest);
+ assertNotNull(CHANGE_CONTAINER, command);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute change container
+ executeOnUIThread(command);
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, getRootView().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, compartment.getChildren().size());
+ // undo change container
+ undoOnUIThread();
+ assertEquals(CHANGE_CONTAINER + TEST_THE_UNDO, 2, getRootView().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_UNDO, 2, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 0, compartment.getChildren().size());
+ // redo change container
+ redoOnUIThread();
+ assertEquals(CHANGE_CONTAINER + TEST_THE_REDO, 1, getRootView().getChildren().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_REDO, 1, getRootSemanticModel().getOwnedElements().size());
+ assertEquals(CHANGE_CONTAINER + TEST_THE_EXECUTION, 1, compartment.getChildren().size());
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type, int expectedGraphicalChildren, int expectedSemanticChildren, int addedGraphicalChildren, int addedSemanticChildren) {
+ command = null;
+ //CREATION
+ assertEquals(CREATION + INITIALIZATION_TEST, expectedGraphicalChildren, getContainerEditPart().getChildren().size());
+ Element root = getRootSemanticModel();
+ List<Element> ownedElements = root.getOwnedElements();
+ assertEquals(CREATION + INITIALIZATION_TEST, expectedSemanticChildren, ownedElements.size());
+ final CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getContainerEditPart().getDiagramPreferencesHint());
+ Display.getDefault().syncExec(new Runnable() {
+
+ public void run() {
+ command = getContainerEditPart().getCommand(requestcreation);
+ }
+ });
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute the creation
+ executeOnUIThread(command);
+ assertEquals(CREATION + TEST_THE_EXECUTION, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if(testSemantic) {
+ assertEquals(CREATION + TEST_THE_EXECUTION, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // undo the creation
+ undoOnUIThread();
+ assertEquals(CREATION + TEST_THE_UNDO, expectedGraphicalChildren, getRootView().getChildren().size());
+ if(testSemantic) {
+ assertEquals(CREATION + TEST_THE_UNDO, expectedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ // redo the creation test
+ redoOnUIThread();
+ assertEquals(CREATION + TEST_THE_REDO, expectedGraphicalChildren + addedGraphicalChildren, getRootView().getChildren().size());
+ if(testSemantic) {
+ assertEquals(CREATION + TEST_THE_REDO, expectedSemanticChildren + addedSemanticChildren, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateANode(IElementType type) {
+ testToCreateANode(type, 0, getRequiredProfiles().length, 1, 1);
+ }
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertEquals(VIEW_DELETION + INITIALIZATION_TEST, 1, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ }
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((IGraphicalEditPart)getContainerEditPart().getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ // execute hide the view
+ executeOnUIThread(command);
+ assertEquals(VIEW_DELETION + TEST_THE_EXECUTION, 0, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ //assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == numberOfRelatedSemanticElement);
+ }
+ // undo hide the view
+ undoOnUIThread();
+ assertEquals(VIEW_DELETION + TEST_THE_UNDO, 1, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ //assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == numberOfRelatedSemanticElement);
+ }
+ // redo hide the view
+ redoOnUIThread();
+ assertEquals(VIEW_DELETION + TEST_THE_REDO, 0, getContainerEditPart().getChildren().size());
+ if(testSemantic) {
+ //assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == numberOfRelatedSemanticElement);
+ }
+ }
+
+ protected abstract CreateViewRequest createViewRequestShapeContainer();
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java
new file mode 100644
index 00000000000..be0055774c3
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildLabel.java
@@ -0,0 +1,358 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TestChildLabel.
+ */
+public abstract class TestChildLabel extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** The Constant CREATION. */
+ protected static final String CREATION = "CREATION:";
+
+ /** The Constant CONTAINER_CREATION. */
+ protected static final String CONTAINER_CREATION = "CONTAINER CREATION: ";
+
+ /** The Constant DROP. */
+ protected static final String DROP = "DROP: ";
+
+ /** The Constant DESTROY_DELETION. */
+ protected static final String DESTROY_DELETION = "DESTROY DELETION: ";
+
+ /** The Constant COMMAND_NULL. */
+ protected static final String COMMAND_NULL = " command null";
+
+ /** The Constant VIEW_DELETION. */
+ protected static final String VIEW_DELETION = "VIEW DELETION: ";
+
+ /** The Constant TEST_THE_REDO. */
+ protected static final String TEST_THE_REDO = "test the redo";
+
+ /** The Constant TEST_THE_UNDO. */
+ protected static final String TEST_THE_UNDO = "test the undo";
+
+ /** The Constant TEST_THE_EXECUTION. */
+ protected static final String TEST_THE_EXECUTION = "test the execution";
+
+ /** The Constant TEST_IF_THE_COMMAND_CAN_BE_EXECUTED. */
+ protected static final String TEST_IF_THE_COMMAND_CAN_BE_EXECUTED = "test if the command can be executed";
+
+ /** The Constant TEST_IF_THE_COMMAND_IS_CREATED. */
+ protected static final String TEST_IF_THE_COMMAND_IS_CREATED = "test if the command is created";
+
+ /** The Constant INITIALIZATION_TEST. */
+ protected static final String INITIALIZATION_TEST = "Intitial State";
+
+ /** The Constant CHANGE_CONTAINER. */
+ protected static final String CHANGE_CONTAINER = "CHANGE CONTAINER";
+
+ /** The top node. */
+ protected GraphicalEditPart topNode;
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testViewDeletion(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, compartment.getChildren().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, compartment.getChildren().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testDestroy(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((GraphicalEditPart)compartment.getChildren().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ //assertTrue(DESTROY_DELETION +TEST_THE_UNDO,compartment.getChildren().size()==1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, compartment.getChildren().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testDrop(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //DROP
+ assertTrue(DROP + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(0));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = compartment.getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, compartment.getChildren().size() != 0);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(DROP + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, compartment.getChildren().size() != 0);
+ assertTrue(DROP + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() != 0);
+ }
+
+ /**
+ * Test change container.
+ *
+ * @param topNodeType
+ * the top node type
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testChangeContainer(IElementType topNodeType, IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //CHANGE CONTAINER
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, compartment.getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(topNodeType, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CONTAINER_CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 2);
+ GraphicalEditPart newContainerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
+ changeBoundsRequest.setEditParts((EditPart)compartment.getChildren().get(0));
+ changeBoundsRequest.setLocation(new Point(30, 30));
+ ListCompartmentEditPart newCompartment = null;
+ index = 0;
+ while(newCompartment == null && index < newContainerEditPart.getChildren().size()) {
+ if((newContainerEditPart.getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ newCompartment = (ListCompartmentEditPart)(newContainerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("NewContainer not found", newCompartment != null);
+ command = newCompartment.getCommand(changeBoundsRequest);
+ assertNotNull(CHANGE_CONTAINER, command);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, compartment.getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, compartment.getChildren().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, newCompartment.getChildren().size() == 1);
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToCreateANode(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1);
+ }
+
+ /**
+ * Test to create a top node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateATopNode(IElementType type) {
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)((View)getDiagramEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ topNode = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ }
+
+ /**
+ * Gets the top edit part.
+ *
+ * @return the top edit part
+ */
+ public GraphicalEditPart getTopEditPart() {
+ return topNode;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootSemanticModel()
+ *
+ * @return
+ */
+ @Override
+ protected Element getRootSemanticModel() {
+ // TODO Auto-generated method stub
+ return (Element)((View)getTopEditPart().getModel()).getElement();
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param topNodeType
+ * the top node type
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageTopNode(IElementType topNodeType, IElementType type, int containerType) {
+ testToCreateATopNode(topNodeType);
+ testToCreateANode(type, containerType);
+ testDestroy(type, containerType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(type, containerType);
+ testDrop(type, containerType);
+ testChangeContainer(topNodeType, type, containerType);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java
new file mode 100644
index 00000000000..a3acdcc248a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestChildNode.java
@@ -0,0 +1,89 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNotSame;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Dimension;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.notation.View;
+import org.junit.Before;
+
+/**
+ * The Class TestChildNode.
+ * Semantic tests shall be executed apart from the graphical test has one view may be related to a different number of UML elements
+ * in different diagram
+ */
+public abstract class TestChildNode extends AbstractTestNode {
+
+ /** The root compartment. */
+ protected ShapeCompartmentEditPart rootCompartment = null;
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#setUp()
+ *
+ * @throws Exception
+ */
+ @Before
+ @Override
+ public void setUp() throws Exception {
+ super.setUp();
+ CreateViewRequest requestcreation = createViewRequestShapeContainer();
+ if(requestcreation != null) {
+ requestcreation.setSize(new Dimension(500, 500));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertNotSame(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, UnexecutableCommand.INSTANCE, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute());
+ executeOnUIThread(command);
+ }
+ assertEquals(CREATION + INITIALIZATION_TEST, 1, getDiagramEditPart().getChildren().size());
+ GraphicalEditPart containerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ rootCompartment = null;
+ int index = 0;
+ while(rootCompartment == null && index < containerEditPart.getChildren().size()) {
+ if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
+ rootCompartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertNotNull("There should be at least one container for the node tests", rootCompartment);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IGraphicalEditPart getContainerEditPart() {
+ return rootCompartment;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootView()
+ *
+ * @return
+ */
+ @Override
+ protected View getRootView() {
+ return (View)rootCompartment.getModel();
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java
new file mode 100644
index 00000000000..43e74c453d3
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestCommentLink.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestCommentLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);//1
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java
new file mode 100644
index 00000000000..e423ef9a15f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestConstraintLink.java
@@ -0,0 +1,248 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ /*****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestConstraintLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java
new file mode 100644
index 00000000000..8489cb4292f
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestContainmentLink.java
@@ -0,0 +1,265 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestContainmentLink extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+ //it is impossible to drop but you can recreat the link between this element
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)) != null);
+ ConnectionEditPart binaryLink = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0));
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_TO_RECONNECT_EXISTS, ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0)) != null);
+ ConnectionEditPart branch = ((ConnectionEditPart)source.getChildBySemanticHint("3032").getSourceConnections().get(0));
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(sourcePlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = sourcePlayer.getCommand(reconnectRequest);
+ //it is impossible to reconnect source of the link
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == false);
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType);
+ testDestroy(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ testDrop(linkType);
+ testRecreation(linkType);
+ testSourceReconnectAMultiLink(linkType);
+ testTargetReconnectAMultiLink(linkType);
+ }
+
+ public void testRecreation(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 3);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java
new file mode 100644
index 00000000000..65a967bf97c
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLink.java
@@ -0,0 +1,437 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.emf.transaction.TransactionalEditingDomain;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.EditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.ChangeBoundsRequest;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ShapeCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateConnectionViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers;
+import org.eclipse.papyrus.uml.diagram.common.Activator;
+import org.eclipse.uml2.uml.Element;
+
+// TODO: Auto-generated Javadoc
+/**
+ * The Class TestTopLink to test when this is link . The link is attached to a semantic element that has to be contained by the source and the target.
+ * To adapt when source owns the created link
+ */
+public abstract class TestLink extends AbstractPapyrusTestCase {
+
+ protected static final String THE_LINK_RECONNECT_EXISTS = "The Link exist";
+
+ protected static final String RECONNECTION_TARGET = "Reconnection of target";
+
+ protected static final String LINK_EXISTS_RECONNECTION_ON_TARGET = "Link exist on the target";
+
+ protected static final String THE_LINK_TO_RECONNECT_EXISTS = "The Link exist";
+
+ protected static final String RECONNECTION_SOURCE = "Reconnection of source";
+
+ protected static final String LINK_EXISTS_RECONNECTION_ON_SOURCE = "Link exist on the source";
+
+ protected GraphicalEditPart source = null;
+
+ protected GraphicalEditPart sourcePlayer = null;
+
+ protected GraphicalEditPart target = null;
+
+ protected GraphicalEditPart targetPlayer = null;
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ }
+
+ /**
+ * Retrieves the TransactionalEditingDomain
+ *
+ * @return the editing domain (can be null)
+ */
+ protected TransactionalEditingDomain getEditingDomain() {
+ ServiceUtilsForActionHandlers serviceUtils = ServiceUtilsForActionHandlers.getInstance();
+ TransactionalEditingDomain editingDomain = null;
+ try {
+ editingDomain = serviceUtils.getTransactionalEditingDomain();
+ } catch (ServiceException e) {
+ Activator.log.error(e);
+ }
+ return editingDomain;
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ public void testDrop(IElementType type) {
+ //DROP
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 0);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(4));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ }
+
+ /**
+ * Test change container.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testChangeContainer(IElementType type, IElementType containerType) {
+ //CHANGE CONTAINER
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 1);
+ Request requestcreation = CreateViewRequestFactory.getCreateShapeRequest(containerType, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CONTAINER_CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CONTAINER_CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 2);
+ GraphicalEditPart containerEditPart = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ ChangeBoundsRequest changeBoundsRequest = new ChangeBoundsRequest(RequestConstants.REQ_ADD);
+ changeBoundsRequest.setEditParts((EditPart)getDiagramEditPart().getChildren().get(0));
+ changeBoundsRequest.setLocation(new Point(30, 30));
+ ShapeCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < containerEditPart.getChildren().size()) {
+ if((containerEditPart.getChildren().get(index)) instanceof ShapeCompartmentEditPart) {
+ compartment = (ShapeCompartmentEditPart)(containerEditPart.getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ command = compartment.getCommand(changeBoundsRequest);
+ assertNotNull(CHANGE_CONTAINER, command);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CHANGE_CONTAINER + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, getRootView().getChildren().size() == 2);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 2);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, getRootView().getChildren().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 1);
+ assertTrue(CHANGE_CONTAINER + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ }
+
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertEquals(CREATION + INITIALIZATION_TEST, 0, getDiagramEditPart().getChildren().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, 0, getRootSemanticModel().getOwnedElements().size());
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ }
+
+ public CreateConnectionViewRequest createConnectionViewRequest(IElementType type, EditPart source, EditPart target) {
+ CreateConnectionViewRequest connectionRequest = CreateViewRequestFactory.getCreateConnectionRequest(type, ((IGraphicalEditPart)getDiagramEditPart()).getDiagramPreferencesHint());
+ connectionRequest.setSourceEditPart(null);
+ connectionRequest.setTargetEditPart(source);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_START);
+ source.getCommand(connectionRequest);
+ // Now, setup the request in preparation to get the
+ // connection end
+ // command.
+ connectionRequest.setSourceEditPart(source);
+ connectionRequest.setTargetEditPart(target);
+ connectionRequest.setType(RequestConstants.REQ_CONNECTION_END);
+ return connectionRequest;
+ }
+
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(sourcePlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = sourcePlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 5);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(sourcePlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(sourcePlayer));
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType);
+ testDestroy(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ testDrop(linkType);
+ testSourceReconnectAMultiLink(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testTargetReconnectAMultiLink(linkType);
+ testToCreateAlinkOnTheSame(linkType, allowedOntheSame);
+ testToDropAlinkOnTheSame(linkType, allowedOntheSame);
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ //DROP
+ if(allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(getRootSemanticModel().getOwnedElements().get(5));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 5);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 6);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 5);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 6);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java
new file mode 100644
index 00000000000..4d776ee173d
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkOwnedBySource.java
@@ -0,0 +1,319 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gef.requests.ReconnectRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestLinkOwnedBySource extends TestLink {
+
+ /**
+ * Test view deletion.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testViewDeletion(IElementType type) {
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ /**
+ * Test destroy.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDestroy(IElementType type) {
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == 1);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == 0);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ }
+
+ /**
+ * Test drop.
+ *
+ * @param type
+ * the type
+ */
+ @Override
+ public void testDrop(IElementType type) {
+ //DROP
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(((Element)source.resolveSemanticElement()).getOwnedElements().get(0));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ }
+
+ /**
+ * Test to create a link.
+ *
+ * @param linkType
+ * the type
+ */
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_EXECUTION, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + TEST_THE_REDO, ((Element)source.resolveSemanticElement()).getOwnedElements().size() == 1);
+ }
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ //create the source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 100));
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the source player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(100, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 100));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ //create the target player to test reconnect
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(targetType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(new Point(300, 300));
+ command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ source = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ sourcePlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(1);
+ target = (GraphicalEditPart)getDiagramEditPart().getChildren().get(2);
+ targetPlayer = (GraphicalEditPart)getDiagramEditPart().getChildren().get(3);
+ }
+
+ @Override
+ public void testTargetReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_RECONNECT_EXISTS, (ConnectionEditPart)target.getTargetConnections().get(0) != null);
+ ConnectionEditPart binaryLink = (ConnectionEditPart)target.getTargetConnections().get(0);
+ reconnectRequest.setConnectionEditPart(binaryLink);
+ reconnectRequest.setTargetEditPart(targetPlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_TARGET);
+ Command cmd = targetPlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_TARGET + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ // EditorUtils.getTransactionalEditingDomain().getCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_TARGET + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET, binaryLink.getTarget().equals(targetPlayer));
+ //undo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_UNDO, binaryLink.getTarget().equals(target));
+ //redo
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_TARGET + TEST_THE_REDO, binaryLink.getTarget().equals(targetPlayer));
+ }
+
+ @Override
+ public void testSourceReconnectAMultiLink(IElementType type) {
+ //target reconnection
+ ReconnectRequest reconnectRequest = new ReconnectRequest();
+ assertTrue(THE_LINK_TO_RECONNECT_EXISTS, (ConnectionEditPart)source.getSourceConnections().get(0) != null);
+ ConnectionEditPart branch = (ConnectionEditPart)source.getSourceConnections().get(0);
+ reconnectRequest.setConnectionEditPart(branch);
+ reconnectRequest.setTargetEditPart(sourcePlayer);
+ reconnectRequest.setType(RequestConstants.REQ_RECONNECT_SOURCE);
+ Command cmd = sourcePlayer.getCommand(reconnectRequest);
+ assertTrue(RECONNECTION_SOURCE + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, cmd.canExecute() == true);
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().execute(cmd);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 1);
+ assertTrue(RECONNECTION_SOURCE + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_EXECUTION, branch.getSource().equals(sourcePlayer));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_UNDO, branch.getSource().equals(source));
+ getDiagramEditPart().getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(LINK_EXISTS_RECONNECTION_ON_SOURCE + TEST_THE_REDO, branch.getSource().equals(sourcePlayer));
+ }
+
+ /**
+ * test the drop of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ //DROP
+ if(allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ ArrayList<Element> list = new ArrayList<Element>();
+ list.add(((Element)source.resolveSemanticElement()).getOwnedElements().get(1));
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(new Point(20, 20));
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == 3);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 3);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects
+ *
+ * @param linkType
+ * @param allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 4);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, getRootView().getChildren().size() == 4);
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == 2);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == 4);
+ }
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java
new file mode 100644
index 00000000000..e25818f2476
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestLinkWithParent.java
@@ -0,0 +1,386 @@
+/*****************************************************************************
+ * Copyright (c) 2014 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Benoit Maggi (CEA LIST) benoit.maggi@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.eclipse.draw2d.geometry.Point;
+import org.eclipse.gef.ConnectionEditPart;
+import org.eclipse.gef.Request;
+import org.eclipse.gef.RequestConstants;
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gef.requests.GroupRequest;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.diagram.ui.requests.DropObjectsRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.EditCommandRequestWrapper;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+
+/**
+ * The Class TestLinkWithParent use to test link between elements with parent.
+ */
+public abstract class TestLinkWithParent extends TestLink {
+
+
+ /** The Constant DEFAULT_DROP_LOCATION. */
+ protected static final Point DEFAULT_DROP_LOCATION = new Point(20, 20);
+
+ /** The default source location. */
+ protected static Point DEFAULT_SOURCE_LOCATION = new Point(300, 100);
+
+ /** The default parent location. */
+ protected static Point DEFAULT_PARENT_LOCATION = new Point(100, 100);
+
+ // dyn values
+
+ /** The begin root semantic owned element size. */
+ protected int beginRootSemanticOwnedElementSize;
+
+ /** The end root semantic owned element size. */
+ protected int endRootSemanticOwnedElementSize;
+
+ /** The begin diagram edit part children size. */
+ protected int beginDiagramEditPartChildrenSize;
+
+ /** The end diagram edit part children size. */
+ protected int endDiagramEditPartChildrenSize;
+
+ /** The begin root edge size. */
+ protected int beginRootEdgeSize;
+
+ /** The end root edge size. */
+ protected int endRootEdgeSize;
+
+ /** The begin source connections size. */
+ protected int beginSourceConnectionsSize;
+
+ /** The end source connections size. */
+ protected int endSourceConnectionsSize;
+
+ /** The begin root view children size. */
+ protected int beginRootViewChildrenSize;
+
+ /** The end root view children size. */
+ protected int endRootViewChildrenSize;
+
+ /** The parent type. */
+ public IElementType parentType;
+
+ /** The parent. */
+ public GraphicalEditPart parent;
+
+ /** The link element. */
+ private Element linkElement;
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#installEnvironment(org.eclipse.gmf.runtime.emf.type.core.IElementType,
+ * org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param sourceType
+ * @param targetType
+ */
+
+ @Override
+ public void installEnvironment(IElementType sourceType, IElementType targetType) {
+
+ //create the parent source
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(parentType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(DEFAULT_PARENT_LOCATION);
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertTrue(command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);;
+ parent = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+
+ //create the source
+ requestcreation = CreateViewRequestFactory.getCreateShapeRequest(sourceType, getDiagramEditPart().getDiagramPreferencesHint());
+ requestcreation.setLocation(DEFAULT_SOURCE_LOCATION);
+ command = parent.getCommand(requestcreation);
+ assertTrue(command.canExecute());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // FIXME : get(0) : header; get(1) : container
+ List<GraphicalEditPart> children = parent.getChildren();
+ source = children.get(2);
+ }
+
+
+
+ /**
+ * Check that the link is impossible to create
+ *
+ * @param sourceType
+ * the source type
+ * @param targetType
+ * the target type
+ * @param linkType
+ * the link type
+ */
+ public void testImpossibleToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType) {
+ installEnvironment(sourceType, targetType);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertFalse(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command != null && command.canExecute());
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testToManageLink(org.eclipse.gmf.runtime.emf.type.core.IElementType,
+ * org.eclipse.gmf.runtime.emf.type.core.IElementType, org.eclipse.gmf.runtime.emf.type.core.IElementType,
+ * org.eclipse.gmf.runtime.emf.type.core.IElementType, boolean)
+ *
+ * @param sourceType
+ * @param targetType
+ * @param linkType
+ * @param containerType
+ * @param allowedOntheSame
+ */
+
+ @Override
+ public void testToManageLink(IElementType sourceType, IElementType targetType, IElementType linkType, IElementType containerType, boolean allowedOntheSame) {
+ installEnvironment(sourceType, targetType);
+ testToCreateALink(linkType);
+ testDestroy(linkType);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ testViewDeletion(linkType);
+ testDrop(linkType);
+ // destroy the element
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ // test link on the same
+ testToCreateAlinkOnTheSame(linkType, allowedOntheSame);
+
+ if(allowedOntheSame) {
+
+ ConnectionEditPart graphicalEditPart = (ConnectionEditPart)source.getSourceConnections().get(0);
+ View view = (View)graphicalEditPart.getModel();
+ linkElement = (Element)view.getElement();
+
+ deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ testToDropAlinkOnTheSame(linkType, allowedOntheSame);
+ }
+
+
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testToCreateALink(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param linkType
+ */
+
+ @Override
+ public void testToCreateALink(IElementType linkType) {
+ assertEquals(CREATION + INITIALIZATION_TEST, beginDiagramEditPartChildrenSize, getDiagramEditPart().getChildren().size());
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ assertTrue(CREATION + INITIALIZATION_TEST, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, target));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
+ ConnectionEditPart graphicalEditPart = (ConnectionEditPart)source.getSourceConnections().get(0);
+ View view = (View)graphicalEditPart.getModel();
+ linkElement = (Element)view.getElement();
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ assertEquals(CREATION + INITIALIZATION_TEST, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, endRootViewChildrenSize, getRootView().getChildren().size());
+ assertTrue(CREATION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(CREATION + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ assertTrue(CREATION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testDestroy(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param type
+ */
+
+ @Override
+ public void testDestroy(IElementType type) { // BMA : FIXME : unused param
+ //DESTROY SEMANTIC+ VIEW
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ Request deleteViewRequest = new EditCommandRequestWrapper(new DestroyElementRequest(false));
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(DESTROY_DELETION + COMMAND_NULL, command);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DESTROY_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, diagramEditor.getDiagramEditDomain().getDiagramCommandStack().canUndo() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DESTROY_DELETION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(DESTROY_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == beginRootSemanticOwnedElementSize);
+ }
+
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testViewDeletion(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param type
+ */
+
+ @Override
+ public void testViewDeletion(IElementType type) { // BMA : FIXME : unused param
+ //DELETION OF THE VIEW
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ Request deleteViewRequest = new GroupRequest(RequestConstants.REQ_DELETE);
+ Command command = ((ConnectionEditPart)source.getSourceConnections().get(0)).getCommand(deleteViewRequest);
+ assertNotNull(VIEW_DELETION + COMMAND_NULL, command);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(VIEW_DELETION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, source.getSourceConnections().size() == endSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, source.getSourceConnections().size() == beginSourceConnectionsSize);
+ assertTrue(VIEW_DELETION + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.tests.canonical.TestLink#testDrop(org.eclipse.gmf.runtime.emf.type.core.IElementType)
+ *
+ * @param type
+ */
+
+ @Override
+ public void testDrop(IElementType type) {// BMA : FIXME : unused param
+ //DROP
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ List<Element> list = new ArrayList<Element>();
+ list.add(linkElement);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(DEFAULT_DROP_LOCATION);
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ }
+
+
+
+ /**
+ * test the drop of a link where the source and the target are the same objects.
+ *
+ * @param linkType
+ * the link type
+ * @param allowed
+ * the allowed
+ */
+ @Override
+ protected void testToDropAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ //DROP
+ if(allowed) {
+ assertTrue(DROP + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
+ DropObjectsRequest dropObjectsRequest = new DropObjectsRequest();
+ List<Element> list = new ArrayList<Element>();
+ list.add(linkElement);
+ dropObjectsRequest.setObjects(list);
+ dropObjectsRequest.setLocation(DEFAULT_DROP_LOCATION);
+ Command command = getDiagramEditPart().getCommand(dropObjectsRequest);
+ assertNotNull(DROP + COMMAND_NULL, command);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(DROP + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(DROP + TEST_THE_EXECUTION, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_EXECUTION, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(DROP + TEST_THE_UNDO, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_UNDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_UNDO, ((Diagram)getRootView()).getEdges().size() == beginRootEdgeSize);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue(DROP + TEST_THE_REDO, getDiagramEditPart().getChildren().size() == endDiagramEditPartChildrenSize);
+ assertTrue(DROP + TEST_THE_REDO, getRootSemanticModel().getOwnedElements().size() == endRootSemanticOwnedElementSize);
+ assertTrue(DROP + TEST_THE_REDO, ((Diagram)getRootView()).getEdges().size() == endRootEdgeSize);
+ }
+ }
+
+ /**
+ * test the creation of a link where the source and the target are the same objects.
+ *
+ * @param linkType
+ * the link type
+ * @param allowed
+ * the allowed
+ */
+ @Override
+ protected void testToCreateAlinkOnTheSame(IElementType linkType, boolean allowed) {
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == beginDiagramEditPartChildrenSize);
+ assertEquals(CREATION + INITIALIZATION_TEST, beginRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ Command command = target.getCommand(createConnectionViewRequest(linkType, source, source));
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertEquals(CONTAINER_CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute(), allowed);
+ if(allowed) {
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertEquals(CREATION + INITIALIZATION_TEST, endRootEdgeSize, ((Diagram)getRootView()).getEdges().size());
+ assertEquals(CREATION + INITIALIZATION_TEST, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertEquals(CREATION + TEST_THE_UNDO, beginRootViewChildrenSize, getRootView().getChildren().size());
+ assertEquals(CREATION + TEST_THE_UNDO, beginRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertEquals(CREATION + TEST_THE_REDO, endRootEdgeSize, ((Diagram)getRootView()).getEdges().size());
+ assertEquals(CREATION + TEST_THE_REDO, endRootSemanticOwnedElementSize, getRootSemanticModel().getOwnedElements().size());
+ }
+ }
+
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java
new file mode 100644
index 00000000000..8232b8227f4
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestNested.java
@@ -0,0 +1,184 @@
+/*****************************************************************************
+ * Copyright (c) 2013 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Nizar GUEDIDI (CEA LIST) - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import org.eclipse.gef.commands.Command;
+import org.eclipse.gef.commands.UnexecutableCommand;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ListCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.editparts.ResizableCompartmentEditPart;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequest;
+import org.eclipse.gmf.runtime.diagram.ui.requests.CreateViewRequestFactory;
+import org.eclipse.gmf.runtime.emf.type.core.IElementType;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.uml2.uml.Element;
+
+public abstract class TestNested extends org.eclipse.papyrus.uml.diagram.tests.canonical.AbstractPapyrusTestCase {
+
+ /** The top node. */
+ protected GraphicalEditPart topNode;
+
+ /** The Child node. */
+ protected GraphicalEditPart childNode;
+
+ /**
+ * Test to create a nested classifier node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToCreateAChildLabel(IElementType type, int containerType) {
+ ListCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getChildEditPart().getChildren().size()) {
+ if((getChildEditPart().getChildren().get(index)) instanceof ListCompartmentEditPart && (((View)((ListCompartmentEditPart)(getChildEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ListCompartmentEditPart)(getChildEditPart().getChildren().get(index));
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModelchild().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getChildEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1);
+ }
+
+ /**
+ * Test to create a node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToCreateANode(IElementType type, int containerType) {
+ ResizableCompartmentEditPart compartment = null;
+ int index = 0;
+ while(compartment == null && index < getTopEditPart().getChildren().size()) {
+ if((getTopEditPart().getChildren().get(index)) instanceof ResizableCompartmentEditPart) {
+ if((((View)((ResizableCompartmentEditPart)(getTopEditPart().getChildren().get(index))).getModel()).getType().equals("" + containerType))) {
+ compartment = (ResizableCompartmentEditPart)(getTopEditPart().getChildren().get(index));
+ }
+ }
+ index++;
+ }
+ assertTrue("Container not found", compartment != null);
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, getRootSemanticModel().getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = compartment.getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue("CREATION: " + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, compartment.getChildren().size() == 1);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().undo();
+ assertTrue(CREATION + TEST_THE_UNDO, compartment.getChildren().size() == 0);
+ assertTrue(CREATION + TEST_THE_UNDO, ((Element)((View)getTopEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().redo();
+ assertTrue("CREATION: " + TEST_THE_REDO, compartment.getChildren().size() == 1);
+ childNode = (GraphicalEditPart)compartment.getChildren().get(0);
+ }
+
+ /**
+ * Gets the root semantic modelchild.
+ *
+ * @return the root semantic modelchild
+ */
+ private Element getRootSemanticModelchild() {
+ return (Element)((View)getChildEditPart().getModel()).getElement();
+ }
+
+ /**
+ * Test to create a top node.
+ *
+ * @param type
+ * the type
+ */
+ public void testToCreateATopNode(IElementType type) {
+ //CREATION
+ assertTrue(CREATION + INITIALIZATION_TEST, getDiagramEditPart().getChildren().size() == 0);
+ assertTrue(CREATION + INITIALIZATION_TEST, ((Element)((View)getDiagramEditPart().getModel()).getElement()).getOwnedElements().size() == 0);
+ CreateViewRequest requestcreation = CreateViewRequestFactory.getCreateShapeRequest(type, getDiagramEditPart().getDiagramPreferencesHint());
+ Command command = getDiagramEditPart().getCommand(requestcreation);
+ assertNotNull(CREATION + COMMAND_NULL, command);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_IS_CREATED, command != UnexecutableCommand.INSTANCE);
+ assertTrue(CREATION + TEST_IF_THE_COMMAND_CAN_BE_EXECUTED, command.canExecute() == true);
+ diagramEditor.getDiagramEditDomain().getDiagramCommandStack().execute(command);
+ assertTrue(CREATION + TEST_THE_EXECUTION, getRootView().getChildren().size() == 1);
+ topNode = (GraphicalEditPart)getDiagramEditPart().getChildren().get(0);
+ }
+
+ /**
+ * Gets the top edit part.
+ *
+ * @return the top edit part
+ */
+ public GraphicalEditPart getTopEditPart() {
+ return topNode;
+ }
+
+ /**
+ * Gets the Child edit part.
+ *
+ * @return the Child edit part
+ */
+ public GraphicalEditPart getChildEditPart() {
+ return childNode;
+ }
+
+ /**
+ * @see org.eclipse.papyrus.diagram.clazz.test.canonical.AbstractPapyrusTestCase#getRootSemanticModel()
+ *
+ * @return
+ */
+ @Override
+ protected Element getRootSemanticModel() {
+ return (Element)((View)getTopEditPart().getModel()).getElement();
+ }
+
+ /**
+ * Test to manage top node.
+ *
+ * @param type
+ * the type
+ * @param containerType
+ * the container type
+ */
+ public void testToManageTopNode(IElementType parentNodeType, IElementType topNodeType, IElementType type, int containerChilType, int containerType) {
+ //Parent Node
+ testToCreateATopNode(parentNodeType);
+ //Top Node
+ testToCreateANode(topNodeType, containerChilType);
+ //Nested classifier
+ testToCreateAChildLabel(type, containerType);
+ }
+}
diff --git a/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java
new file mode 100644
index 00000000000..55dd6791f1a
--- /dev/null
+++ b/tests/junit/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.tests/src/org/eclipse/papyrus/uml/diagram/tests/canonical/TestTopNode.java
@@ -0,0 +1,47 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.tests.canonical;
+
+import org.eclipse.gmf.runtime.diagram.ui.editparts.IGraphicalEditPart;
+import org.eclipse.gmf.runtime.notation.View;
+
+/**
+ * The Class TestTopNode.
+ */
+public abstract class TestTopNode extends AbstractTestNode {
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected IGraphicalEditPart getContainerEditPart() {
+ return getDiagramEditPart();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected View getRootView() {
+ return (View)getContainerEditPart().getModel();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected boolean isSemanticTest() {
+ return true;
+ }
+}

Back to the top