Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2016-01-20 19:07:38 +0000
committerChristian W. Damus2016-01-22 15:57:13 +0000
commit02b052a140cd3c0499700afd5b8a1fdd31782a71 (patch)
treeeb2cf1b4eb11829dcf6d94ffad7644e318eaa804
parent929e9738301b35cef5cc1ab00f47047671940bd5 (diff)
downloadorg.eclipse.papyrus-02b052a140cd3c0499700afd5b8a1fdd31782a71.tar.gz
org.eclipse.papyrus-02b052a140cd3c0499700afd5b8a1fdd31782a71.tar.xz
org.eclipse.papyrus-02b052a140cd3c0499700afd5b8a1fdd31782a71.zip
Bug 485220: [Architecture] Provide a more modular architecture
https://bugs.eclipse.org/bugs/show_bug.cgi?id=485220 Decouple infra bundles from dependencies on UML, especially for access to the semantic model, using new APIs provided by the ILanguageService and IModel and also by the refined and new implementation of the SemanticService APIs defined in previous releases. Provide generalized access to SemanticEMFContentProviders for the semantic model content in the ModelSet by adaptation of IModels (semantic IModels per new Language Service API) to a new ISemanticContentProviderFactory protocol that creates content providers appropriate to the specific semantic model. Move the identifier of the Papyrus toolbar contribution out of the UML namespace: org.eclipse.papyrus.uml.diagram.ui.toolbar is now just org.eclipse.papyrus.ui.toolbar. Add a new XML enablement expression definition named org.eclipse.papyrus.ui.semanticModelActive as a generalization of the org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel for more than just UML Papyrus editors. Tests all still pass (inasmuch as they do in the nightly master builds). Change-Id: I41af229742134428e9e00f41575c14ef1aaf5e09
-rw-r--r--extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/plugin.xml2
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml2
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/.project17
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/build.properties6
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/epl-v10.html304
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.properties138
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.xml17
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/license.html107
-rw-r--r--features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/pom.xml14
-rw-r--r--features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature/feature.xml2
-rw-r--r--plugins/editor/org.eclipse.papyrus.editor/plugin.xml2
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml11
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/schema/language.exsd34
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/expressions/ServiceRegistryPropertyTester.java69
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/language/LanguageModelRegistry.java146
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java16
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java36
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java33
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResource.java19
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java12
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java14
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IModel.java17
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java15
-rw-r--r--plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/DiResourceSet.java284
-rw-r--r--plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml6
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java24
-rw-r--r--plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/META-INF/MANIFEST.MF3
-rwxr-xr-xplugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/AbstractSynchronizedOnEStructuralFeatureAxisManager.java14
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml11
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF9
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.classpath14
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/Messages.java16
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/messages.properties13
-rw-r--r--plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/TableViewCreationTester.java21
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF3
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java2
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes.ui/META-INF/MANIFEST.MF1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml8
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowDown_16x16.gifbin0 -> 332 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowLeft_16x16.gifbin0 -> 327 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowRight_16x16.gifbin0 -> 541 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowUp_16x16.gifbin0 -> 323 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/insp_sbook.gifbin0 -> 459 bytes
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/Activator.java39
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java5
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkWeb.java10
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/AbstractEditHyperlinkDocumentShell.java6
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/DefaultHyperLinkTab.java9
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/.classpath4
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF8
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/build.properties1
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java46
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/META-INF/MANIFEST.MF4
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/plugin.xml20
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositePapyrusContentProvider.java109
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositeSemanticContentProviderFactory.java63
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProvider.java170
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/ISemanticContentProviderFactory.java59
-rw-r--r--plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorUtils.java18
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.classpath14
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/META-INF/MANIFEST.MF8
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/OnDemandLoadingModelSet.java54
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/util/LoadingUtils.java49
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.classpath14
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/META-INF/MANIFEST.MF2
-rw-r--r--plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/src/org/eclipse/papyrus/infra/services/semantic/service/impl/SemanticServiceImpl.java62
-rw-r--r--plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Profile.gifbin0 -> 154 bytes
-rwxr-xr-xplugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java46
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml2
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/plugin.xml2
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui.perspectiveconfiguration/plugin.xml2
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/.classpath7
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/.gitignore1
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/.project28
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/META-INF/MANIFEST.MF41
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/about.html28
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/build.properties18
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/plugin.properties13
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml14
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/pom.xml14
-rw-r--r--plugins/uml/org.eclipse.papyrus.uml.ui/src/org/eclipse/papyrus/uml/ui/internal/adapters/UMLModelAdapterFactory.java51
-rw-r--r--plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/model/CreatedPapyrusProfileModel.java75
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml12
-rw-r--r--plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/model/UmlModel.java23
-rw-r--r--releng/main-tests/pom.xml1
-rwxr-xr-xreleng/main/pom.xml2
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/language/LanguageServiceTest.java57
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF3
-rw-r--r--tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java1
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.classpath2
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.settings/org.eclipse.jdt.core.prefs6
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/META-INF/MANIFEST.MF7
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/org.eclipse.papyrus.infra.ui.tests.launch2
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProviderTest.java113
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/SemanticContentProviderFactoryTest.java106
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/TestContentProvider.java214
-rw-r--r--tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/tests/AllTests.java4
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.classpath7
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.project28
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.core.prefs291
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.ui.prefs68
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/META-INF/MANIFEST.MF18
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/about.html28
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/build.properties19
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/org.eclipse.papyrus.infra.services.semantic.tests.launch44
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/plugin.properties13
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/pom.xml15
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.di2
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.notation328
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.uml25
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/AllTests.java27
-rw-r--r--tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/SemanticServiceTest.java101
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java28
-rw-r--r--tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java37
126 files changed, 4011 insertions, 597 deletions
diff --git a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/plugin.xml b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/plugin.xml
index 27d41b758c3..f2959613d02 100644
--- a/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/plugin.xml
+++ b/extraplugins/layers/org.eclipse.papyrus.layers.stackmodel.diagram/plugin.xml
@@ -61,7 +61,7 @@
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ id="org.eclipse.papyrus.ui.toolbar">
<command
commandId="org.eclipse.papyrus.layers.stackmodel.diagram.createDiagram"
icon="icons/layerDiagram.gif"
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
index 9235862b5c0..a421f6c519c 100644
--- a/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
+++ b/features/papyrus-main-features/org.eclipse.papyrus.sdk.feature/feature.xml
@@ -40,6 +40,8 @@ http://www.eclipse.org/legal/epl-v10.html
<includes id="org.eclipse.papyrus.uml.tools.feature" version="0.0.0"/>
+ <includes id="org.eclipse.papyrus.uml.ui.feature" version="0.0.0"/>
+
<includes id="org.eclipse.papyrus.views.modelexplorer.feature" version="0.0.0"/>
<includes id="org.eclipse.papyrus.views.properties.feature" version="0.0.0"/>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/.project b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/.project
new file mode 100644
index 00000000000..f314bf4eae6
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.ui.feature</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.pde.FeatureBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.FeatureNature</nature>
+ </natures>
+</projectDescription>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/build.properties b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/build.properties
new file mode 100644
index 00000000000..cff2bd50c57
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/build.properties
@@ -0,0 +1,6 @@
+bin.includes = feature.xml,\
+ epl-v10.html,\
+ license.html,\
+ feature.properties
+src.includes = epl-v10.html,\
+ license.html
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/epl-v10.html b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/epl-v10.html
new file mode 100644
index 00000000000..cb1073a4bad
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/epl-v10.html
@@ -0,0 +1,304 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
+<html xmlns:o="urn:schemas-microsoft-com:office:office"
+xmlns:w="urn:schemas-microsoft-com:office:word"
+xmlns="http://www.w3.org/TR/REC-html40">
+
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
+<link rel=File-List
+href="./Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
+<title>Eclipse Public License - Version 1.0</title>
+<style>
+<!--
+ /* Font Definitions */
+@font-face
+ {
+ panose-1:2 11 6 4 3 5 4 4 2 4;
+ mso-font-charset:0;
+ mso-font-pitch:variable;
+ mso-font-signature:553679495 -2147483648 8 0 66047 0;}
+ /* Style Definitions */
+p.MsoNormal, li.MsoNormal, div.MsoNormal
+ {mso-style-parent:"";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p
+ {margin-right:0in;
+ mso-margin-top-alt:auto;
+ mso-margin-bottom-alt:auto;
+ margin-left:0in;
+ mso-pagination:widow-orphan;
+ font-size:12.0pt;
+ }
+p.BalloonText, li.BalloonText, div.BalloonText
+ {mso-style-name:"Balloon Text";
+ margin:0in;
+ margin-bottom:.0001pt;
+ mso-pagination:widow-orphan;
+ font-size:8.0pt;
+
+ }
+@page Section1
+ {size:8.5in 11.0in;
+ margin:1.0in 1.25in 1.0in 1.25in;
+ mso-header-margin:.5in;
+ mso-footer-margin:.5in;
+ mso-paper-source:0;}
+div.Section1
+ {page:Section1;}
+-->
+</style>
+</head>
+
+<body lang="EN-US" style='tab-interval:.5in'>
+
+<div class=Section1>
+
+<p align=center style='text-align:center'><b>Eclipse Public License - v 1.0</b>
+</p>
+
+<p><span style='font-size:10.0pt'>THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
+THE TERMS OF THIS ECLIPSE PUBLIC LICENSE (&quot;AGREEMENT&quot;). ANY USE,
+REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
+OF THIS AGREEMENT.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>1. DEFINITIONS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Contribution&quot; means:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+in the case of the initial Contributor, the initial code and documentation
+distributed under this Agreement, and<br clear=left>
+b) in the case of each subsequent Contributor:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+changes to the Program, and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+additions to the Program;</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>where
+such changes and/or additions to the Program originate from and are distributed
+by that particular Contributor. A Contribution 'originates' from a Contributor
+if it was added to the Program by such Contributor itself or anyone acting on
+such Contributor's behalf. Contributions do not include additions to the
+Program which: (i) are separate modules of software distributed in conjunction
+with the Program under their own license agreement, and (ii) are not derivative
+works of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Contributor&quot; means any person or
+entity that distributes the Program.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Licensed Patents &quot; mean patent
+claims licensable by a Contributor which are necessarily infringed by the use
+or sale of its Contribution alone or when combined with the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>&quot;Program&quot; means the Contributions
+distributed in accordance with this Agreement.</span> </p>
+
+<p><span style='font-size:10.0pt'>&quot;Recipient&quot; means anyone who
+receives the Program under this Agreement, including all Contributors.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>2. GRANT OF RIGHTS</span></b> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+Subject to the terms of this Agreement, each Contributor hereby grants Recipient
+a non-exclusive, worldwide, royalty-free copyright license to<span
+style='color:red'> </span>reproduce, prepare derivative works of, publicly
+display, publicly perform, distribute and sublicense the Contribution of such
+Contributor, if any, and such derivative works, in source code and object code
+form.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+Subject to the terms of this Agreement, each Contributor hereby grants
+Recipient a non-exclusive, worldwide,<span style='color:green'> </span>royalty-free
+patent license under Licensed Patents to make, use, sell, offer to sell, import
+and otherwise transfer the Contribution of such Contributor, if any, in source
+code and object code form. This patent license shall apply to the combination
+of the Contribution and the Program if, at the time the Contribution is added
+by the Contributor, such addition of the Contribution causes such combination
+to be covered by the Licensed Patents. The patent license shall not apply to
+any other combinations which include the Contribution. No hardware per se is
+licensed hereunder. </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>c)
+Recipient understands that although each Contributor grants the licenses to its
+Contributions set forth herein, no assurances are provided by any Contributor
+that the Program does not infringe the patent or other intellectual property
+rights of any other entity. Each Contributor disclaims any liability to Recipient
+for claims brought by any other entity based on infringement of intellectual
+property rights or otherwise. As a condition to exercising the rights and
+licenses granted hereunder, each Recipient hereby assumes sole responsibility
+to secure any other intellectual property rights needed, if any. For example,
+if a third party patent license is required to allow Recipient to distribute
+the Program, it is Recipient's responsibility to acquire that license before
+distributing the Program.</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>d)
+Each Contributor represents that to its knowledge it has sufficient copyright
+rights in its Contribution, if any, to grant the copyright license set forth in
+this Agreement. </span></p>
+
+<p><b><span style='font-size:10.0pt'>3. REQUIREMENTS</span></b> </p>
+
+<p><span style='font-size:10.0pt'>A Contributor may choose to distribute the
+Program in object code form under its own license agreement, provided that:</span>
+</p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it complies with the terms and conditions of this Agreement; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b)
+its license agreement:</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>i)
+effectively disclaims on behalf of all Contributors all warranties and
+conditions, express and implied, including warranties or conditions of title
+and non-infringement, and implied warranties or conditions of merchantability
+and fitness for a particular purpose; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>ii)
+effectively excludes on behalf of all Contributors all liability for damages,
+including direct, indirect, special, incidental and consequential damages, such
+as lost profits; </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iii)
+states that any provisions which differ from this Agreement are offered by that
+Contributor alone and not by any other party; and</span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>iv)
+states that source code for the Program is available from such Contributor, and
+informs licensees how to obtain it in a reasonable manner on or through a
+medium customarily used for software exchange.<span style='color:blue'> </span></span></p>
+
+<p><span style='font-size:10.0pt'>When the Program is made available in source
+code form:</span> </p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a)
+it must be made available under this Agreement; and </span></p>
+
+<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>b) a
+copy of this Agreement must be included with each copy of the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Contributors may not remove or alter any
+copyright notices contained within the Program. </span></p>
+
+<p><span style='font-size:10.0pt'>Each Contributor must identify itself as the
+originator of its Contribution, if any, in a manner that reasonably allows
+subsequent Recipients to identify the originator of the Contribution. </span></p>
+
+<p><b><span style='font-size:10.0pt'>4. COMMERCIAL DISTRIBUTION</span></b> </p>
+
+<p><span style='font-size:10.0pt'>Commercial distributors of software may
+accept certain responsibilities with respect to end users, business partners
+and the like. While this license is intended to facilitate the commercial use
+of the Program, the Contributor who includes the Program in a commercial
+product offering should do so in a manner which does not create potential
+liability for other Contributors. Therefore, if a Contributor includes the
+Program in a commercial product offering, such Contributor (&quot;Commercial
+Contributor&quot;) hereby agrees to defend and indemnify every other
+Contributor (&quot;Indemnified Contributor&quot;) against any losses, damages and
+costs (collectively &quot;Losses&quot;) arising from claims, lawsuits and other
+legal actions brought by a third party against the Indemnified Contributor to
+the extent caused by the acts or omissions of such Commercial Contributor in
+connection with its distribution of the Program in a commercial product
+offering. The obligations in this section do not apply to any claims or Losses
+relating to any actual or alleged intellectual property infringement. In order
+to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
+Contributor in writing of such claim, and b) allow the Commercial Contributor
+to control, and cooperate with the Commercial Contributor in, the defense and
+any related settlement negotiations. The Indemnified Contributor may participate
+in any such claim at its own expense.</span> </p>
+
+<p><span style='font-size:10.0pt'>For example, a Contributor might include the
+Program in a commercial product offering, Product X. That Contributor is then a
+Commercial Contributor. If that Commercial Contributor then makes performance
+claims, or offers warranties related to Product X, those performance claims and
+warranties are such Commercial Contributor's responsibility alone. Under this
+section, the Commercial Contributor would have to defend claims against the
+other Contributors related to those performance claims and warranties, and if a
+court requires any other Contributor to pay any damages as a result, the
+Commercial Contributor must pay those damages.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>5. NO WARRANTY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, THE PROGRAM IS PROVIDED ON AN &quot;AS IS&quot; BASIS, WITHOUT
+WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
+WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
+MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
+responsible for determining the appropriateness of using and distributing the
+Program and assumes all risks associated with its exercise of rights under this
+Agreement , including but not limited to the risks and costs of program errors,
+compliance with applicable laws, damage to or loss of data, programs or
+equipment, and unavailability or interruption of operations. </span></p>
+
+<p><b><span style='font-size:10.0pt'>6. DISCLAIMER OF LIABILITY</span></b> </p>
+
+<p><span style='font-size:10.0pt'>EXCEPT AS EXPRESSLY SET FORTH IN THIS
+AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
+OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
+THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
+THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
+
+<p><b><span style='font-size:10.0pt'>7. GENERAL</span></b> </p>
+
+<p><span style='font-size:10.0pt'>If any provision of this Agreement is invalid
+or unenforceable under applicable law, it shall not affect the validity or
+enforceability of the remainder of the terms of this Agreement, and without
+further action by the parties hereto, such provision shall be reformed to the
+minimum extent necessary to make such provision valid and enforceable.</span> </p>
+
+<p><span style='font-size:10.0pt'>If Recipient institutes patent litigation
+against any entity (including a cross-claim or counterclaim in a lawsuit)
+alleging that the Program itself (excluding combinations of the Program with
+other software or hardware) infringes such Recipient's patent(s), then such
+Recipient's rights granted under Section 2(b) shall terminate as of the date
+such litigation is filed. </span></p>
+
+<p><span style='font-size:10.0pt'>All Recipient's rights under this Agreement
+shall terminate if it fails to comply with any of the material terms or
+conditions of this Agreement and does not cure such failure in a reasonable
+period of time after becoming aware of such noncompliance. If all Recipient's
+rights under this Agreement terminate, Recipient agrees to cease use and
+distribution of the Program as soon as reasonably practicable. However,
+Recipient's obligations under this Agreement and any licenses granted by
+Recipient relating to the Program shall continue and survive. </span></p>
+
+<p><span style='font-size:10.0pt'>Everyone is permitted to copy and distribute
+copies of this Agreement, but in order to avoid inconsistency the Agreement is
+copyrighted and may only be modified in the following manner. The Agreement
+Steward reserves the right to publish new versions (including revisions) of
+this Agreement from time to time. No one other than the Agreement Steward has
+the right to modify this Agreement. The Eclipse Foundation is the initial
+Agreement Steward. The Eclipse Foundation may assign the responsibility to
+serve as the Agreement Steward to a suitable separate entity. Each new version
+of the Agreement will be given a distinguishing version number. The Program
+(including Contributions) may always be distributed subject to the version of
+the Agreement under which it was received. In addition, after a new version of
+the Agreement is published, Contributor may elect to distribute the Program
+(including its Contributions) under the new version. Except as expressly stated
+in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
+the intellectual property of any Contributor under this Agreement, whether
+expressly, by implication, estoppel or otherwise. All rights in the Program not
+expressly granted under this Agreement are reserved.</span> </p>
+
+<p><span style='font-size:10.0pt'>This Agreement is governed by the laws of the
+State of New York and the intellectual property laws of the United States of
+America. No party to this Agreement will bring a legal action under this
+Agreement more than one year after the cause of action arose. Each party waives
+its rights to a jury trial in any resulting litigation.</span> </p>
+
+<p class=MsoNormal></p>
+
+</div>
+
+</body>
+
+</html> \ No newline at end of file
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.properties b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.properties
new file mode 100644
index 00000000000..1fadec4e17d
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.properties
@@ -0,0 +1,138 @@
+# NLS_MESSAGEFORMAT_VAR
+
+# "featureName" property - name of the feature
+featureName=Papyrus UML UI
+
+# "providerName" property - name of the company that provides the feature
+providerName=Eclipse Modeling Project
+
+# "licenseURL" property - URL of the "Feature License"
+# do not translate value - just change to point to a locale-specific HTML page
+licenseURL=license.html
+
+# "license" property - text of the "Feature Update License"
+# should be plain text version of license agreement pointed to be "licenseURL"
+license=\
+Eclipse Foundation Software User Agreement\n\
+April 9, 2014\n\
+\n\
+Usage Of Content\n\
+\n\
+THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
+OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
+USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
+AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
+NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
+AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
+AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
+OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
+TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
+OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
+BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
+\n\
+Applicable Licenses\n\
+\n\
+Unless otherwise indicated, all Content made available by the\n\
+Eclipse Foundation is provided to you under the terms and conditions of\n\
+the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
+provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
+For purposes of the EPL, "Program" will mean the Content.\n\
+\n\
+Content includes, but is not limited to, source code, object code,\n\
+documentation and other files maintained in the Eclipse Foundation source code\n\
+repository ("Repository") in software modules ("Modules") and made available\n\
+as downloadable archives ("Downloads").\n\
+\n\
+\t- Content may be structured and packaged into modules to facilitate delivering,\n\
+\t extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
+\t plug-in fragments ("Fragments"), and features ("Features").\n\
+\t- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
+\t in a directory named "plugins".\n\
+\t- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
+\t Each Feature may be packaged as a sub-directory in a directory named "features".\n\
+\t Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
+\t numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
+\t- Features may also include other Features ("Included Features"). Within a Feature, files\n\
+\t named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
+\n\
+The terms and conditions governing Plug-ins and Fragments should be\n\
+contained in files named "about.html" ("Abouts"). The terms and\n\
+conditions governing Features and Included Features should be contained\n\
+in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
+Licenses may be located in any directory of a Download or Module\n\
+including, but not limited to the following locations:\n\
+\n\
+\t- The top-level (root) directory\n\
+\t- Plug-in and Fragment directories\n\
+\t- Inside Plug-ins and Fragments packaged as JARs\n\
+\t- Sub-directories of the directory named "src" of certain Plug-ins\n\
+\t- Feature directories\n\
+\n\
+Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
+Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
+Update License") during the installation process. If the Feature contains\n\
+Included Features, the Feature Update License should either provide you\n\
+with the terms and conditions governing the Included Features or inform\n\
+you where you can locate them. Feature Update Licenses may be found in\n\
+the "license" property of files named "feature.properties" found within a Feature.\n\
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
+terms and conditions (or references to such terms and conditions) that\n\
+govern your use of the associated Content in that directory.\n\
+\n\
+THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
+TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
+SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
+\n\
+\t- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
+\t- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
+\t- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
+\t- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
+\t- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
+\n\
+IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
+TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
+is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
+govern that particular Content.\n\
+\n\
+\n\Use of Provisioning Technology\n\
+\n\
+The Eclipse Foundation makes available provisioning software, examples of which include,\n\
+but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
+the purpose of allowing users to install software, documentation, information and/or\n\
+other materials (collectively "Installable Software"). This capability is provided with\n\
+the intent of allowing such users to install, extend and update Eclipse-based products.\n\
+Information about packaging Installable Software is available at\n\
+http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
+\n\
+You may use Provisioning Technology to allow other parties to install Installable Software.\n\
+You shall be responsible for enabling the applicable license agreements relating to the\n\
+Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
+in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
+making it available in accordance with the Specification, you further acknowledge your\n\
+agreement to, and the acquisition of all necessary rights to permit the following:\n\
+\n\
+\t1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
+\t the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
+\t extending or updating the functionality of an Eclipse-based product.\n\
+\t2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
+\t Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
+\t3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
+\t govern the use of the Installable Software ("Installable Software Agreement") and such\n\
+\t Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
+\t with the Specification. Such Installable Software Agreement must inform the user of the\n\
+\t terms and conditions that govern the Installable Software and must solicit acceptance by\n\
+\t the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
+\t indication of agreement by the user, the provisioning Technology will complete installation\n\
+\t of the Installable Software.\n\
+\n\
+Cryptography\n\
+\n\
+Content may contain encryption software. The country in which you are\n\
+currently may have restrictions on the import, possession, and use,\n\
+and/or re-export to another country, of encryption software. BEFORE\n\
+using any encryption software, please check the country's laws,\n\
+regulations and policies concerning the import, possession, or use, and\n\
+re-export of encryption software, to see if this is permitted.\n\
+\n\
+Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
+########### end of license property ##########################################
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.xml
new file mode 100644
index 00000000000..251a57f692a
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/feature.xml
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><feature id="org.eclipse.papyrus.uml.ui.feature" label="%featureName" provider-name="%providerName" version="1.2.0.qualifier">
+
+ <copyright url="http://www.eclipse.org/legal/epl-v10.html">
+ Copyright (c) 2016 Christian W. Damus and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Eclipse Public License v1.0
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/epl-v10.html
+ </copyright>
+
+ <license url="%licenseURL">
+ %license
+ </license>
+
+ <plugin download-size="0" id="org.eclipse.papyrus.uml.ui" install-size="0" unpack="false" version="0.0.0"/>
+
+</feature>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/license.html b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/license.html
new file mode 100644
index 00000000000..c3d34c3c21e
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/license.html
@@ -0,0 +1,107 @@
+<?xml version="1.0" encoding="ISO-8859-1" ?>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
+<title>Eclipse Foundation Software User Agreement</title>
+</head>
+
+<body lang="EN-US">
+<h2>Eclipse Foundation Software User Agreement</h2>
+<p>April 9, 2014</p>
+
+<h3>Usage Of Content</h3>
+
+<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
+ (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
+ CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
+ OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
+ NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
+ CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
+
+<h3>Applicable Licenses</h3>
+
+<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
+ (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
+ For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
+
+<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
+ repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
+
+<ul>
+ <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
+ <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
+ <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
+ and/or Fragments associated with that Feature.</li>
+ <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
+</ul>
+
+<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
+Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
+including, but not limited to the following locations:</p>
+
+<ul>
+ <li>The top-level (root) directory</li>
+ <li>Plug-in and Fragment directories</li>
+ <li>Inside Plug-ins and Fragments packaged as JARs</li>
+ <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
+ <li>Feature directories</li>
+</ul>
+
+<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
+installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
+inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
+Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
+that directory.</p>
+
+<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
+OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
+
+<ul>
+ <li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
+ <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
+ <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
+ <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
+ <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
+</ul>
+
+<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
+contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
+
+
+<h3>Use of Provisioning Technology</h3>
+
+<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
+ Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
+ other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
+ install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
+ href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
+ (&quot;Specification&quot;).</p>
+
+<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
+ applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
+ in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
+ Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
+
+<ol>
+ <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
+ on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
+ product.</li>
+ <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
+ accessed and copied to the Target Machine.</li>
+ <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
+ Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
+ Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
+ the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
+ indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
+</ol>
+
+<h3>Cryptography</h3>
+
+<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
+ another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
+ possession, or use, and re-export of encryption software, to see if this is permitted.</p>
+
+<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
+</body>
+</html>
diff --git a/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/pom.xml b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/pom.xml
new file mode 100644
index 00000000000..a6ca1643eb3
--- /dev/null
+++ b/features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/main</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.ui.feature</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-feature</packaging>
+</project> \ No newline at end of file
diff --git a/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature/feature.xml b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature/feature.xml
index ddcf3241f30..fe46efb3f7f 100644
--- a/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature/feature.xml
+++ b/features/papyrus-tests-features/org.eclipse.papyrus.tests.infra.services.feature/feature.xml
@@ -23,4 +23,6 @@ http://www.eclipse.org/legal/epl-v10.html
<plugin download-size="0" id="org.eclipse.papyrus.infra.services.controlmode.tests" install-size="0" unpack="false" version="0.0.0"/>
+ <plugin download-size="0" id="org.eclipse.papyrus.infra.services.semantic.tests" install-size="0" unpack="false" version="0.0.0"/>
+
</feature> \ No newline at end of file
diff --git a/plugins/editor/org.eclipse.papyrus.editor/plugin.xml b/plugins/editor/org.eclipse.papyrus.editor/plugin.xml
index f930ad22cd4..88bc6cb3de3 100644
--- a/plugins/editor/org.eclipse.papyrus.editor/plugin.xml
+++ b/plugins/editor/org.eclipse.papyrus.editor/plugin.xml
@@ -76,7 +76,7 @@
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ id="org.eclipse.papyrus.ui.toolbar">
<command
commandId="org.eclipse.papyrus.editor.previousTabCommand"
icon="icons/arrow_left.gif"
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
index a7f9bade242..e0d039e4b5b 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/META-INF/MANIFEST.MF
@@ -3,6 +3,7 @@ Export-Package: org.eclipse.papyrus.infra.core,
org.eclipse.papyrus.infra.core.clipboard,
org.eclipse.papyrus.infra.core.editor,
org.eclipse.papyrus.infra.core.extension,
+ org.eclipse.papyrus.infra.core.internal.expressions;x-internal:=true,
org.eclipse.papyrus.infra.core.internal.sashmodel;x-internal:=true,
org.eclipse.papyrus.infra.core.language,
org.eclipse.papyrus.infra.core.listenerservice,
@@ -23,7 +24,8 @@ Require-Bundle: org.eclipse.core.runtime,
com.google.guava;bundle-version="11.0.0",
org.eclipse.core.filesystem,
org.eclipse.emf.ecore.xmi;bundle-version="2.12.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.core.expressions;bundle-version="3.5.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml b/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
index 06e5a11d674..a7a4780781c 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/plugin.xml
@@ -105,4 +105,15 @@
</dependsOn>
</serviceFactory>
</extension>
+
+ <extension
+ point="org.eclipse.core.expressions.propertyTesters">
+ <propertyTester
+ id="org.eclipse.papyrus.infra.core.serviceRegistryProperties"
+ type="org.eclipse.papyrus.infra.core.services.ServicesRegistry"
+ namespace="org.eclipse.papyrus.infra.core"
+ properties="hasSemanticModel"
+ class="org.eclipse.papyrus.infra.core.internal.expressions.ServiceRegistryPropertyTester">
+ </propertyTester>
+ </extension>
</plugin>
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/language.exsd b/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/language.exsd
index 516be1d8310..36ab0a0cda8 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/language.exsd
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/schema/language.exsd
@@ -17,9 +17,10 @@
</appInfo>
</annotation>
<complexType>
- <sequence>
+ <choice minOccurs="1" maxOccurs="unbounded">
<element ref="provider" minOccurs="1" maxOccurs="unbounded"/>
- </sequence>
+ <element ref="modelBinding"/>
+ </choice>
<attribute name="point" type="string" use="required">
<annotation>
<documentation>
@@ -190,6 +191,33 @@ Required if the &lt;tt&gt;&amp;lt;contentType&amp;gt;&lt;/tt&gt; element is spec
</complexType>
</element>
+ <element name="modelBinding">
+ <annotation>
+ <documentation>
+ Binds a Papyrus model to a language that describes its semantic content in the ModelSet.
+ </documentation>
+ </annotation>
+ <complexType>
+ <attribute name="language" type="string" use="required">
+ <annotation>
+ <documentation>
+ The Papyrus Modeling Language to which to bind a model.
+ </documentation>
+ <appInfo>
+ <meta.attribute kind="identifier" basedOn="org.eclipse.papyrus.infra.core.language/provider/language/@id"/>
+ </appInfo>
+ </annotation>
+ </attribute>
+ <attribute name="model" type="string" use="required">
+ <annotation>
+ <documentation>
+ References the model, by ID, to which the language is bound.
+ </documentation>
+ </annotation>
+ </attribute>
+ </complexType>
+ </element>
+
<annotation>
<appInfo>
<meta.section type="since"/>
@@ -207,7 +235,7 @@ Required if the &lt;tt&gt;&amp;lt;contentType&amp;gt;&lt;/tt&gt; element is spec
<meta.section type="copyright"/>
</appInfo>
<documentation>
- Copyright (c) 2015 Christian W. Damus and others.
+ Copyright (c) 2015, 2016 Christian W. Damus and others.
All rights reserved. This program and the accompanying materials
are made available under the terms of the Eclipse Public License v1.0
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/expressions/ServiceRegistryPropertyTester.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/expressions/ServiceRegistryPropertyTester.java
new file mode 100644
index 00000000000..89d2aec4da3
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/expressions/ServiceRegistryPropertyTester.java
@@ -0,0 +1,69 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.internal.expressions;
+
+import org.eclipse.core.expressions.PropertyTester;
+import org.eclipse.papyrus.infra.core.language.ILanguage;
+import org.eclipse.papyrus.infra.core.language.ILanguageService;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
+import org.eclipse.papyrus.infra.tools.util.TypeUtils;
+
+/**
+ * Enablement expression properties for the {@link ServicesRegistry} type. Supported properties are:
+ * <ul>
+ * <li>{@link #hasSemanticModel(ServicesRegistry) hasSemanticModel}: does any {@link ILanguage}
+ * instantiated in the registry's {@link ModelSet} (if there is one) have a corresponding
+ * {@link IModel} providing its content?</li>
+ * </ul>
+ */
+public class ServiceRegistryPropertyTester extends PropertyTester {
+
+ private static final String PROPERTY_HAS_SEMANTIC_MODEL = "hasSemanticModel"; //$NON-NLS-1$
+
+ public ServiceRegistryPropertyTester() {
+ super();
+ }
+
+ @Override
+ public boolean test(Object receiver, String property, Object[] args, Object expectedValue) {
+ boolean result;
+
+ switch (property) {
+ case PROPERTY_HAS_SEMANTIC_MODEL:
+ result = hasSemanticModel(TypeUtils.as(receiver, ServicesRegistry.class));
+ break;
+ default:
+ result = false;
+ break;
+ }
+
+ return result;
+ }
+
+ protected boolean hasSemanticModel(ServicesRegistry services) {
+ boolean result = false;
+
+ try {
+ ModelSet modelSet = services.getService(ModelSet.class);
+ result = !ILanguageService.getLanguageModels(modelSet).isEmpty();
+ } catch (ServiceException e) {
+ // Fine, there's no model-set
+ }
+
+ return result;
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/language/LanguageModelRegistry.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/language/LanguageModelRegistry.java
new file mode 100644
index 00000000000..b28d4bb5be8
--- /dev/null
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/internal/language/LanguageModelRegistry.java
@@ -0,0 +1,146 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.core.internal.language;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.eclipse.core.runtime.IConfigurationElement;
+import org.eclipse.core.runtime.Platform;
+import org.eclipse.emf.ecore.plugin.RegistryReader;
+import org.eclipse.osgi.util.NLS;
+import org.eclipse.papyrus.infra.core.Activator;
+import org.eclipse.papyrus.infra.core.language.ILanguage;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+import com.google.common.base.Strings;
+
+/**
+ * A registry of bindings of {@link IModel}s to {@link ILanguage}s, by ID.
+ */
+public class LanguageModelRegistry {
+
+ private static final String EXT_POINT = "language"; //$NON-NLS-1$
+
+ public static final LanguageModelRegistry INSTANCE = new LanguageModelRegistry();
+
+ private final Map<String, String> modelBindings = new HashMap<>();
+
+ private LanguageModelRegistry() {
+ super();
+
+ new MyRegistryReader().readRegistry();
+ }
+
+ public String getModelID(String languageID) {
+ return modelBindings.get(languageID);
+ }
+
+ public String getModelID(ILanguage language) {
+ return getModelID(language.getID());
+ }
+
+ public IModel getModel(ILanguage language, ModelSet modelSet) {
+ String modelID = getModelID(language);
+ return (modelID == null) ? null : modelSet.getModel(modelID);
+ }
+
+ /**
+ * Bind a model to a language. Has no effect it the language is already bound to a model.
+ *
+ * @param languageID
+ * the language to bind
+ * @param modelID
+ * the unique identifier of the model to bind to the language
+ */
+ public void bind(String languageID, String modelID) {
+ String current = modelBindings.putIfAbsent(languageID, modelID);
+ if (current != null) {
+ Activator.log.warn(NLS.bind("Language {0} is already bound to model {1}; ignoring model {2}", new Object[] { languageID, current, modelID }));
+ }
+ }
+
+ /**
+ * Unbind a model from a language. Has no effect if the specified model is not currently
+ * bound to the language.
+ *
+ * @param languageID
+ * the language to unbind
+ * @param modelID
+ * the unique identifier of the model to unbind from the language
+ */
+ public void unbind(String languageID, String modelID) {
+ if (!modelBindings.remove(languageID, modelID)) {
+ Activator.log.warn(NLS.bind("Attempt to unbind model {0} from language {1} to which it is not bound", modelID, languageID));
+ }
+ }
+
+ //
+ // Nested types
+ //
+
+ private class MyRegistryReader extends RegistryReader {
+
+ private static final String E_MODEL_BINDING = "modelBinding"; //$NON-NLS-1$
+
+ private static final String A_LANGUAGE = "language"; //$NON-NLS-1$
+
+ private static final String A_MODEL = "model"; //$NON-NLS-1$
+
+
+ MyRegistryReader() {
+ super(Platform.getExtensionRegistry(), Activator.PLUGIN_ID, EXT_POINT);
+ }
+
+ @Override
+ protected boolean readElement(IConfigurationElement element, boolean add) {
+ return add ? handleAdd(element) : handleRemove(element);
+ }
+
+ private boolean handleAdd(IConfigurationElement element) {
+ boolean result = true;
+
+ if (E_MODEL_BINDING.equals(element.getName())) {
+ String languageID = element.getAttribute(A_LANGUAGE);
+ String modelID = element.getAttribute(A_MODEL);
+
+ if (Strings.isNullOrEmpty(languageID)) {
+ logMissingAttribute(element, A_LANGUAGE);
+ } else if (Strings.isNullOrEmpty(modelID)) {
+ logMissingAttribute(element, A_MODEL);
+ } else {
+ bind(languageID, modelID);
+ }
+ }
+
+ return result;
+ }
+
+ private boolean handleRemove(IConfigurationElement element) {
+ boolean result = true;
+
+ if (E_MODEL_BINDING.equals(element.getName())) {
+ String languageID = element.getAttribute(A_LANGUAGE);
+ String modelID = element.getAttribute(A_MODEL);
+
+ if (!Strings.isNullOrEmpty(languageID) && !Strings.isNullOrEmpty(modelID)) {
+ unbind(languageID, modelID);
+ }
+ }
+
+ return result;
+ }
+ }
+}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java
index 86ce58cfa22..57b9ecf391b 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguage.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
+ * Copyright (c) 2015, 2016 Christian W. Damus and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -13,6 +13,8 @@
package org.eclipse.papyrus.infra.core.language;
+import org.eclipse.papyrus.infra.core.internal.language.LanguageModelRegistry;
+import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
/**
@@ -53,6 +55,18 @@ public interface ILanguage {
String getName();
/**
+ * Obtains the model, if any, that provides the semantic model content described by this language.
+ *
+ * @param modelSet
+ * a model set in which the language is {@linkplain #install(ModelSet) installed}
+ *
+ * @return the language's model in the {code modelSet}, or {@code null} if there is no corresponding model
+ */
+ default IModel getModel(ModelSet modelSet) {
+ return LanguageModelRegistry.INSTANCE.getModel(this, modelSet);
+ }
+
+ /**
* Installs me on a model-set. This performs whatever registrations, listener attachments, etc. that may be necessary
* for the proper functioning of my language in the Papyrus context.
*
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java
index d59d3f87a46..7fa56614980 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/language/ILanguageService.java
@@ -13,11 +13,19 @@
package org.eclipse.papyrus.infra.core.language;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.List;
+import java.util.Objects;
import java.util.Set;
+import java.util.stream.Collectors;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.core.editor.ModelSetServiceFactory;
+import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.utils.ServiceUtils;
/**
* <p>
@@ -78,4 +86,32 @@ public interface ILanguageService extends IAdaptable, ILanguageChangeListener {
* a language provider to remove (may be {@code null}, which has no effect)
*/
void removeLanguageProvider(ILanguageProvider provider);
+
+ /**
+ * Obtains all of the {@link IModel}s that are the models for languages instantiated
+ * in a {@code modelSet}.
+ *
+ * @param modelSet
+ * a model-set
+ *
+ * @return its language models, which may be empty if the model-set is not in a
+ * service registry that has a language service
+ */
+ static Collection<IModel> getLanguageModels(ModelSet modelSet) {
+ List<IModel> result;
+
+ ILanguageService service = ServiceUtils.getInstance().getService(ILanguageService.class, ModelSetServiceFactory.getServiceRegistry(modelSet), null);
+ if (service == null) {
+ // No language service? No language models
+ result = Collections.emptyList();
+ } else {
+ result = service.getLanguages(modelSet.getURIWithoutExtension(), false).stream()
+ .map(l -> l.getModel(modelSet))
+ .filter(Objects::nonNull)
+ .distinct() // Only unique models
+ .collect(Collectors.toList());
+ }
+
+ return result;
+ }
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
index b93d8b805e3..a1742831f77 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractBaseModel.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,8 +10,7 @@
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - manage models by URI, not IFile (CDO)
* Christian W. Damus (CEA) - bug 437052
- * Christian W. Damus - bug 399859
- * Christian W. Damus - bug 481149
+ * Christian W. Damus - bugs 399859, 481149, 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
@@ -430,4 +429,32 @@ public abstract class AbstractBaseModel extends AbstractModel implements IVersio
return false;
}
+ @Override
+ public Iterable<? extends EObject> getRootElements() {
+ Iterable<? extends EObject> result;
+
+ Resource resource = getResource();
+ if (resource == null) {
+ result = Collections.emptyList();
+ } else {
+ result = () -> resource.getContents().stream()
+ .filter(this::isRootElement)
+ .iterator();
+ }
+
+ return result;
+ }
+
+ /**
+ * By default, an object is a root of the model if it does not
+ * have a {@linkplain EObject#eContainer() container}.
+ *
+ * @param object
+ * an object in a resource
+ * @return whether it is a root element
+ */
+ protected boolean isRootElement(EObject object) {
+ return object.eContainer() == null;
+ }
+
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResource.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResource.java
index 9ef1316e8a2..ff8fc7986a3 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResource.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/AbstractModelWithSharedResource.java
@@ -1,6 +1,16 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
- */
+ * Contributors:
+ * LIFL - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
import java.io.IOException;
@@ -193,6 +203,11 @@ public abstract class AbstractModelWithSharedResource<T extends EObject> extends
return roots;
}
+ @Override
+ public Iterable<? extends EObject> getRootElements() {
+ return getModelRoots();
+ }
+
/**
* @see org.eclipse.papyrus.infra.core.resource.EMFLogicalModel#isModelFor(java.lang.Object)
*
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
index d117999cebb..39c41452ec7 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/EMFLogicalModel.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013, 2014 CEA LIST, Christian W. Damus, and others.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,10 +9,9 @@
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
* Christian W. Damus (CEA) - bug 437052
- * Christian W. Damus - bug 399859
+ * Christian W. Damus - bugs 399859, 485220
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 436952
*
- *
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
@@ -171,4 +170,11 @@ public abstract class EMFLogicalModel extends AbstractBaseModel implements IEMFM
}
+ @Override
+ public Iterable<? extends EObject> getRootElements() {
+ return () -> getResources().stream()
+ .flatMap(r -> r.getContents().stream())
+ .filter(this::isRootElement)
+ .iterator();
+ }
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java
index 964556fda7e..542c8bd2143 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IEMFModel.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,9 +8,12 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
/**
@@ -29,6 +32,15 @@ public interface IEMFModel extends IModel {
public Resource getResource();
/**
+ * Obtains the top-level model elements in the main resource associated with this model.
+ *
+ * @return the model roots, or an empty iterable if either there definitively are none
+ * or they cannot be determined (for example, because the main resource is a controlled
+ * unit and the parent unit is not available)
+ */
+ public Iterable<? extends EObject> getRootElements();
+
+ /**
* Called when a resource is loaded. Implement this method to configure
* the resource or load related resources
*
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IModel.java
index 837eca7ede3..c922fa611d2 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/IModel.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2010, 2015 CEA LIST, Christian W. Damus, and others.
- *
+ * Copyright (c) 2010, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -11,8 +10,7 @@
* CEA LIST - Initial API and implementation
* Christian W. Damus (CEA) - manage models by URI, not IFile (CDO)
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.net - Bug 436952
- * Christian W. Damus - bug 481149
- *
+ * Christian W. Damus - bugs 481149, 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource;
@@ -21,8 +19,11 @@ import java.io.IOException;
import java.util.List;
import java.util.Set;
+import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.IPath;
+import org.eclipse.core.runtime.Platform;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.papyrus.infra.tools.util.TypeUtils;
/**
* A Model is a set of elements defined by a metamodel (preferably an EMF
@@ -35,7 +36,7 @@ import org.eclipse.emf.common.util.URI;
* @author cedric dumoulin
*
*/
-public interface IModel {
+public interface IModel extends IAdaptable {
/**
* Initialize the model and set its associated model manager.
@@ -207,4 +208,10 @@ public interface IModel {
* the to delete on save
*/
public void cleanModel(Set<URI> resourcesToDelete);
+
+ @Override
+ default <T> T getAdapter(Class<T> adapter) {
+ // We really need to get any available adapter
+ return TypeUtils.as(Platform.getAdapterManager().loadAdapter(this, adapter.getName()), adapter);
+ }
}
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
index 08b531676b3..94a90564047 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/resource/sasheditor/SashModel.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2009, 2015 CEA LIST, Christian W. Damus, and others.
+ * Copyright (c) 2009, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,10 +9,8 @@
* Contributors:
* Cedric Dumoulin (LIFL) cedric.dumoulin@lifl.fr - Initial API and implementation
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Rewrite the sash model - store in the plugin's PreferenceStore (Bug 429239)
- * Christian W. Damus (CEA) - bug 429242
- * Christian W. Damus (CEA) - bug 436468
- * Christian W. Damus - bug 434983
- * Christian W. Damus - bug 469188
+ * Christian W. Damus (CEA) - bugs 429242, 436468
+ * Christian W. Damus - bugs 434983, 469188, 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.resource.sasheditor;
@@ -26,6 +24,7 @@ import org.eclipse.emf.common.notify.Adapter;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.notify.impl.AdapterImpl;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.emf.ecore.xmi.XMIResource;
@@ -34,6 +33,7 @@ import org.eclipse.papyrus.infra.core.Activator;
import org.eclipse.papyrus.infra.core.resource.EMFLogicalModel;
import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.sashwindows.di.SashWindowsMngr;
import org.eclipse.papyrus.infra.core.sashwindows.di.util.DiUtils;
import com.google.common.base.Objects;
@@ -346,6 +346,11 @@ public class SashModel extends EMFLogicalModel implements IModel {
return (modelURI == null) ? null : modelURI.appendFileExtension(DiModel.MODEL_FILE_EXTENSION);
}
+ @Override
+ protected boolean isRootElement(EObject object) {
+ return super.isRootElement(object) && (object instanceof SashWindowsMngr);
+ }
+
//
// Bean API
//
diff --git a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/DiResourceSet.java b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/DiResourceSet.java
index e3d0b46336c..eaf5335d14f 100644
--- a/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/DiResourceSet.java
+++ b/plugins/infra/core/org.eclipse.papyrus.infra.core/src/org/eclipse/papyrus/infra/core/utils/DiResourceSet.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2008 CEA LIST.
- *
+ * Copyright (c) 2008, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.core.utils;
@@ -40,284 +40,4 @@ public class DiResourceSet extends ModelSet {
reader.readModel(this);
}
- /**
- * Just loads the model into the current resource set.
- *
- * @returns The loaded model or null if the model is not loaded.
- * @deprecated load requested model and get its resource. See implementation
- * for example.
- */
- // @Deprecated
- // public Resource loadModelResource(IFile file) {
- //
- // UmlModel model = null;
- // try {
- // model = (UmlModel)loadModel(UmlModel.MODEL_ID, file);
- // } catch (ModelException e) {
- // return null;
- // }
- // return model.getResource();
- // }
-
- /**
- * Returns the extension of the model. Seem to be unused.
- *
- * @deprecated Use {@link UmlModel#UML_FILE_EXTENSION}
- */
- // @Deprecated
- // public String getModelFileExtension() {
- // throw new UnsupportedOperationException("deprecated method.");
- // // if(modelFileExtension == null) {
- // // modelFileExtension = modelResource.getURI().fileExtension();
- // // }
- // // return modelFileExtension;
- // }
-
- /**
- * Load both files (DI and UML) from an handle on one of the two files.
- *
- * @param file
- * The file to load (no matter the extension)Model
- * @deprecated use {@link ModelSet#loadModels(IFile)} instead.
- */
- // @Deprecated
- // public void loadResources(IFile file) {
- // try {
- // loadModels(file);
- // } catch (ModelMultiException e) {
- // e.printStackTrace();
- // }
- //
- // // // Extract file name, without extension
- // // IPath fullPath = file.getFullPath().removeFileExtension();
- // //
- // // // load DI2
- // // URI diUri =
- // // getPlatformURI(fullPath.addFileExtension(DI_FILE_EXTENSION));
- // // diResource = getResource(diUri, true);
- // //
- // // // load notation
- // // URI notationURI =
- // // getPlatformURI(fullPath.addFileExtension(NOTATION_FILE_EXTENSION));
- // // notationResource = getResource(notationURI, true);
- // //
- // // if(notationResource != null) {
- // // // look for a model associated with a diagram in notation
- // // for(EObject eObject : notationResource.getContents()) {
- // // if(eObject instanceof Diagram) {
- // // Diagram diagram = (Diagram)eObject;
- // // if(diagram.getElement() != null) {
- // // modelResource = diagram.getElement().eResource();
- // // break;
- // // }
- // // }
- // // }
- // // }
- // //
- // //
- // // // if modelResource is still null, we look for a file with the same
- // // name and a supported extension
- // // if(modelResource == null) {
- // // IContainer folder = file.getParent();
- // // try {
- // // IResource[] files = folder.members();
- // // for(IResource r : files) {
- // // String extension = r.getFullPath().getFileExtension();
- // // if(r.getFullPath().removeFileExtension().lastSegment().equals(fullPath.lastSegment())
- // // && !DI_FILE_EXTENSION.equalsIgnoreCase(extension) &&
- // // !NOTATION_FILE_EXTENSION.equalsIgnoreCase(extension)) {
- // // if(Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap().get(extension)
- // // != null) {
- // // modelResource = getResource(getPlatformURI(r.getFullPath()), true);
- // // break;
- // // }
- // // }
- // // }
- // // } catch (CoreException e) {
- // // // never happens.
- // // }
- // // }
- // //
- // // modelFileExtension = modelResource.getURI().fileExtension();
- // //
- // // // TODO move next line away from DiResourceSet ? Define a place
- // // // where Resource initialization can take place.
- // // // move this line to centralize all the adapters
- // // modelResource.eAdapters().add(new ModelListenerManager());
- // }
-
- /**
- * Create both files (DI and UML) from a filename.
- *
- * @param newFile
- * The file from which path is extracted to create the new files
- *
- * @deprecated Use {@link ModelSet#createsModels(IFile)} instead.
- */
- // @Deprecated
- // public void createModelResources(IFile newFile, String eContentType, String modelExtension) {
- //
- // // Check if parameters are those expected.
- // // If not, throws an exception to inform the programmer.
- // if(!("org.eclipse.uml2.uml".equals(eContentType) && "uml".equals(modelExtension))) {
- // throw new UnsupportedOperationException("");
- // }
- // // Create models
- // createsModels(newFile);
- //
- // // // create the di resource URI
- // // URI diUri = getPlatformURI(newFile.getFullPath());
- // // // Create the di Resource for the sashcontainer
- // // // The model will be automatically initialized by the SashContainer
- // // if needed (if it is empty).
- // // // Normally the resource should contains models set by previous use
- // // from the SashContainer
- // // diResource = createResource(diUri);
- // //
- // // IPath filenameWithoutExtension =
- // // newFile.getFullPath().removeFileExtension();
- // // // if the model is not loaded, create resource
- // // if(modelResource == null) {
- // // // create the model URI
- // // URI modelUri =
- // // getPlatformURI(filenameWithoutExtension.addFileExtension(modelExtension));
- // // // create the model resource
- // // modelResource = createResource(modelUri, eContentType);
- // // this.modelFileExtension = modelExtension;
- // // }
- // // // create the notation URI
- // // URI notationURI =
- // // getPlatformURI(filenameWithoutExtension.addFileExtension(NOTATION_FILE_EXTENSION));
- // // // create the notation resource
- // // notationResource = createResource(notationURI);
- //
- // }
-
- /**
- * Get a platform resource URI of the given path
- *
- * @param path
- * the path
- * @return the uri
- */
- // private URI getPlatformURI(IPath path) {
- // return URI.createPlatformResourceURI(path.toString(), true);
- // }
-
- /**
- * Returns the notation resource.
- *
- * @return the notationResource
- * @deprecated Use NotationUtils.getNotationModel(this).getResource();
- * instead.
- */
- // public Resource getNotationResource() {
- // return NotationUtils.getNotationModel(this).getResource();
- // }
-
- /**
- *
- *
- * @return the diResource
- * @deprecated Use NotationUtils.getSashModel(this).getResource(); instead.
- */
- // @Deprecated
- // public Resource getDiResource() {
- // return SashModelUtils.getSashModel(this).getResource();
- // }
-
- /**
- * Retrieve the di resource associated with a given model element.
- *
- * @param modelElement
- * @return the di resource or null
- * @deprecated a model should be modified/created to correctly handle
- * controlled resources
- */
- // @Deprecated
- // public Resource getAssociatedDiResource(EObject modelElement) {
- // // return the "base" di since we want the opened tabs in a unique di
- // return getDiResource();
- // }
-
- /**
- * Retrieve the notation resource associated with a given model element.
- *
- * @param modelElement
- * @return the notation resource or null
- * @deprecated a model should be modified/created to correctly handle
- * controlled resources
- */
- // @Deprecated
- // public Resource getAssociatedNotationResource(EObject modelElement) {
- // if(modelElement != null) {
- // Resource modelResource = modelElement.eResource();
- // if(modelResource != null && !modelResource.equals(getModelResource())) {
- // // handle controlled resource
- // return getAssociatedResource(modelResource, NotationModel.NOTATION_FILE_EXTENSION);
- // }
- // }
- // return getNotationResource();
- // }
-
- /**
- * Retrieve the model resource associated with a given model element. Please
- * refers to {@link ResourceSet#getResource(URI, boolean)} for the meaning
- * of loadOnDemand.
- *
- * @param modelElement
- * @return the model resource or null
- * @deprecated a model should be modified/created to correctly handle
- * controlled resources
- */
- // @Deprecated
- // public Resource getAssociatedModelResource(EObject modelElement) {
- // if(modelElement != null && modelElement.eResource() != null) {
- // return modelElement.eResource();
- // }
- // return getModelResource();
- // }
-
- /**
- * Returns the model resource.
- *
- * @return the modelResource
- * @deprecated Use NotationUtils.getUmlModel(this).getResource(); instead.
- */
- // @Deprecated
- // public Resource getModelResource() {
- // return UmlUtils.getUmlModel(this).getResource();
- // }
-
- /**
- * Returns the additional resources.
- *
- * @return The additional resources.
- */
- // public List<Resource> getAdditionalResources() {
- // List<Resource> additionnalResources = new ArrayList<Resource>();
- // for(Resource resource : getResources()) {
- // // ignore di, notation and domain resources
- //
- // if(resource != getDiResource() && resource != getNotationResource() && resource != getModelResource()) {
- // additionnalResources.add(resource);
- // }
- // }
- //
- // return additionnalResources;
- // }
-
- /**
- * Returns the related di file.
- *
- * @param file
- * A file (di, model or notation).
- * @return The associated DI file.
- * @deprecated use {@link DiModelUtils#getRelatedDiFile(IFile)}
- */
- // @Deprecated
- // public static IFile getRelatedDiFile(IFile file) {
- // return DiModelUtils.getRelatedDiFile(file);
- // }
-
}
diff --git a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml
index 05435f04a85..8df2cd1a052 100644
--- a/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml
+++ b/plugins/infra/emf/org.eclipse.papyrus.infra.ui.emf/plugin.xml
@@ -64,7 +64,7 @@
style="push"
tooltip="Enable write">
<visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
+ <reference definitionId="org.eclipse.papyrus.ui.semanticModelActive"/>
</visibleWhen>
</command>
</menuContribution>
@@ -77,7 +77,7 @@
style="push"
tooltip="Enable write">
<visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
+ <reference definitionId="org.eclipse.papyrus.ui.semanticModelActive"/>
</visibleWhen>
</command>
</menuContribution>
@@ -90,7 +90,7 @@
style="push"
tooltip="Enable write">
<visibleWhen>
- <reference definitionId="org.eclipse.papyrus.uml.diagram.common.IsPapyrusActiveWithUMLModel"/>
+ <reference definitionId="org.eclipse.papyrus.ui.semanticModelActive"/>
</visibleWhen>
</command>
</toolbar>
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
index f922566be87..1e1841b2197 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.common/src/org/eclipse/papyrus/infra/gmfdiag/common/model/NotationModel.java
@@ -1,6 +1,16 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
- */
+ * Contributors:
+ * LIFL - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.gmfdiag.common.model;
import java.util.Collections;
@@ -17,6 +27,7 @@ import org.eclipse.papyrus.infra.core.resource.EMFLogicalModel;
import org.eclipse.papyrus.infra.core.resource.IEMFModel;
import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
+import org.eclipse.papyrus.infra.viewpoints.policy.ViewPrototype;
/**
* @author cedric dumoulin
@@ -166,4 +177,13 @@ public class NotationModel extends EMFLogicalModel implements IModel {
// not found
throw new NotFoundException(NLS.bind("No Diagram named '{0}' can be found in Model.",diagramName)); //$NON-NLS-1$
}
+
+ /**
+ * An object is additionally a root element only if it has a corresponding
+ * viewpoint prototope.
+ */
+ @Override
+ protected boolean isRootElement(EObject object) {
+ return super.isRootElement(object) && ViewPrototype.isViewObject(object);
+ }
}
diff --git a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/META-INF/MANIFEST.MF b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/META-INF/MANIFEST.MF
index e556885ead6..2275e528a4f 100644
--- a/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/META-INF/MANIFEST.MF
+++ b/plugins/infra/gmfdiag/org.eclipse.papyrus.infra.gmfdiag.gef/META-INF/MANIFEST.MF
@@ -8,7 +8,8 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core.sasheditor;bundle-version="1.2.0",
- org.eclipse.emf.edit;bundle-version="2.12.0"
+ org.eclipse.emf.edit;bundle-version="2.12.0",
+ org.eclipse.ui.views.properties.tabbed;bundle-version="3.7.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/AbstractSynchronizedOnEStructuralFeatureAxisManager.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/AbstractSynchronizedOnEStructuralFeatureAxisManager.java
index 647793abf0b..9a0489833cc 100755
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/AbstractSynchronizedOnEStructuralFeatureAxisManager.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.emf.nattable/src/org/eclipse/papyrus/infra/emf/nattable/manager/axis/AbstractSynchronizedOnEStructuralFeatureAxisManager.java
@@ -121,7 +121,7 @@ public abstract class AbstractSynchronizedOnEStructuralFeatureAxisManager extend
/**
*
* @return
- * the list of the objects which are referenced by the listen features
+ * the list of the objects which are referenced by the listen features
*/
@SuppressWarnings("unchecked")
protected List<Object> getFeaturesValue() {
@@ -168,7 +168,7 @@ public abstract class AbstractSynchronizedOnEStructuralFeatureAxisManager extend
* @param objects
* the list of objects
* @return
- * the sorted list of objects
+ * the sorted list of objects
*/
protected List<Object> organizeContents(final List<Object> objects) {
return objects;
@@ -205,7 +205,7 @@ public abstract class AbstractSynchronizedOnEStructuralFeatureAxisManager extend
/**
*
* @return
- * the features to listen according to the current table configuration or <code>null</code> if it is not definedS
+ * the features to listen according to the current table configuration or <code>null</code> if it is not definedS
*/
protected Collection<EStructuralFeature> getListenFeatures() {
if (this.listenFeatures == null) {
@@ -225,7 +225,7 @@ public abstract class AbstractSynchronizedOnEStructuralFeatureAxisManager extend
/**
*
* @return
- * the filling configuration used by the table or <code>null</code> if any is defined
+ * the filling configuration used by the table or <code>null</code> if any is defined
*/
protected Collection<EStructuralFeatureValueFillingConfiguration> getFillingConfigurations() {// FIXME : local configuration not yet managed
final Collection<EStructuralFeatureValueFillingConfiguration> configs = new ArrayList<EStructuralFeatureValueFillingConfiguration>();
@@ -402,12 +402,6 @@ public abstract class AbstractSynchronizedOnEStructuralFeatureAxisManager extend
}
}
- /**
- *
- * @see org.eclipse.papyrus.uml.nattable.manager.axis.AbstractUMLSynchronizedOnFeatureAxisManager#getAllManagedAxis()
- *
- * @return
- */
@Override
public List<Object> getAllManagedAxis() {
return new ArrayList<Object>(this.managedObject);
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml
index 675a3763d23..80faf87c36f 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.common/plugin.xml
@@ -29,7 +29,7 @@
</menu>
</menuContribution>
- <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?endof=org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ <menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar?endof=org.eclipse.papyrus.ui.toolbar">
<toolbar id="org.eclipse.papyrus.infra.nattable.toolbar.createnattable" label="New Table Toolbar (New Version)">
</toolbar>
</menuContribution>
@@ -129,19 +129,16 @@
</activeWhen>
</handler>
</extension>
- <!-- ElementType bindings for diagram duplication with paste command -->
+ <!-- ElementType bindings for table duplication with paste command -->
<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
- <!--metamodel
- nsURI="http://www.eclipse.org/uml2/5.0.0/UML"-->
<metamodel
- nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ nsURI="http://www.eclipse.org/emf/2002/Ecore">
<adviceBinding
class="org.eclipse.papyrus.infra.nattable.common.helper.advice.NatTableDuplicateEditHelperAdvice"
id="org.eclipse.papyrus.infra.nattable.common.helper.advice.NatTableDuplicateEditHelperAdvice"
inheritance="all"
- typeId="org.eclipse.papyrus.uml.Element">
- <!--typeId="org.eclipse.papyrus.uml.Element"-->
+ typeId="*">
</adviceBinding>
</metamodel>
</extension>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF
index c63d8d0574c..e1c725b2ff4 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.controlmode/META-INF/MANIFEST.MF
@@ -9,7 +9,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
org.eclipse.gmf.runtime.emf.commands.core,
org.eclipse.papyrus.infra.nattable.model;bundle-version="1.2.0",
- org.eclipse.uml2.uml,
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
com.google.guava;bundle-version="11.0.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
index 9c049b82753..afe7fda25dd 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.modelexplorer/META-INF/MANIFEST.MF
@@ -11,23 +11,15 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Require-Bundle: org.eclipse.ui,
org.eclipse.core.runtime,
org.eclipse.papyrus.views.modelexplorer;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.notation,
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
org.eclipse.papyrus.infra.nattable.model;bundle-version="1.2.0",
- org.eclipse.gmf.runtime.common.core,
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
org.eclipse.gmf.runtime.emf.type.core,
org.eclipse.core.expressions,
org.eclipse.papyrus.infra.viewpoints.policy;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.query.java.core;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.efacet;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.efacet.metamodel;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.metamodel;bundle-version="1.2.0",
- org.eclipse.papyrus.emf.facet.util.emf.ui;bundle-version="1.2.0",
org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
@@ -38,4 +30,3 @@ Bundle-Activator: org.eclipse.papyrus.infra.nattable.modelexplorer.Activator
Bundle-ManifestVersion: 2
Bundle-Description: %pluginDescription
Bundle-SymbolicName: org.eclipse.papyrus.infra.nattable.modelexplorer;singleton:=true
-Import-Package: org.eclipse.papyrus.uml.diagram.menu.actions
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.classpath b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.classpath
index 8a8f1668cdc..eca7bdba8f0 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.classpath
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.settings/org.eclipse.jdt.core.prefs
index 94d61f00da6..b3aa6d60f94 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF
index 1f2cb5cd925..95266ff4127 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/META-INF/MANIFEST.MF
@@ -23,7 +23,6 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
@@ -34,4 +33,4 @@ Bundle-Name: %Bundle-Name
Bundle-Activator: org.eclipse.papyrus.infra.nattable.views.config.Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.nattable.views.config;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/Messages.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/Messages.java
index 22fed7d91a3..3bad559b5a9 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/Messages.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/Messages.java
@@ -1,3 +1,16 @@
+/*****************************************************************************
+ * Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.nattable.views.config.messages;
import org.eclipse.osgi.util.NLS;
@@ -9,6 +22,9 @@ public class Messages extends NLS {
public static String TableViewCreationTester_TheTableViewCanBeCreated;
public static String TableViewCreationTester_TheTableViewCantBeCreated;
+
+ public static String TableViewCreationTester_ServicesUnavailable;
+
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/messages.properties b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/messages.properties
index d2e3e095d46..9ba9e62e2c1 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/messages.properties
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/messages/messages.properties
@@ -1,2 +1,15 @@
+#
+# Copyright (c) 2013, 2016 CEA LIST, Christian W. Damus, and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# CEA LIST - Initial API and implementation
+# Christian W. Damus - bug 485220
+#
TableViewCreationTester_TheTableViewCanBeCreated=The table of view can be created
TableViewCreationTester_TheTableViewCantBeCreated=The table of view can't be created, the context is not an element of the model
+TableViewCreationTester_ServicesUnavailable=The table of view can't be created because the language service is unavailable
diff --git a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/TableViewCreationTester.java b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/TableViewCreationTester.java
index ca821e659a1..5cb742e03c3 100644
--- a/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/TableViewCreationTester.java
+++ b/plugins/infra/nattable/org.eclipse.papyrus.infra.nattable.views.config/src/org/eclipse/papyrus/infra/nattable/views/config/utils/TableViewCreationTester.java
@@ -16,10 +16,14 @@ package org.eclipse.papyrus.infra.nattable.views.config.utils;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.language.ILanguageService;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
+import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.papyrus.infra.nattable.tester.ITableTester;
import org.eclipse.papyrus.infra.nattable.views.config.Activator;
import org.eclipse.papyrus.infra.nattable.views.config.messages.Messages;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
public class TableViewCreationTester implements ITableTester {
@@ -29,8 +33,19 @@ public class TableViewCreationTester implements ITableTester {
public IStatus isAllowed(Object context) {
if (context instanceof EObject) {
final EObject current = (EObject) context;
- if (current.eResource() != null && current.eResource().getURI().fileExtension().equals(UmlModel.UML_FILE_EXTENSION)) {
- return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.TableViewCreationTester_TheTableViewCanBeCreated);
+
+ try {
+ ModelSet modelSet = ServiceUtilsForEObject.getInstance().getModelSet(current);
+ IModel model = modelSet.getModelFor(current);
+ if (model != null) {
+ // This is an element of some model. Is it a semantic model?
+ if (ILanguageService.getLanguageModels(modelSet).contains(model)) {
+ return new Status(IStatus.OK, Activator.PLUGIN_ID, Messages.TableViewCreationTester_TheTableViewCanBeCreated);
+ }
+ }
+ } catch (ServiceException e) {
+ // Okay, no services? Then this isn't an appropriate context
+ return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TableViewCreationTester_ServicesUnavailable);
}
}
return new Status(IStatus.ERROR, Activator.PLUGIN_ID, Messages.TableViewCreationTester_TheTableViewCantBeCreated);
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF
index 44c9ce46e09..d0dd6d2a7e0 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/META-INF/MANIFEST.MF
@@ -5,8 +5,7 @@ Require-Bundle: org.eclipse.core.runtime,
org.eclipse.emf.ecore.xmi;visibility:=reexport,
org.eclipse.emf.edit.ui;visibility:=reexport,
org.eclipse.ui.ide;visibility:=reexport,
- org.eclipse.emf.ecore.edit;visibility:=reexport,
- org.eclipse.uml2.uml.edit;visibility:=reexport
+ org.eclipse.emf.ecore.edit;visibility:=reexport
Export-Package: org.eclipse.papyrus.infra.extendedtypes.presentation
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java
index 864ce130106..8ab30ef8241 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.editor/src/org/eclipse/papyrus/infra/extendedtypes/presentation/CustomExtendedtypesEditor.java
@@ -31,7 +31,6 @@ import org.eclipse.papyrus.infra.extendedtypes.invariantsemantictypeconfiguratio
import org.eclipse.papyrus.infra.extendedtypes.provider.CustomExtendedtypesItemProviderAdapterFactory;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.views.properties.PropertySheetPage;
-import org.eclipse.uml2.uml.edit.providers.UMLItemProviderAdapterFactory;
/**
* Custom editor to support metamodel extensions
@@ -52,7 +51,6 @@ public class CustomExtendedtypesEditor extends ExtendedtypesEditor {
adapterFactory.addAdapterFactory(new CustomInvariantSemanticTypeConfigurationItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new InvariantContainerConfigurationAdapterFactory());
adapterFactory.addAdapterFactory(new EcoreItemProviderAdapterFactory());
- adapterFactory.addAdapterFactory(new UMLItemProviderAdapterFactory());
adapterFactory.addAdapterFactory(new ReflectiveItemProviderAdapterFactory());
// Create the command stack that will notify this editor as commands are
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.ui/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.ui/META-INF/MANIFEST.MF
index 4e7d229ccec..5d222027660 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes.ui/META-INF/MANIFEST.MF
@@ -1,7 +1,6 @@
Manifest-Version: 1.0
Require-Bundle: org.eclipse.core.runtime;bundle-version="3.7.0",
org.eclipse.papyrus.infra.extendedtypes;bundle-version="1.2.0",
- org.eclipse.uml2.uml.edit,
org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.gmf.runtime.common.ui.services;bundle-version="1.3.0",
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
diff --git a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
index 43bc21c42d9..ab8ef8d6d4c 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
+++ b/plugins/infra/org.eclipse.papyrus.infra.extendedtypes/plugin.xml
@@ -104,12 +104,12 @@
<extension
point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
<metamodel
- nsURI="http://www.eclipse.org/uml2/5.0.0/UML">
+ nsURI="http://www.eclipse.org/emf/2002/Ecore">
<adviceBinding
class="org.eclipse.papyrus.infra.extendedtypes.advices.ExtendedTypesOwnerAdvice"
- id="org.eclipse.papyrus.uml.advice.ExtendedTypesOwnerAdvice"
+ id="org.eclipse.papyrus.infra.extendedtypes.advice.OwnerAdvice"
inheritance="all"
- typeId="org.eclipse.papyrus.uml.Element">
+ typeId="*">
</adviceBinding>
</metamodel>
</extension>
@@ -121,7 +121,7 @@
pattern="org\.eclipse\.papyrus\.uml\.([^d]|$|d([^i]|$)|di([^a]|$)|dia([^g]|$)|diag([^r]|$)|diagr([^a]|$)|diagra([^m]|$))">
</elementType>
<advice
- ref="org.eclipse.papyrus.uml.advice.ExtendedTypesOwnerAdvice">
+ ref="org.eclipse.papyrus.infra.extendedtypes.advice.OwnerAdvice">
</advice>
</binding>
</extension>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowDown_16x16.gif b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowDown_16x16.gif
new file mode 100644
index 00000000000..072b1844572
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowDown_16x16.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowLeft_16x16.gif b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowLeft_16x16.gif
new file mode 100644
index 00000000000..4fb41501036
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowLeft_16x16.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowRight_16x16.gif b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowRight_16x16.gif
new file mode 100644
index 00000000000..19567890aa8
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowRight_16x16.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowUp_16x16.gif b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowUp_16x16.gif
new file mode 100644
index 00000000000..07164754e5c
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/ArrowUp_16x16.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/insp_sbook.gif b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/insp_sbook.gif
new file mode 100644
index 00000000000..e936fbabfec
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/icons/insp_sbook.gif
Binary files differ
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/Activator.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/Activator.java
index 0417fd36ad8..b0cf956f27f 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/Activator.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/Activator.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
- *
+ * Copyright (c) 2011, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,11 +8,14 @@
*
* Contributors:
* Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.hyperlink;
+import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.papyrus.infra.core.log.LogHelper;
+import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
@@ -25,6 +27,16 @@ public class Activator extends AbstractUIPlugin {
// The plug-in ID
public static final String PLUGIN_ID = "org.eclipse.papyrus.infra.hyperlink"; //$NON-NLS-1$
+ public static final String IMG_LOUPE = "loupe"; //$NON-NLS-1$
+
+ public static final String IMG_ARROW_UP = "arrowUp"; //$NON-NLS-1$
+
+ public static final String IMG_ARROW_DOWN = "arrowDown"; //$NON-NLS-1$
+
+ public static final String IMG_ARROW_LEFT = "arrowLeft"; //$NON-NLS-1$
+
+ public static final String IMG_ARROW_RIGHT = "arrowRight"; //$NON-NLS-1$
+
// The shared instance
private static Activator plugin;
@@ -37,11 +49,6 @@ public class Activator extends AbstractUIPlugin {
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);
@@ -49,11 +56,6 @@ public class Activator extends AbstractUIPlugin {
log = new LogHelper(this);
}
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
@Override
public void stop(BundleContext context) throws Exception {
plugin = null;
@@ -69,5 +71,18 @@ public class Activator extends AbstractUIPlugin {
return plugin;
}
+ @Override
+ protected void initializeImageRegistry(ImageRegistry reg) {
+ super.initializeImageRegistry(reg);
+ reg.put(IMG_LOUPE, imageDescriptorFromPlugin(PLUGIN_ID, "icons/insp_sbook.gif")); //$NON-NLS-1$
+ reg.put(IMG_ARROW_UP, imageDescriptorFromPlugin(PLUGIN_ID, "icons/ArrowUp_16x16.gif")); //$NON-NLS-1$
+ reg.put(IMG_ARROW_DOWN, imageDescriptorFromPlugin(PLUGIN_ID, "icons/ArrowDown_16x16.gif")); //$NON-NLS-1$
+ reg.put(IMG_ARROW_LEFT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/ArrowLeft_16x16.gif")); //$NON-NLS-1$
+ reg.put(IMG_ARROW_RIGHT, imageDescriptorFromPlugin(PLUGIN_ID, "icons/ArrowRight_16x16.gif")); //$NON-NLS-1$
+ }
+
+ public Image getIcon(String key) {
+ return getImageRegistry().get(key);
+ }
}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java
index 641e8475a51..aa302885f28 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkEditor.java
@@ -27,11 +27,6 @@ import org.eclipse.papyrus.infra.ui.editorsfactory.IPageIconsRegistry;
public class HyperLinkEditor extends HyperLinkObject {
- /**
- *
- * @see org.eclipse.papyrus.uml.diagram.common.ui.hyperlinkshell.HyperlinkObject#executeSelectPressed()
- *
- */
@Override
public void openLink() {
EObject context = EMFHelper.getEObject(getObject());
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkWeb.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkWeb.java
index 866dc1684d8..40fd9fa284c 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkWeb.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/object/HyperLinkWeb.java
@@ -38,11 +38,6 @@ public class HyperLinkWeb extends HyperLinkObject {
super.setObject(object);
}
- /**
- *
- * @see org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject#executeSelectPressed()
- *
- */
@Override
public void openLink() {
try {
@@ -54,11 +49,6 @@ public class HyperLinkWeb extends HyperLinkObject {
}
- /**
- *
- * @see org.eclipse.papyrus.infra.hyperlink.object.HyperLinkObject#executeEditMousePressed(java.util.List, org.eclipse.uml2.uml.Package)
- *
- */
@Override
public void executeEditMousePressed(List<HyperLinkObject> list, EObject amodel) {
EditorHyperLinkWebShell editor = new EditorHyperLinkWebShell();
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/AbstractEditHyperlinkDocumentShell.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/AbstractEditHyperlinkDocumentShell.java
index 5cbb8092703..59780d14db9 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/AbstractEditHyperlinkDocumentShell.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/AbstractEditHyperlinkDocumentShell.java
@@ -13,6 +13,7 @@
*****************************************************************************/
package org.eclipse.papyrus.infra.hyperlink.ui;
+import org.eclipse.papyrus.infra.hyperlink.Activator;
import org.eclipse.papyrus.infra.hyperlink.messages.Messages;
import org.eclipse.swt.SWT;
import org.eclipse.swt.custom.CLabel;
@@ -24,7 +25,6 @@ import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.PlatformUI;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
// TODO: Auto-generated Javadoc
/**
@@ -112,9 +112,7 @@ public class AbstractEditHyperlinkDocumentShell {
ObjectLabeltext.setEditable(true);
ObjectLabeltext.setLayoutData(gridData1);
chooseDiagramButton = new Button(getEditHyperlinkShell(), SWT.NONE);
- // chooseDiagramButton.setImage(new Image(Display.getCurrent(),
- // "C:/Tessier/PROTOTYPE/papyrusII/DEVELOPMENT/GalileoM6/org.eclipse.papyrus.uml.diagram.common/icons/obj16/insp_sbook.gif"));
- chooseDiagramButton.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.uml.diagram.common", "/icons/obj16/insp_sbook.gif").createImage()); //$NON-NLS-1$ //$NON-NLS-2$
+ chooseDiagramButton.setImage(Activator.getDefault().getIcon(Activator.IMG_LOUPE));
chooseDiagramButton.setLayoutData(gridData51);
chooseDiagramButton.setText(""); //$NON-NLS-1$
tooltipInputLabel = new CLabel(editHyperlinkShell, SWT.NONE);
diff --git a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/DefaultHyperLinkTab.java b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/DefaultHyperLinkTab.java
index 8e37df66a6d..3fde695630a 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/DefaultHyperLinkTab.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.hyperlink/src/org/eclipse/papyrus/infra/hyperlink/ui/DefaultHyperLinkTab.java
@@ -42,7 +42,6 @@ import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Table;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
* this is the tab in charge to display the hyperlink for the property defaut
@@ -271,10 +270,10 @@ public class DefaultHyperLinkTab extends AbstractHyperLinkTab {
// associate image to buttons
- defaultHdown.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.uml.diagram.common", "/icons/obj16/ArrowDown_16x16.gif").createImage()); //$NON-NLS-1$ //$NON-NLS-2$
- defaultHup.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.uml.diagram.common", "/icons/obj16/ArrowUp_16x16.gif").createImage()); //$NON-NLS-1$ //$NON-NLS-2$
- defaultHleft.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.uml.diagram.common", "/icons/obj16/ArrowLeft_16x16.gif").createImage()); //$NON-NLS-1$ //$NON-NLS-2$
- defaultHRight.setImage(AbstractUIPlugin.imageDescriptorFromPlugin("org.eclipse.papyrus.uml.diagram.common", "/icons/obj16/ArrowRight_16x16.gif").createImage()); //$NON-NLS-1$ //$NON-NLS-2$
+ defaultHdown.setImage(Activator.getDefault().getIcon(Activator.IMG_ARROW_DOWN));
+ defaultHup.setImage(Activator.getDefault().getIcon(Activator.IMG_ARROW_UP));
+ defaultHleft.setImage(Activator.getDefault().getIcon(Activator.IMG_ARROW_LEFT));
+ defaultHRight.setImage(Activator.getDefault().getIcon(Activator.IMG_ARROW_RIGHT));
EObject contextElement = EMFHelper.getEObject(element);
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/.classpath b/plugins/infra/org.eclipse.papyrus.infra.newchild/.classpath
index ea6aae6dedb..50aae142c50 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/.classpath
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/.classpath
@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="src" path="src-gen"/>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src-gen"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/org.eclipse.papyrus.infra.newchild/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..62a08f4494d 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
index b63869cd4ef..967eda06145 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/META-INF/MANIFEST.MF
@@ -16,8 +16,10 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.semantic;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-ClassPath: .
@@ -28,4 +30,4 @@ Bundle-ManifestVersion: 2
Bundle-Activator: org.eclipse.papyrus.infra.newchild.Activator
Bundle-Description: %pluginDescription
Bundle-SymbolicName: org.eclipse.papyrus.infra.newchild;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/build.properties b/plugins/infra/org.eclipse.papyrus.infra.newchild/build.properties
index 85abf2cc868..ba36fa89f8c 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/build.properties
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/build.properties
@@ -11,7 +11,6 @@ bin.includes = META-INF/,\
src.includes = about.html,\
schema/,\
docs/
-jre.compilation.profile = J2SE-1.5
bin.excludes = docs/ElementCreationMenuModel.di,\
docs/ElementCreationMenuModel.notation,\
docs/ElementCreationMenuModel.uml,\
diff --git a/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java b/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java
index 7f61e14c5e0..905147763b1 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.newchild/src/org/eclipse/papyrus/infra/newchild/CreationMenuFactory.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,8 +8,10 @@
*
* Contributors:
*
- * CEA LIST - Initial API and implementation
- * Patrik Nandorf (Ericsson AB) patrik.nandorf@ericsson.com - Bug 425565
+ * CEA LIST - Initial API and implementation
+ * Patrik Nandorf (Ericsson AB) patrik.nandorf@ericsson.com - Bug 425565
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.newchild;
@@ -18,6 +20,9 @@ import java.net.URL;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.Map;
+import java.util.Objects;
+import java.util.Optional;
+import java.util.stream.Stream;
import org.eclipse.emf.common.command.Command;
import org.eclipse.emf.common.command.UnexecutableCommand;
@@ -35,6 +40,8 @@ import org.eclipse.gmf.runtime.emf.type.core.requests.CreateElementRequest;
import org.eclipse.gmf.runtime.emf.type.core.requests.CreateRelationshipRequest;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProvider;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForEObject;
import org.eclipse.papyrus.infra.filters.Filter;
@@ -45,8 +52,11 @@ import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.infra.services.edit.utils.RequestCacheEntries;
import org.eclipse.papyrus.infra.services.labelprovider.service.LabelProviderService;
+import org.eclipse.papyrus.infra.services.semantic.service.SemanticService;
+import org.eclipse.papyrus.infra.ui.emf.providers.strategy.SemanticEMFContentProvider;
+import org.eclipse.papyrus.infra.ui.providers.DelegatingPapyrusContentProvider;
+import org.eclipse.papyrus.infra.ui.providers.ISemanticContentProviderFactory;
import org.eclipse.papyrus.infra.widgets.editors.TreeSelectorDialog;
-import org.eclipse.papyrus.uml.tools.providers.SemanticUMLContentProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
@@ -106,7 +116,7 @@ public class CreationMenuFactory {
boolean result = false;
if (currentMenu instanceof Folder) {
result = populateMenu(topMenu, (Folder) currentMenu, selectedObject, topMenu.getItemCount(), adviceCache);
- } else if (currentMenu instanceof CreationMenu && ((CreationMenu) currentMenu).isVisible() && filterMatches((CreationMenu) currentMenu, selectedObject)) {
+ } else if (currentMenu instanceof CreationMenu && ((CreationMenu) currentMenu).isVisible() && filterMatches(currentMenu, selectedObject)) {
CreationMenu currentCreationMenu = (CreationMenu) currentMenu;
EReference reference = null;
String role = currentCreationMenu.getRole();
@@ -371,7 +381,7 @@ public class CreationMenuFactory {
} else {
createGMFCommand = provider.getEditCommand(buildRequest(reference, container, creationMenu, adviceCache));
}
-
+
if (createGMFCommand != null) {
Command emfCommand = org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper.wrap(createGMFCommand);
return emfCommand;
@@ -396,7 +406,7 @@ public class CreationMenuFactory {
}
} else {
if (creationMenu instanceof CreateRelationshipMenu) {
- request = new CreateRelationshipRequest(editingDomain, null,container,null,getElementType(elementTypeId),reference);
+ request = new CreateRelationshipRequest(editingDomain, null, container, null, getElementType(elementTypeId), reference);
} else {
request = new CreateElementRequest(editingDomain, container, getElementType(elementTypeId), reference);
}
@@ -456,7 +466,27 @@ public class CreationMenuFactory {
return null;
}
- SemanticUMLContentProvider contentProvider = new SemanticUMLContentProvider(eobject.eResource().getResourceSet()) {
+ SemanticService semanticService = null;
+
+ try {
+ semanticService = ServiceUtilsForEObject.getInstance().getService(SemanticService.class, eobject);
+ } catch (Exception e) {
+ Activator.log.error("Could not get the SemanticService for " + eobject, e);
+ return null;
+ }
+
+ // Get the primary language-specific content provider
+ IModel[] models = semanticService.getSemanticIModels();
+ Optional<ISemanticContentProviderFactory> factory = Stream.of(models)
+ .map(m -> m.getAdapter(ISemanticContentProviderFactory.class))
+ .filter(Objects::nonNull)
+ .reduce(ISemanticContentProviderFactory::compose);
+
+ ITreeContentProvider delegate = factory.orElse(SemanticEMFContentProvider::new)
+ .createSemanticContentProvider(eobject.eResource().getResourceSet());
+
+ ITreeContentProvider contentProvider = new DelegatingPapyrusContentProvider(delegate) {
+ @Override
public boolean isValidValue(Object element) {
if (element == null) {
return false;
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/META-INF/MANIFEST.MF b/plugins/infra/org.eclipse.papyrus.infra.ui/META-INF/MANIFEST.MF
index b6b0ad24536..34b327f9339 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.ui/META-INF/MANIFEST.MF
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/META-INF/MANIFEST.MF
@@ -15,6 +15,7 @@ Export-Package: org.eclipse.papyrus.infra.ui,
org.eclipse.papyrus.infra.ui.multidiagram.actionbarcontributor,
org.eclipse.papyrus.infra.ui.preferences,
org.eclipse.papyrus.infra.ui.preferences.dialog,
+ org.eclipse.papyrus.infra.ui.providers,
org.eclipse.papyrus.infra.ui.services,
org.eclipse.papyrus.infra.ui.services.internal;x-internal:=true,
org.eclipse.papyrus.infra.ui.util
@@ -39,7 +40,8 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
org.eclipse.emf.edit.ui;bundle-version="2.12.0",
org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.9.0",
org.eclipse.ui.views.properties.tabbed;bundle-version="3.7.0",
- org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-Version: 1.2.0.qualifier
Eclipse-BuddyPolicy: dependent
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/plugin.xml b/plugins/infra/org.eclipse.papyrus.infra.ui/plugin.xml
index c61a524a867..7b5b9c5ed7a 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.ui/plugin.xml
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/plugin.xml
@@ -162,7 +162,7 @@
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ id="org.eclipse.papyrus.ui.toolbar">
<command
commandId="org.eclipse.papyrus.infra.core.commands.dropdowncommand"
icon="icons/papyrus/Papyrus_16x16.gif"
@@ -181,7 +181,7 @@
</toolbar>
</menuContribution>
<menuContribution
- locationURI="toolbar:org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ locationURI="toolbar:org.eclipse.papyrus.ui.toolbar">
</menuContribution>
<menuContribution
locationURI="popup:org.eclipse.papyrus.infra.core.editor.ui.tabmenu?endof=tabcommands">
@@ -514,4 +514,20 @@
name="Editor">
</page>
</extension>
+
+ <extension
+ point="org.eclipse.core.expressions.definitions">
+ <!-- Is a Papyrus editor active that has a semantic model selection? -->
+ <definition id="org.eclipse.papyrus.ui.semanticModelActive">
+ <with
+ variable="activeEditor">
+ <adapt
+ type="org.eclipse.papyrus.infra.core.services.ServicesRegistry">
+ <test
+ property="org.eclipse.papyrus.infra.core.hasSemanticModel">
+ </test>
+ </adapt>
+ </with>
+ </definition>
+ </extension>
</plugin>
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositePapyrusContentProvider.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositePapyrusContentProvider.java
new file mode 100644
index 00000000000..b667228dde5
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositePapyrusContentProvider.java
@@ -0,0 +1,109 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.ui.providers;
+
+import java.util.Objects;
+import java.util.stream.Stream;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+import com.google.common.collect.Iterables;
+
+/**
+ * A content provider that synthesizes content from multiple other providers.
+ */
+public class CompositePapyrusContentProvider implements IAdaptableContentProvider, IHierarchicContentProvider, IStaticContentProvider {
+
+ private final ITreeContentProvider[] delegates;
+
+ public CompositePapyrusContentProvider(ITreeContentProvider... delegates) {
+ super();
+
+ this.delegates = new ITreeContentProvider[delegates.length];
+ for (int i = 0; i < delegates.length; i++) {
+ // Wrap it or not, as needed
+ this.delegates[i] = DelegatingPapyrusContentProvider.wrap(delegates[i]);
+ }
+ }
+
+ public CompositePapyrusContentProvider(Iterable<? extends ITreeContentProvider> delegates) {
+ this(Iterables.toArray(delegates, ITreeContentProvider.class));
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return Stream.of(delegates)
+ .flatMap(d -> Stream.of(d.getElements(inputElement)))
+ .toArray();
+ }
+
+ @Override
+ public void dispose() {
+ Stream.of(delegates).forEach(ITreeContentProvider::dispose);
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ Stream.of(delegates).forEach(d -> d.inputChanged(viewer, oldInput, newInput));
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ return Stream.of(delegates)
+ .flatMap(d -> Stream.of(d.getChildren(parentElement)))
+ .toArray();
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return Stream.of(delegates)
+ .map(d -> d.getParent(element))
+ .filter(Objects::nonNull)
+ .findAny().orElse(null);
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return Stream.of(delegates)
+ .anyMatch(d -> d.hasChildren(element));
+ }
+
+ @Override
+ public Object getAdaptedValue(Object containerElement) {
+ return Stream.of(delegates)
+ .map(IAdaptableContentProvider.class::cast)
+ .map(d -> d.getAdaptedValue(containerElement))
+ .filter(Objects::nonNull)
+ .findAny().orElse(containerElement);
+ }
+
+ @Override
+ public boolean isValidValue(Object element) {
+ return Stream.of(delegates)
+ .map(IHierarchicContentProvider.class::cast)
+ .anyMatch(d -> d.isValidValue(element));
+ }
+
+ @Override
+ public Object[] getElements() {
+ return Stream.of(delegates)
+ .map(IStaticContentProvider.class::cast)
+ .flatMap(d -> Stream.of(d.getElements()))
+ .toArray();
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositeSemanticContentProviderFactory.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositeSemanticContentProviderFactory.java
new file mode 100644
index 00000000000..71616365e59
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/CompositeSemanticContentProviderFactory.java
@@ -0,0 +1,63 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.ui.providers;
+
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+
+/**
+ * Default implementation of a composite content-provider factory.
+ */
+class CompositeSemanticContentProviderFactory implements ISemanticContentProviderFactory {
+ private final List<ISemanticContentProviderFactory> factories;
+
+ CompositeSemanticContentProviderFactory(ISemanticContentProviderFactory first, ISemanticContentProviderFactory second) {
+ super();
+
+ factories = Arrays.asList(first, second);
+ }
+
+ private CompositeSemanticContentProviderFactory(CompositeSemanticContentProviderFactory composite, ISemanticContentProviderFactory other) {
+ super();
+
+ if (other instanceof CompositeSemanticContentProviderFactory) {
+ List<ISemanticContentProviderFactory> otherFactories = ((CompositeSemanticContentProviderFactory) other).factories;
+ factories = new ArrayList<>(composite.factories.size() + otherFactories.size());
+ factories.addAll(composite.factories);
+ factories.addAll(otherFactories);
+ } else {
+ factories = new ArrayList<>(composite.factories.size() + 1);
+ factories.addAll(composite.factories);
+ factories.add(other);
+ }
+ }
+
+ @Override
+ public ITreeContentProvider createSemanticContentProvider(ResourceSet resourceSet) {
+ return DelegatingPapyrusContentProvider.compose(factories.stream()
+ .map(f -> f.createSemanticContentProvider(resourceSet))
+ .collect(Collectors.toList()));
+ }
+
+ @Override
+ public ISemanticContentProviderFactory compose(ISemanticContentProviderFactory other) {
+ return new CompositeSemanticContentProviderFactory(this, other);
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProvider.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProvider.java
new file mode 100644
index 00000000000..de1ddcce51f
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProvider.java
@@ -0,0 +1,170 @@
+/*****************************************************************************
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus (CEA) - bug 410346
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.infra.ui.providers;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.tools.util.TypeUtils;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+import com.google.common.collect.Iterables;
+import com.google.common.collect.Lists;
+
+/**
+ * A content-provider implementing the complete set of Papyrus-specific content-provider APIs that
+ * delegates those APIs to another provider according to its actual capabilities.
+ */
+public class DelegatingPapyrusContentProvider implements IAdaptableContentProvider, IHierarchicContentProvider, IStaticContentProvider {
+
+ private static final Object[] NONE = {};
+
+ private final ITreeContentProvider treeDelegate;
+ private final IAdaptableContentProvider adaptableDelegate;
+ private final IHierarchicContentProvider hierarchicDelegate;
+ private final IStaticContentProvider staticDelegate;
+
+ public DelegatingPapyrusContentProvider(ITreeContentProvider delegate) {
+ super();
+
+ treeDelegate = delegate;
+ adaptableDelegate = TypeUtils.as(delegate, IAdaptableContentProvider.class);
+ hierarchicDelegate = TypeUtils.as(delegate, IHierarchicContentProvider.class);
+ staticDelegate = TypeUtils.as(delegate, IStaticContentProvider.class);
+ }
+
+ /**
+ * Obtains a content-provider based on the given {@code provider} that implements all of the
+ * the Papyrus-specific extension protocols.
+ *
+ * @param provider
+ * a tree-content provider
+ * @return a complete provider, which may be a delegating provider or may be the original
+ * {@code provider} if it is already complete
+ */
+ public static ITreeContentProvider wrap(ITreeContentProvider provider) {
+ return ((provider instanceof IAdaptableContentProvider) && (provider instanceof IHierarchicContentProvider) && (provider instanceof IStaticContentProvider))
+ ? provider
+ : new DelegatingPapyrusContentProvider(provider);
+ }
+
+ /**
+ * Obtains a content-provider based on the given providers that implements all of the
+ * the Papyrus-specific extension protocols.
+ *
+ * @param first,&nbsp;second,&nbsp;rest
+ * two or more tree-content providers
+ * @return a complete provider based on the given providers
+ */
+ public static ITreeContentProvider compose(ITreeContentProvider first, ITreeContentProvider second, ITreeContentProvider... rest) {
+ return compose(Lists.asList(first, second, rest));
+ }
+
+ /**
+ * Obtains a content-provider based on the given {@code providers} that implements all of the
+ * the Papyrus-specific extension protocols.
+ *
+ * @param providers
+ * zero or more tree-content providers
+ * @return a complete provider based on the given {@code providers}
+ */
+ public static ITreeContentProvider compose(Iterable<? extends ITreeContentProvider> providers) {
+ ITreeContentProvider result;
+
+ // Obtain optimal result in case of a single provider
+ if (providers instanceof Collection<?>) {
+ Collection<? extends ITreeContentProvider> collection = (Collection<? extends ITreeContentProvider>) providers;
+ switch (collection.size()) {
+ case 0:
+ result = new CompositePapyrusContentProvider();
+ break;
+ case 1:
+ result = wrap(Iterables.getOnlyElement(collection));
+ break;
+ default:
+ result = new CompositePapyrusContentProvider(providers);
+ break;
+ }
+ } else {
+ Iterator<? extends ITreeContentProvider> iter = providers.iterator();
+ if (!iter.hasNext()) {
+ result = new CompositePapyrusContentProvider();
+ } else {
+ ITreeContentProvider provider = iter.next();
+ if (iter.hasNext()) {
+ result = new CompositePapyrusContentProvider(providers);
+ } else {
+ result = wrap(provider);
+ }
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return treeDelegate.getElements(inputElement);
+ }
+
+ @Override
+ public void dispose() {
+ treeDelegate.dispose();
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ treeDelegate.inputChanged(viewer, oldInput, newInput);
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ return treeDelegate.getChildren(parentElement);
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return treeDelegate.getParent(element);
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return treeDelegate.hasChildren(element);
+ }
+
+ @Override
+ public Object getAdaptedValue(Object containerElement) {
+ return (adaptableDelegate == null)
+ ? containerElement
+ : adaptableDelegate.getAdaptedValue(containerElement);
+ }
+
+ @Override
+ public boolean isValidValue(Object element) {
+ return (hierarchicDelegate == null) || hierarchicDelegate.isValidValue(element);
+ }
+
+ @Override
+ public Object[] getElements() {
+ return (staticDelegate == null)
+ ? NONE
+ : staticDelegate.getElements();
+ }
+
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/ISemanticContentProviderFactory.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/ISemanticContentProviderFactory.java
new file mode 100644
index 00000000000..05eecf9f087
--- /dev/null
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/providers/ISemanticContentProviderFactory.java
@@ -0,0 +1,59 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.ui.providers;
+
+import org.eclipse.emf.ecore.resource.ResourceSet;
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.core.resource.ModelSet;
+
+/**
+ * <p>
+ * A protocol for creation of semantic model content providers on EMF resource sets.
+ * </p>
+ * <p>
+ * It is expected that {@link IModel}s representing semantic model content in the
+ * {@link ModelSet} provide adapters of this interface type for the purpose of obtaining
+ * suitable content-providers for presentation of the model content to the user.
+ * Because there there are potentially multiple such {@code IModel}s that have
+ * semantic content, it is possible that multiple content-providers will have to be
+ * combined via the {@link #compose(ISemanticContentProviderFactory)} API.
+ * </p>
+ *
+ * @see IModel
+ * @see #compose(ISemanticContentProviderFactory)
+ */
+@FunctionalInterface
+public interface ISemanticContentProviderFactory {
+ /**
+ * Creates a semantic model content provider on the given {@code ResourceSet}.
+ *
+ * @param resourceSet
+ * a resource set
+ *
+ * @return the semantic model content provider
+ */
+ ITreeContentProvider createSemanticContentProvider(ResourceSet resourceSet);
+
+ /**
+ * Obtains a factory that composes my provider with an{@code other} factory's provider.
+ *
+ * @param other
+ * another semantic content-provider factory
+ * @return the composed factory, which generally creates composed content providers
+ */
+ default ISemanticContentProviderFactory compose(ISemanticContentProviderFactory other) {
+ return new CompositeSemanticContentProviderFactory(this, other);
+ }
+}
diff --git a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorUtils.java b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorUtils.java
index eea097e6062..6918f42b92d 100644
--- a/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorUtils.java
+++ b/plugins/infra/org.eclipse.papyrus.infra.ui/src/org/eclipse/papyrus/infra/ui/util/EditorUtils.java
@@ -247,7 +247,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -285,7 +285,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -323,7 +323,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -368,7 +368,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -415,7 +415,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -504,7 +504,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -530,7 +530,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -565,7 +565,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
@@ -600,7 +600,7 @@ public class EditorUtils {
* <li>
* org.eclipse.papyrus.uml.diagram.common.util.ServiceUtilsForGMF</li>
* <li>
- * org.eclipse.papyrus.infra.core.utils.ServiceUtilsForActionHandlers (to be used with care !)</li>
+ * org.eclipse.papyrus.infra.ui.util.ServiceUtilsForActionHandlers (to be used with care !)</li>
* </ul>
*/
@Deprecated
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.classpath b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.classpath
index 2d1a4302f04..eca7bdba8f0 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.classpath
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..62a08f4494d 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/META-INF/MANIFEST.MF b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/META-INF/MANIFEST.MF
index d21ae07957e..d4c124a0850 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/META-INF/MANIFEST.MF
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/META-INF/MANIFEST.MF
@@ -7,17 +7,11 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
org.eclipse.papyrus.infra.services.controlmode.history;bundle-version="1.2.0",
org.eclipse.papyrus.infra.widgets.toolbox;bundle-version="1.2.0",
org.eclipse.core.expressions,
- org.eclipse.core.resources;bundle-version="3.7.0",
org.eclipse.core.runtime;bundle-version="3.7.0",
- org.eclipse.gef;bundle-version="3.7.1",
- org.eclipse.gmf.runtime.notation;bundle-version="1.5.0",
- org.eclipse.gmf.runtime.diagram.ui;bundle-version="1.5.0",
org.eclipse.papyrus.infra.core.sasheditor.di;bundle-version="1.2.0",
org.eclipse.papyrus.infra.core.sashwindows.di;bundle-version="1.2.0",
- org.eclipse.ui.ide;bundle-version="3.8.0",
org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0",
- org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0"
Bundle-Vendor: %providerName
@@ -28,4 +22,4 @@ Bundle-Name: %pluginName
Bundle-Activator: org.eclipse.papyrus.infra.services.resourceloading.Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.services.resourceloading;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/OnDemandLoadingModelSet.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/OnDemandLoadingModelSet.java
index cc8a5d56771..1ec0ea895e9 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/OnDemandLoadingModelSet.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/OnDemandLoadingModelSet.java
@@ -1,6 +1,16 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2010, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
- */
+ * Contributors:
+ * LIFL - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.infra.services.resourceloading;
import java.util.HashSet;
@@ -8,12 +18,13 @@ import java.util.Set;
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.EObject;
+import org.eclipse.papyrus.infra.core.language.ILanguageService;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModelUtils;
import org.eclipse.papyrus.infra.core.utils.DiResourceSet;
import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationUtils;
import org.eclipse.papyrus.infra.services.resourceloading.impl.ProxyManager;
-import org.eclipse.papyrus.uml.tools.model.UmlUtils;
/**
@@ -37,6 +48,8 @@ public class OnDemandLoadingModelSet extends DiResourceSet {
*/
private IProxyManager proxyManager;
+ private AbstractBaseModel semanticModel;
+
/**
*
* Constructor.
@@ -57,6 +70,7 @@ public class OnDemandLoadingModelSet extends DiResourceSet {
public void unload() {
super.unload();
proxyManager.dispose();
+ semanticModel = null;
}
@@ -70,8 +84,7 @@ public class OnDemandLoadingModelSet extends DiResourceSet {
URI resourceURI = uri.trimFragment();
// for performance reasons, we check the three initial resources first
- // TODO not use getUMLModel
- if (resourceURI.equals(UmlUtils.getUmlModel(this).getResourceURI()) || resourceURI.equals(NotationUtils.getNotationModel(this).getResourceURI()) || resourceURI.equals(SashModelUtils.getSashModel(this).getResourceURI())
+ if (resourceURI.equals(getSemanticResourceURI()) || resourceURI.equals(NotationUtils.getNotationModel(this).getResourceURI()) || resourceURI.equals(SashModelUtils.getSashModel(this).getResourceURI())
|| uriLoading.contains(resourceURI)) {
// do not manage eObject of the current resources
return super.getEObject(uri, loadOnDemand);
@@ -95,4 +108,35 @@ public class OnDemandLoadingModelSet extends DiResourceSet {
uriLoading.add(alwaysLoadedUri);
}
+ private AbstractBaseModel getSemanticModel() {
+ if (semanticModel == null) {
+ semanticModel = ILanguageService.getLanguageModels(this).stream()
+ .filter(AbstractBaseModel.class::isInstance)
+ .map(AbstractBaseModel.class::cast)
+ .findAny().orElseGet(DummyModel::new);
+ }
+
+ return semanticModel;
+ }
+
+ private URI getSemanticResourceURI() {
+ AbstractBaseModel model = getSemanticModel();
+ return (model == null) ? null : model.getResourceURI();
+ }
+
+ //
+ // Nested types
+ //
+
+ private static class DummyModel extends AbstractBaseModel {
+ @Override
+ public String getIdentifier() {
+ return ""; // Dummy model
+ }
+
+ @Override
+ protected String getModelFileExtension() {
+ return "\0"; // Dummy model
+ }
+ }
}
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/util/LoadingUtils.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/util/LoadingUtils.java
index 4944ada0793..4565f85eb4a 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/util/LoadingUtils.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading/src/org/eclipse/papyrus/infra/services/resourceloading/util/LoadingUtils.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011, 2014 Atos Origin, CEA, and others.
- *
+ * Copyright (c) 2011, 2016 Atos Origin, CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -10,12 +9,14 @@
* Contributors:
* Vincent Hemery (Atos) vincent.hemery@atos.net - Initial API and implementation
* Christian W. Damus (CEA) - bug 415639
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.services.resourceloading.util;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
+import java.util.Collection;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
@@ -38,6 +39,9 @@ import org.eclipse.gef.util.EditPartUtilities;
import org.eclipse.gmf.runtime.diagram.ui.parts.IDiagramGraphicalViewer;
import org.eclipse.gmf.runtime.notation.Diagram;
import org.eclipse.jface.operation.IRunnableWithProgress;
+import org.eclipse.papyrus.infra.core.language.ILanguageService;
+import org.eclipse.papyrus.infra.core.resource.AbstractBaseModel;
+import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.sasheditor.DiModel;
import org.eclipse.papyrus.infra.core.sashwindows.di.service.IPageManager;
@@ -49,7 +53,6 @@ import org.eclipse.papyrus.infra.ui.editor.IMultiDiagramEditor;
import org.eclipse.papyrus.infra.ui.util.TransactionUIHelper;
import org.eclipse.papyrus.infra.widgets.toolbox.notification.Type;
import org.eclipse.papyrus.infra.widgets.toolbox.notification.builders.NotificationBuilder;
-import org.eclipse.papyrus.uml.tools.model.UmlModel;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
@@ -81,6 +84,7 @@ public class LoadingUtils {
runInEditingDomain(modelSet.getTransactionalEditingDomain(), editor, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
IMultiDiagramEditor core = (IMultiDiagramEditor) editor;
@@ -175,6 +179,7 @@ public class LoadingUtils {
if (editor instanceof IMultiDiagramEditor) {
runInEditingDomain(modelSet.getTransactionalEditingDomain(), editor, new IRunnableWithProgress() {
+ @Override
public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {
try {
@@ -323,20 +328,6 @@ public class LoadingUtils {
}
/**
- * Common extensions
- * TODO get rid of listing all model's extensions and find a way to deduce them from model set. Then, delete this attribute.
- *
- * @see #getExtensions(ModelSet)
- */
- private static final Set<String> COMMON_EXTENSIONS = new HashSet<String>();
-
- static {
- COMMON_EXTENSIONS.add(UmlModel.UML_FILE_EXTENSION);
- COMMON_EXTENSIONS.add(NotationModel.NOTATION_FILE_EXTENSION);
- COMMON_EXTENSIONS.add(DiModel.DI_FILE_EXTENSION);
- }
-
- /**
* Get list of file extensions existing for this model set
*
* @param modelSet
@@ -344,7 +335,29 @@ public class LoadingUtils {
* @return extensions list to explore
*/
private static Set<String> getExtensions(ModelSet modelSet) {
- return COMMON_EXTENSIONS;
+ Set<String> result = new HashSet<String>();
+ // FIXME: Also need to generalize the notation and DI models
+ result.add(NotationModel.NOTATION_FILE_EXTENSION);
+ result.add(DiModel.DI_FILE_EXTENSION);
+
+ // Get the semantic model extensions
+ Collection<IModel> languageModels = ILanguageService.getLanguageModels(modelSet);
+ if (languageModels.isEmpty()) {
+ // No semantic models? Force UML for compatibility
+ Activator.log.warn("Semantic service unavailable. Assuming a UML model."); //$NON-NLS-1$
+ result.add("uml"); //$NON-NLS-1$
+ } else {
+ for (IModel model : languageModels) {
+ if (model instanceof AbstractBaseModel) {
+ URI uri = ((AbstractBaseModel) model).getResourceURI();
+ if ((uri != null) && (uri.fileExtension() != null)) {
+ result.add(uri.fileExtension());
+ }
+ }
+ }
+ }
+
+ return result;
}
/**
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.classpath b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.classpath
index 2d1a4302f04..eca7bdba8f0 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.classpath
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.classpath
@@ -1,7 +1,7 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.settings/org.eclipse.jdt.core.prefs b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.settings/org.eclipse.jdt.core.prefs
index 4759947300a..62a08f4494d 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.settings/org.eclipse.jdt.core.prefs
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/META-INF/MANIFEST.MF b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/META-INF/MANIFEST.MF
index 7d052031cae..bd15e784a04 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/META-INF/MANIFEST.MF
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/META-INF/MANIFEST.MF
@@ -13,4 +13,4 @@ Bundle-Name: Semantic Service
Bundle-Activator: org.eclipse.papyrus.infra.services.semantic.Activator
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.services.semantic;singleton:=true
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/src/org/eclipse/papyrus/infra/services/semantic/service/impl/SemanticServiceImpl.java b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/src/org/eclipse/papyrus/infra/services/semantic/service/impl/SemanticServiceImpl.java
index 121605b6d3a..a4521e6b7e4 100644
--- a/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/src/org/eclipse/papyrus/infra/services/semantic/service/impl/SemanticServiceImpl.java
+++ b/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic/src/org/eclipse/papyrus/infra/services/semantic/service/impl/SemanticServiceImpl.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
+ * Copyright (c) 2012, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,14 +8,23 @@
*
* Contributors:
* Camille Letavernier (CEA LIST) camille.letavernier@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
*****************************************************************************/
package org.eclipse.papyrus.infra.services.semantic.service.impl;
+import static java.util.stream.StreamSupport.stream;
+
+import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
+import org.eclipse.papyrus.infra.core.language.ILanguageService;
+import org.eclipse.papyrus.infra.core.resource.IEMFModel;
import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceException;
@@ -35,14 +44,17 @@ public class SemanticServiceImpl implements SemanticService {
private ServicesRegistry registry;
+ @Override
public void init(ServicesRegistry servicesRegistry) throws ServiceException {
this.registry = servicesRegistry;
}
+ @Override
public void startService() throws ServiceException {
// Nothing
}
+ @Override
public void disposeService() throws ServiceException {
registry = null;
}
@@ -50,28 +62,52 @@ public class SemanticServiceImpl implements SemanticService {
/**
* The default implements returns all root EObjects
*/
+ @Override
public EObject[] getSemanticRoots() {
- try {
- List<EObject> rootElements = new LinkedList<EObject>();
+ EObject[] result;
+ try {
ModelSet modelSet = ServiceUtils.getInstance().getModelSet(registry);
- for (Resource resource : modelSet.getResources()) {
- rootElements.addAll(resource.getContents());
+ Collection<IEMFModel> emfModels = getEMFModels();
+ if (emfModels.isEmpty()) {
+ List<EObject> rootElements = new LinkedList<EObject>();
+ for (Resource resource : modelSet.getResources()) {
+ rootElements.addAll(resource.getContents());
+ }
+ result = rootElements.toArray(new EObject[rootElements.size()]);
+ } else {
+ result = emfModels.stream()
+ .flatMap(m -> stream(m.getRootElements().spliterator(), false))
+ .toArray(EObject[]::new);
}
-
- return rootElements.toArray(new EObject[rootElements.size()]);
-
} catch (Exception ex) {
Activator.log.error(ex);
- return new EObject[0];
+ result = new EObject[0];
}
+
+ return result;
}
- /**
- * TODO: Unsupported
- */
+ @Override
public IModel[] getSemanticIModels() {
- return new IModel[0]; // Currently, it is not possible to retrieve all registered IModels for a ModelSet
+ IModel[] result;
+
+ try {
+ ModelSet modelSet = ServiceUtils.getInstance().getModelSet(registry);
+ result = ILanguageService.getLanguageModels(modelSet).stream().toArray(IModel[]::new);
+ } catch (Exception e) {
+ Activator.log.error(e);
+ result = new IModel[0];
+ }
+
+ return result;
}
+ protected Collection<IEMFModel> getEMFModels() {
+ return Stream.of(getSemanticIModels())
+ .filter(IEMFModel.class::isInstance)
+ .map(IEMFModel.class::cast)
+ .distinct() // Unique models only
+ .collect(Collectors.toList());
+ }
}
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Profile.gif b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Profile.gif
new file mode 100644
index 00000000000..18eed1f5cb9
--- /dev/null
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/icons/Profile.gif
Binary files differ
diff --git a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java
index e261e130614..6a90c6e5358 100755
--- a/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java
+++ b/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.policy/src/org/eclipse/papyrus/infra/viewpoints/policy/ViewPrototypeContentProvider.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 CEA LIST.
- *
+ * Copyright (c) 2014, 2016 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Laurent Wouters laurent.wouters@cea.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
package org.eclipse.papyrus.infra.viewpoints.policy;
@@ -24,6 +24,8 @@ import java.util.Map;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.EPackage;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.jface.resource.ImageRegistry;
+import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.Viewer;
@@ -41,22 +43,38 @@ import org.eclipse.swt.graphics.Image;
*/
public class ViewPrototypeContentProvider implements ITreeContentProvider {
- private static Image loadImage(String uri) {
+ private static ImageDescriptor loadImage(String uri) {
URL url = null;
try {
url = new URL(uri);
} catch (MalformedURLException e) {
}
- return ImageDescriptor.createFromURL(url).createImage();
+ return ImageDescriptor.createFromURL(url);
}
public static class LP extends LabelProvider {
+ private static final String IMG_CATEGORY = "imageCategory"; //$NON-NLS-1$
+ private static final String IMG_VIEWPOINT = "imageViewpoint"; //$NON-NLS-1$
+ private static final String IMG_PROFILE = "imageProfile"; //$NON-NLS-1$
+ private static final String IMG_MODEL = "imageModel"; //$NON-NLS-1$
+ private static final String IMG_OWNER = "imageOwner"; //$NON-NLS-1$
+
+ private ImageRegistry images = new ImageRegistry(JFaceResources.getResources());
+
+ {
+ images.put(IMG_CATEGORY, loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.png"));
+ images.put(IMG_VIEWPOINT, loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png"));
+ images.put(IMG_PROFILE, loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.policy/icons/Profile.gif"));
+ images.put(IMG_MODEL, loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.png"));
+ images.put(IMG_OWNER, loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.png"));
+ }
- private Image imageCategory = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusView.png");
- private Image imageViewpoint = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/PapyrusViewpoint.png");
- private Image imageProfile = loadImage("platform:/plugin/org.eclipse.papyrus.uml.profile/resources/icons/Profile.gif");
- private Image imageModel = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/ModelRule.png");
- private Image imageOwner = loadImage("platform:/plugin/org.eclipse.papyrus.infra.viewpoints.configuration.edit/icons/full/obj16/OwningRule.png");
+ @Override
+ public void dispose() {
+ super.dispose();
+
+ images.dispose();
+ }
@Override
public String getText(Object element) {
@@ -134,22 +152,22 @@ public class ViewPrototypeContentProvider implements ITreeContentProvider {
@Override
public Image getImage(Object element) {
if (element instanceof Category) {
- return imageCategory;
+ return images.get(IMG_CATEGORY);
}
if (element instanceof ViewPrototype) {
return ((ViewPrototype) element).getIcon();
}
if (element instanceof PapyrusViewpoint) {
- return imageViewpoint;
+ return images.get(IMG_VIEWPOINT);
}
if (element instanceof EPackage) {
- return imageProfile;
+ return images.get(IMG_PROFILE);
}
if (element instanceof ModelRule) {
- return imageModel;
+ return images.get(IMG_MODEL);
}
if (element instanceof OwningRule) {
- return imageOwner;
+ return images.get(IMG_OWNER);
}
return null;
}
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml
index ba948d9fabf..337e7e96517 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition/plugin.gen.xml
@@ -53,7 +53,7 @@
</menuContribution>
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ <toolbar id="org.eclipse.papyrus.ui.toolbar">
<command commandId="org.eclipse.papyrus.sysml.diagram.blockdefinition.CreateCommand"
icon="icons/obj16/Diagram_BlockDefinition.gif" label="Create a new Block Definition Diagram"
style="push" tooltip="Create a new Block Definition Diagram">
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
index 196e6a6226c..95ee1f0deba 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.requirement/plugin.gen.xml
@@ -54,7 +54,7 @@
</menuContribution>
<menuContribution locationURI="toolbar:org.eclipse.ui.main.toolbar">
- <toolbar id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ <toolbar id="org.eclipse.papyrus.ui.toolbar">
<command commandId="org.eclipse.papyrus.sysml.diagram.requirement.CreateCommand"
icon="icons/obj16/Diagram_Requirement.gif" label="Create a new Requirement Diagram"
style="push" tooltip="Create a new Requirement Diagram">
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/plugin.xml
index 0d1bdb87bef..1a42a4f00f2 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.emftree/plugin.xml
@@ -52,7 +52,7 @@
<menuContribution
locationURI="toolbar:org.eclipse.ui.main.toolbar">
<toolbar
- id="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ id="org.eclipse.papyrus.ui.toolbar">
<command
commandId="com.cea.papyrus.ui.emftree.createTree"
icon="icons/EmfTree.gif"
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
index c3cad90cecb..b34652eb858 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.menu/plugin.xml
@@ -195,7 +195,7 @@
</menu>
</menuContribution>
<menuContribution
- locationURI="toolbar:org.eclipse.ui.main.toolbar?after=org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ locationURI="toolbar:org.eclipse.ui.main.toolbar?after=org.eclipse.papyrus.ui.toolbar">
<toolbar
id="org.eclipes.papyrus.menu.toolbar"
label="Papyrus Toolbar Action">
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui.perspectiveconfiguration/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.ui.perspectiveconfiguration/plugin.xml
index ca3920e33ae..891e0240ff0 100644
--- a/plugins/uml/org.eclipse.papyrus.uml.ui.perspectiveconfiguration/plugin.xml
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui.perspectiveconfiguration/plugin.xml
@@ -21,7 +21,7 @@
menuID="help">
</menu>
<toolbar
- toolbarID="org.eclipse.papyrus.uml.diagram.ui.toolbar">
+ toolbarID="org.eclipse.papyrus.ui.toolbar">
</toolbar>
<preferencePage
preferencepageID="org.eclipse.papyrus.infra.core.sasheditor.preferences.generalcategory">
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/.classpath b/plugins/uml/org.eclipse.papyrus.uml.ui/.classpath
new file mode 100644
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/.gitignore b/plugins/uml/org.eclipse.papyrus.uml.ui/.gitignore
new file mode 100644
index 00000000000..5e56e040ec0
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/.gitignore
@@ -0,0 +1 @@
+/bin
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/.project b/plugins/uml/org.eclipse.papyrus.uml.ui/.project
new file mode 100644
index 00000000000..1d8aa5623a4
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.uml.ui</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.ManifestBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.eclipse.pde.SchemaBuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.pde.PluginNature</nature>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.core.prefs b/plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..b3aa6d60f94
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.ui.prefs b/plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/META-INF/MANIFEST.MF b/plugins/uml/org.eclipse.papyrus.uml.ui/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..a72f53880c8
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/META-INF/MANIFEST.MF
@@ -0,0 +1,41 @@
+Manifest-Version: 1.0
+Export-Package: org.eclipse.papyrus.uml.ui.internal.adapters;x-internal:=true
+Require-Bundle: org.eclipse.ui,
+ org.eclipse.core.runtime,
+ org.eclipse.uml2.uml;bundle-version="4.1.0";visibility:=reexport,
+ org.eclipse.papyrus.infra.core.log;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.emf;bundle-version="1.2.0",
+ org.eclipse.core.databinding;bundle-version="1.4.1",
+ org.eclipse.emf.databinding;bundle-version="1.2.0",
+ org.eclipse.core.databinding.property;bundle-version="1.4.0",
+ org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.edit;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools.utils;bundle-version="1.2.0",
+ org.eclipse.uml2.common.edit;bundle-version="1.6.0",
+ org.eclipse.uml2.uml.edit;bundle-version="4.0.0",
+ org.eclipse.papyrus.infra.services.validation;bundle-version="1.2.0",
+ org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.4.0",
+ org.eclipse.papyrus.infra.services.labelprovider;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.2.0",
+ org.eclipse.core.expressions;bundle-version="3.4.0",
+ org.eclipse.uml2.uml,
+ org.eclipse.papyrus.emf.facet.custom.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.emf.facet.custom.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.extensionpoints;bundle-version="1.2.0",
+ org.eclipse.uml2.uml.validation;bundle-version="5.0.0",
+ com.google.guava;bundle-version="11.0.0",
+ org.eclipse.jface.text;bundle-version="3.10.0",
+ org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.ui.emf;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.edit.ui;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0"
+Bundle-Vendor: %providerName
+Bundle-ActivationPolicy: lazy
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Activator: org.eclipse.papyrus.uml.tools.Activator
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.uml.ui;singleton:=true
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/about.html b/plugins/uml/org.eclipse.papyrus.uml.ui/about.html
new file mode 100644
index 00000000000..dd3c089a94c
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/about.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
+<title>About</title>
+</head>
+<body lang="EN-US">
+<h2>About This Content</h2>
+
+<p>November 14, 2008</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> \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/build.properties b/plugins/uml/org.eclipse.papyrus.uml.ui/build.properties
new file mode 100644
index 00000000000..de0773ae287
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/build.properties
@@ -0,0 +1,18 @@
+#
+# Copyright (c) 2016 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+#
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.xml
+src.includes = about.html
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.properties b/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.properties
new file mode 100644
index 00000000000..44260ac7a3b
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.properties
@@ -0,0 +1,13 @@
+#
+# Copyright (c) 2016 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+#
+pluginName = Papyrus UML UI
+providerName = Eclipse Modeling Project
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml b/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml
new file mode 100644
index 00000000000..73bb85e854e
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/plugin.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?eclipse version="3.4"?>
+<plugin>
+ <extension
+ point="org.eclipse.core.runtime.adapters">
+ <factory
+ adaptableType="org.eclipse.papyrus.uml.tools.model.UmlModel"
+ class="org.eclipse.papyrus.uml.ui.internal.adapters.UMLModelAdapterFactory">
+ <adapter
+ type="org.eclipse.papyrus.infra.ui.providers.ISemanticContentProviderFactory">
+ </adapter>
+ </factory>
+ </extension>
+</plugin>
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/pom.xml b/plugins/uml/org.eclipse.papyrus.uml.ui/pom.xml
new file mode 100644
index 00000000000..10062516175
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/pom.xml
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <artifactId>org.eclipse.papyrus.releng</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../releng/main</relativePath>
+ </parent>
+ <artifactId>org.eclipse.papyrus.uml.ui</artifactId>
+ <groupId>org.eclipse.papyrus</groupId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-plugin</packaging>
+</project> \ No newline at end of file
diff --git a/plugins/uml/org.eclipse.papyrus.uml.ui/src/org/eclipse/papyrus/uml/ui/internal/adapters/UMLModelAdapterFactory.java b/plugins/uml/org.eclipse.papyrus.uml.ui/src/org/eclipse/papyrus/uml/ui/internal/adapters/UMLModelAdapterFactory.java
new file mode 100644
index 00000000000..2b8407f43ae
--- /dev/null
+++ b/plugins/uml/org.eclipse.papyrus.uml.ui/src/org/eclipse/papyrus/uml/ui/internal/adapters/UMLModelAdapterFactory.java
@@ -0,0 +1,51 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.ui.internal.adapters;
+
+import org.eclipse.core.runtime.IAdapterFactory;
+import org.eclipse.papyrus.infra.ui.providers.ISemanticContentProviderFactory;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.papyrus.uml.tools.providers.SemanticUMLContentProvider;
+
+/**
+ * Adapter factory for the {@link UmlModel} and possibly other UML things.
+ */
+public class UMLModelAdapterFactory implements IAdapterFactory {
+
+ private final Class<?>[] adapters = { ISemanticContentProviderFactory.class };
+
+ public UMLModelAdapterFactory() {
+ super();
+ }
+
+ @Override
+ public <T> T getAdapter(Object adaptableObject, Class<T> adapterType) {
+ T result = null;
+
+ if (adapterType == ISemanticContentProviderFactory.class) {
+ if (adaptableObject instanceof UmlModel) {
+ ISemanticContentProviderFactory adapter = SemanticUMLContentProvider::new;
+ result = adapterType.cast(adapter);
+ }
+ }
+
+ return result;
+ }
+
+ @Override
+ public Class<?>[] getAdapterList() {
+ return adapters;
+ }
+
+}
diff --git a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/model/CreatedPapyrusProfileModel.java b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/model/CreatedPapyrusProfileModel.java
index d168ceef1fd..3d93552a6a7 100644
--- a/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/model/CreatedPapyrusProfileModel.java
+++ b/plugins/uml/profile/org.eclipse.papyrus.uml.profile.drafter/src/org/eclipse/papyrus/uml/profile/drafter/model/CreatedPapyrusProfileModel.java
@@ -1,6 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2014 Cedric Dumoulin.
- *
+ * Copyright (c) 2014, 2016 Cedric Dumoulin, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +8,7 @@
*
* Contributors:
* Cedric Dumoulin Cedric.dumoulin@lifl.fr - Initial API and implementation
+ * Christian W. Damus - bug 485220
*
*****************************************************************************/
@@ -18,6 +18,7 @@ import java.util.Collections;
import java.util.Map;
import org.eclipse.emf.common.util.URI;
+import org.eclipse.emf.ecore.EObject;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.URIConverter;
import org.eclipse.papyrus.infra.core.resource.EMFLogicalModel;
@@ -52,13 +53,13 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
public static final String MODEL_ID = CreatedPapyrusProfileModel.class.getName();
public static final String PROFILE_FILE_EXTENSION = "profile";
-
+
protected URI uriWithoutExtension;
protected boolean isAdditionalResourcesRequired;
protected Resource umlResource;
protected Resource diResource;
protected Resource notationResource;
-
+
/**
*
@@ -72,14 +73,14 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
init(owner);
this.uriWithoutExtension = uriWithoutExtension;
this.isAdditionalResourcesRequired = isAdditionalResourcesRequired;
-
+
// add '.profile' to uri if needed
String currentExtension = uriWithoutExtension.fileExtension();
- if( ! PROFILE_FILE_EXTENSION.equals(currentExtension)) {
+ if (!PROFILE_FILE_EXTENSION.equals(currentExtension)) {
// Add extension
uriWithoutExtension.appendFileExtension(PROFILE_FILE_EXTENSION);
}
-
+
// Creates Resources
createModel();
// Register ourself to ModelSet
@@ -112,74 +113,79 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
/**
* Create the model by using the provided fullpath as a hint for the resource
- * URIs.
+ * URIs.
* In this implementation, create 3 resources (profile.uml, di and notation).
*
* @param fullPathWithoutExtension
*/
public void createModel() {
-
-
+
+
umlResource = createUmlResource();
// Initialize resource
- if( umlResource.getContents().isEmpty()) {
+ if (umlResource.getContents().isEmpty()) {
Profile profile = createProfile();
umlResource.getContents().add(profile);
}
-
+
// Set the main resource
resource = umlResource;
// Add additional resources if requested.
- if( isAdditionalResourcesRequired ) {
+ if (isAdditionalResourcesRequired) {
notationResource = createNotationResource();
- diResource = createDiResource();
+ diResource = createDiResource();
}
-
-
+
+
}
/**
* Create
+ *
* @param uriWithoutExtension2
* @return
*/
private Resource createUmlResource() {
- umlResource = createResource( uriWithoutExtension.appendFileExtension("uml"));
+ umlResource = createResource(uriWithoutExtension.appendFileExtension("uml"));
// init model
-
+
return umlResource;
}
private Resource createNotationResource() {
- notationResource = createResource( uriWithoutExtension.appendFileExtension("notation"));
+ notationResource = createResource(uriWithoutExtension.appendFileExtension("notation"));
// init model
-
+
return notationResource;
}
private Resource createDiResource() {
- diResource = createResource( uriWithoutExtension.appendFileExtension("di"));
+ diResource = createResource(uriWithoutExtension.appendFileExtension("di"));
// init model
-
+
return diResource;
}
/**
* Create the specified Profile
- * @param profileName The name of the Profile to create.
+ *
+ * @param profileName
+ * The name of the Profile to create.
*
*/
private Profile createProfile() {
Profile resultProfile = UMLFactory.eINSTANCE.createProfile();
-// resultProfile.setName(profileName);
+ // resultProfile.setName(profileName);
return resultProfile;
}
-
+
/**
- * Get or Create the specified Resource
- * @param resourceURI URI of the {@link Resource} that should be created.
+ * Get or Create the specified Resource
+ *
+ * @param resourceURI
+ * URI of the {@link Resource} that should be created.
* @return The requested Resource with specified URI.
*/
protected Resource createResource(URI resourceURI) {
@@ -187,7 +193,7 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
// Create Resource of appropriate type
ModelSet modelSet = getModelManager();
Resource resource = modelSet.getResource(resourceURI, false);
- if(resource != null) {
+ if (resource != null) {
// it already exists? Best effort to make sure it's loaded
try {
modelSet.getResource(resourceURI, true);
@@ -195,8 +201,8 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
// it commonly happens when creating a new model in the
// workspace that the wizard creates an empty file, first.
Map<String, ?> attributes = modelSet.getURIConverter().getAttributes(resourceURI, Collections.singletonMap(URIConverter.OPTION_REQUESTED_ATTRIBUTES, Collections.singleton(URIConverter.ATTRIBUTE_LENGTH)));
- Number length = (Number)attributes.get(URIConverter.ATTRIBUTE_LENGTH);
- if((length != null) && (length.longValue() > 0L)) {
+ Number length = (Number) attributes.get(URIConverter.ATTRIBUTE_LENGTH);
+ if ((length != null) && (length.longValue() > 0L)) {
// it has some length but isn't readable; fail
throw e;
} // otherwise, it's just empty and we'll fill it
@@ -218,8 +224,9 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
* @param resource
* @return
*/
+ @Override
protected boolean isRelatedResource(Resource resource) {
- if(resource == null) {
+ if (resource == null) {
return false;
}
@@ -231,7 +238,7 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
* @return
*/
public Profile getProfile() {
- return (Profile)umlResource.getContents().get(0);
+ return (Profile) umlResource.getContents().get(0);
}
/**
@@ -242,5 +249,9 @@ public class CreatedPapyrusProfileModel extends EMFLogicalModel {
return umlResource;
}
+ @Override
+ protected boolean isRootElement(EObject object) {
+ return super.isRootElement(object) && (object instanceof Profile);
+ }
}
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml
index 1150d79dd42..81b8241c2a1 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/plugin.xml
@@ -7,7 +7,7 @@
<!-- Register the UML delegating constraint provider -->
<!-- Bind the UML metamodel constraint provider's constraints to the Papyrus application. -->
-<extension
+ <extension
point="org.eclipse.papyrus.infra.core.model">
<model
classname="org.eclipse.papyrus.uml.tools.model.ExtendedUmlModel"
@@ -18,7 +18,15 @@
description="Complete the UML model.">
</modelSnippet>
</model>
- </extension>
+ </extension>
+ <extension
+ point="org.eclipse.papyrus.infra.core.language">
+ <modelBinding
+ language="org.eclipse.papyrus.uml.language"
+ model="org.eclipse.papyrus.infra.core.resource.uml.UmlModel">
+ </modelBinding>
+ </extension>
+
<extension
point="org.eclipse.papyrus.infra.services.labelprovider.labelProvider">
<labelProvider
diff --git a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/model/UmlModel.java b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/model/UmlModel.java
index 2f700bee1df..a39fd2b1e33 100644
--- a/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/model/UmlModel.java
+++ b/plugins/uml/tools/org.eclipse.papyrus.uml.tools/src/org/eclipse/papyrus/uml/tools/model/UmlModel.java
@@ -1,6 +1,16 @@
-/**
+/*****************************************************************************
+ * Copyright (c) 2011, 2016 LIFL, CEA LIST, Christian W. Damus, and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
*
- */
+ * Contributors:
+ * LIFL - Initial API and implementation
+ * Christian W. Damus - bug 485220
+ *
+ *****************************************************************************/
package org.eclipse.papyrus.uml.tools.model;
import org.eclipse.core.runtime.IPath;
@@ -11,6 +21,7 @@ import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.resource.NotFoundException;
import org.eclipse.uml2.common.util.CacheAdapter;
+import org.eclipse.uml2.uml.Element;
import org.eclipse.uml2.uml.Model;
import org.eclipse.uml2.uml.UMLFactory;
import org.eclipse.uml2.uml.UMLPackage;
@@ -129,4 +140,12 @@ public class UmlModel extends EMFLogicalModel implements IModel {
super.unload();
}
+
+ /**
+ * Only UML {@link Element}s are semantic roots, not stereotype applications.
+ */
+ @Override
+ protected boolean isRootElement(EObject object) {
+ return super.isRootElement(object) && (object instanceof Element);
+ }
}
diff --git a/releng/main-tests/pom.xml b/releng/main-tests/pom.xml
index ca0db6d764a..c3d4ccbd366 100644
--- a/releng/main-tests/pom.xml
+++ b/releng/main-tests/pom.xml
@@ -60,6 +60,7 @@
<module>../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.edit.ui.tests</module>
<module>../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.labelprovider.tests</module>
<module>../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.resourceloading.tests</module>
+ <module>../../tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests</module>
<module>../../tests/junit/plugins/infra/viewpoints/org.eclipse.papyrus.infra.viewpoints.configuration.tests</module>
<module>../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.blockdefinition.tests</module>
<module>../../tests/junit/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock.tests</module>
diff --git a/releng/main/pom.xml b/releng/main/pom.xml
index a27831efff3..beb6c82ab5d 100755
--- a/releng/main/pom.xml
+++ b/releng/main/pom.xml
@@ -45,6 +45,7 @@
<module>../../features/papyrus-main-features/org.eclipse.papyrus.uml.search.feature</module>
<module>../../features/papyrus-main-features/org.eclipse.papyrus.uml.textedit.feature</module>
<module>../../features/papyrus-main-features/org.eclipse.papyrus.uml.tools.feature</module>
+ <module>../../features/papyrus-main-features/org.eclipse.papyrus.uml.ui.feature</module>
<module>../../features/papyrus-main-features/org.eclipse.papyrus.uml.xtext.integration.feature</module>
<module>../../features/papyrus-main-features/org.eclipse.papyrus.views.modelexplorer.feature</module>
<module>../../features/papyrus-main-features/org.eclipse.papyrus.views.properties.feature</module>
@@ -290,6 +291,7 @@
<module>../../plugins/uml/org.eclipse.papyrus.uml.service.validation</module>
<module>../../plugins/uml/org.eclipse.papyrus.uml.services.decoration</module>
<module>../../plugins/uml/org.eclipse.papyrus.uml.templaterepository</module>
+ <module>../../plugins/uml/org.eclipse.papyrus.uml.ui</module>
<module>../../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext</module>
<module>../../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.collaborationuse.xtext.ui</module>
<module>../../plugins/uml/textedit/org.eclipse.papyrus.uml.textedit.common.xtext</module>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch
index 4eb7c497ae3..8823f1a8091 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/org.eclipse.papyrus.infra.core.tests.launch
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
<booleanAttribute key="askclear" value="false"/>
<booleanAttribute key="automaticAdd" value="true"/>
<booleanAttribute key="automaticValidate" value="false"/>
@@ -39,5 +40,5 @@
<booleanAttribute key="useCustomFeatures" value="false"/>
<booleanAttribute key="useDefaultConfig" value="true"/>
<booleanAttribute key="useDefaultConfigArea" value="false"/>
-<booleanAttribute key="useProduct" value="true"/>
+<booleanAttribute key="useProduct" value="false"/>
</launchConfiguration>
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/language/LanguageServiceTest.java b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/language/LanguageServiceTest.java
index aebeeeea77e..d332faeb09f 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/language/LanguageServiceTest.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.infra.core.tests/test/org/eclipse/papyrus/infra/core/language/LanguageServiceTest.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2015 Christian W. Damus and others.
+ * Copyright (c) 2015, 2016 Christian W. Damus and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -13,16 +13,21 @@
package org.eclipse.papyrus.infra.core.language;
+import static org.hamcrest.CoreMatchers.hasItem;
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.notNullValue;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
-import java.io.IOException;
+import java.util.Collection;
+import org.eclipse.papyrus.infra.core.internal.language.LanguageModelRegistry;
+import org.eclipse.papyrus.infra.core.resource.IModel;
import org.eclipse.papyrus.infra.core.services.ServiceException;
-import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
-import org.eclipse.papyrus.junit.utils.rules.ProjectFixture;
+import org.eclipse.papyrus.junit.utils.resources.EcoreModel;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.junit.utils.rules.ServiceRegistryModelSetFixture;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.ClassRule;
@@ -31,6 +36,7 @@ import org.junit.Test;
/**
* Tests the Papyrus Language Service.
*/
+@PluginResource({ "resources/My.ecore", "resources/My.genmodel" })
public class LanguageServiceTest {
private static final String ECORE_LANGUAGE_ID = "org.eclipse.papyrus.infra.core.tests.language.ecore"; //$NON-NLS-1$
private static final String ECORE_LANGUAGE_VERSION = "2.11"; //$NON-NLS-1$
@@ -41,9 +47,9 @@ public class LanguageServiceTest {
private static final String GENMODEL_LANGUAGE_NAME = "Genmodel"; //$NON-NLS-1$
@ClassRule
- public static final ProjectFixture project = new ProjectFixture();
+ public static final ModelSetFixture modelSet = new ServiceRegistryModelSetFixture();
- static ServicesRegistry registry;
+ private static IModel ecoreModel;
public LanguageServiceTest() {
super();
@@ -51,11 +57,11 @@ public class LanguageServiceTest {
@Test
public void contentTypeBasedLanguages() throws ServiceException {
- ILanguageService service = registry.getService(ILanguageService.class);
+ ILanguageService service = modelSet.requireService(ILanguageService.class);
ILanguage ecore = null;
ILanguage genmodel = null;
- for (ILanguage next : service.getLanguages(project.getURI("My.ecore"), true)) {
+ for (ILanguage next : service.getLanguages(modelSet.getProject().getURI("My.ecore"), true)) {
if (ECORE_LANGUAGE_ID.equals(next.getID())) {
ecore = next;
} else if (GENMODEL_LANGUAGE_ID.equals(next.getID())) {
@@ -72,11 +78,11 @@ public class LanguageServiceTest {
@Test
public void contentTypeBasedLanguages_uriWithoutExtension() throws ServiceException {
- ILanguageService service = registry.getService(ILanguageService.class);
+ ILanguageService service = modelSet.requireService(ILanguageService.class);
ILanguage ecore = null;
ILanguage genmodel = null;
- for (ILanguage next : service.getLanguages(project.getURI("My"), false)) {
+ for (ILanguage next : service.getLanguages(modelSet.getProject().getURI("My"), false)) {
if (ECORE_LANGUAGE_ID.equals(next.getID())) {
ecore = next;
} else if (GENMODEL_LANGUAGE_ID.equals(next.getID())) {
@@ -93,31 +99,28 @@ public class LanguageServiceTest {
assertThat(genmodel.getName(), is(GENMODEL_LANGUAGE_NAME));
}
+ @Test
+ public void languageBindings() {
+ Collection<IModel> models = ILanguageService.getLanguageModels(modelSet.getResourceSet());
+
+ assertThat(models, hasItem(ecoreModel));
+ }
+
//
// Test framework
//
@BeforeClass
- public static void createResources() throws IOException {
- project.createFile(LanguageServiceTest.class, "resources/My.ecore");
- project.createFile(LanguageServiceTest.class, "resources/My.genmodel");
- }
+ public static void registerEcoreModel() {
+ ecoreModel = new EcoreModel();
+ LanguageModelRegistry.INSTANCE.bind(ECORE_LANGUAGE_ID, ecoreModel.getIdentifier());
- @BeforeClass
- public static void createRegistry() throws Exception {
- registry = new ServicesRegistry();
- registry.add(ILanguageService.class, 1, new org.eclipse.papyrus.infra.core.internal.language.LanguageService());
- registry.startRegistry();
+ modelSet.getResourceSet().getInternal().registerModel(ecoreModel, false);
}
@AfterClass
- public static void destroyRegistry() throws Exception {
- if (registry != null) {
- registry.disposeRegistry();
- }
- registry = null;
+ public static void unregisterEcoreModel() {
+ LanguageModelRegistry.INSTANCE.bind(ECORE_LANGUAGE_ID, ecoreModel.getIdentifier());
+ ecoreModel = null;
}
-
-
-
}
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
index 5935889d57c..7fb08fe5e82 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/META-INF/MANIFEST.MF
@@ -89,7 +89,8 @@ Require-Bundle: org.eclipse.ui,
org.eclipse.papyrus.infra.services.edit.tests;bundle-version="1.2.0",
org.eclipse.papyrus.infra.services.edit.ui.tests;bundle-version="1.2.0",
org.eclipse.papyrus.infra.elementtypesconfigurations.ui.tests;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.extendedtypes.ui.tests;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.extendedtypes.ui.tests;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.semantic.tests;bundle-version="1.2.0"
Bundle-Vendor: %providerName
Bundle-ActivationPolicy: lazy
Bundle-Version: 1.2.0.qualifier
diff --git a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
index 85437e1f67f..ac730fbd6c9 100644
--- a/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
+++ b/tests/junit/plugins/core/org.eclipse.papyrus.tests/test/org/eclipse/papyrus/tests/AllTests.java
@@ -55,6 +55,7 @@ public class AllTests {
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.edit.tests.suites.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.edit.ui.tests.AllTests.class));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.labelprovider.tests.AllTests.class));
+ suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.services.semantic.tests.AllTests.class));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.emf.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.emf.tests.AllTests"));
suiteClasses.add(new FragmentTestSuiteClass(org.eclipse.papyrus.infra.ui.internal.emf.Activator.PLUGIN_ID, "org.eclipse.papyrus.infra.ui.emf.tests.AllTests"));
suiteClasses.add(new PluginTestSuiteClass(org.eclipse.papyrus.infra.extendedtypes.tests.AllTests.class));
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.classpath b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.classpath
index ad32c83a788..eca7bdba8f0 100644
--- a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.classpath
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.classpath
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="output" path="bin"/>
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.settings/org.eclipse.jdt.core.prefs
index 94d61f00da6..b3aa6d60f94 100644
--- a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.settings/org.eclipse.jdt.core.prefs
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/.settings/org.eclipse.jdt.core.prefs
@@ -1,10 +1,10 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.source=1.8
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/META-INF/MANIFEST.MF
index 357128fcc05..e54ff4dd997 100644
--- a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/META-INF/MANIFEST.MF
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/META-INF/MANIFEST.MF
@@ -7,8 +7,11 @@ Require-Bundle: org.junit;bundle-version="4.10.0",
org.eclipse.papyrus.junit.utils;bundle-version="1.2.0",
org.eclipse.papyrus.infra.tools;bundle-version="1.2.0",
org.eclipse.papyrus.infra.ui;bundle-version="1.2.0",
- org.eclipse.papyrus.infra.core;bundle-version="1.2.0"
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.widgets;bundle-version="1.2.0",
+ org.eclipse.emf.ecore;bundle-version="2.12.0"
Export-Package: org.eclipse.papyrus.infra.ui.lifecycleevents,
+ org.eclipse.papyrus.infra.ui.providers,
org.eclipse.papyrus.infra.ui.tests,
org.eclipse.papyrus.infra.ui.util
Bundle-Vendor: Eclipse Modeling Project
@@ -16,4 +19,4 @@ Bundle-Version: 1.2.0.qualifier
Bundle-Name: Papyrus Infrastructure UI Tests
Bundle-ManifestVersion: 2
Bundle-SymbolicName: org.eclipse.papyrus.infra.ui.tests;singleton:=true
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/org.eclipse.papyrus.infra.ui.tests.launch b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/org.eclipse.papyrus.infra.ui.tests.launch
index a773201dc3d..b7a4190df6e 100644
--- a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/org.eclipse.papyrus.infra.ui.tests.launch
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/org.eclipse.papyrus.infra.ui.tests.launch
@@ -24,7 +24,7 @@
<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
+<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.8"/>
<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.ui.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.infra.ui.tests"/>
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProviderTest.java b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProviderTest.java
new file mode 100644
index 00000000000..41d2a3aca1c
--- /dev/null
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/DelegatingPapyrusContentProviderTest.java
@@ -0,0 +1,113 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.ui.providers;
+
+import static org.eclipse.papyrus.junit.matchers.MoreMatchers.greaterThan;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.junit.Test;
+
+/**
+ * Tests for the {@link DelegatingPapyrusContentProvider} class.
+ */
+public class DelegatingPapyrusContentProviderTest {
+
+ private final DelegatingPapyrusContentProvider fixture = new DelegatingPapyrusContentProvider(TestContentProvider.example1());
+
+ /**
+ * Test for {@link DelegatingPapyrusContentProvider#getElements(java.lang.Object)}.
+ */
+ @Test
+ public void getElements_object() {
+ assertThat(fixture.getElements("foo"), is(new Object[] { "root1", "root2", "root3" }));
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#dispose()}.
+ */
+ @Test
+ public void dispose() {
+ assertThat(fixture.getElements().length, greaterThan(0));
+ fixture.dispose();
+ assertThat(fixture.getElements().length, is(0));
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#getChildren(java.lang.Object)}.
+ */
+ @Test
+ public void getChildren() {
+ assertThat(fixture.getChildren("root2"), is(new Object[] { "child2.1", "child2.2", "child2.3" }));
+ assertThat(fixture.getChildren("child2.2"), is(new Object[] { "child2.2.1", "child2.2.2" }));
+ assertThat(fixture.getChildren("bogus"), is(new Object[] {}));
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#getParent(Object)}.
+ */
+ @Test
+ public void getParent() {
+ assertThat(fixture.getParent("root2"), nullValue()); // It's a root
+ assertThat(fixture.getParent("child2.2"), is("root2"));
+ assertThat(fixture.getParent("child2.2.2"), is("child2.2"));
+ assertThat(fixture.getParent("bogus"), nullValue()); // It's not an element
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#hasChildren(java.lang.Object)}.
+ */
+ @Test
+ public void hasChildren() {
+ assertThat(fixture.hasChildren("root2"), is(true));
+ assertThat(fixture.hasChildren("child2.2"), is(true));
+ assertThat(fixture.hasChildren("child2.2.3"), is(false));
+ assertThat(fixture.hasChildren("bogus"), is(false)); // It's not an element
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#getAdaptedValue(java.lang.Object)}.
+ */
+ @Test
+ public void getAdaptedValue() {
+ assertThat(fixture.getAdaptedValue("root1"), notNullValue());
+ assertThat(fixture.getAdaptedValue("root1"), sameInstance(fixture.getAdaptedValue("root1")));
+ assertThat(fixture.getAdaptedValue("child1.2"), notNullValue());
+ assertThat(fixture.getAdaptedValue("child1.2"), not(fixture.getAdaptedValue("root1")));
+ assertThat(fixture.getAdaptedValue("bogus"), nullValue());
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#isValidValue(java.lang.Object)}.
+ */
+ @Test
+ public void isValidValue() {
+ assertThat(fixture.isValidValue("root1"), is(true));
+ assertThat(fixture.isValidValue("child1.2"), is(true));
+ assertThat(fixture.isValidValue("bogus"), is(false));
+ }
+
+ /**
+ * Test method for {@link DelegatingPapyrusContentProvider#getElements()}.
+ */
+ @Test
+ public void getElements() {
+ assertThat(fixture.getElements(), is(new Object[] { "root1", "root2", "root3" }));
+ }
+
+}
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/SemanticContentProviderFactoryTest.java b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/SemanticContentProviderFactoryTest.java
new file mode 100644
index 00000000000..89006c6b2b4
--- /dev/null
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/SemanticContentProviderFactoryTest.java
@@ -0,0 +1,106 @@
+/*****************************************************************************
+ * Copyright (c) 2016 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * CEA LIST - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.ui.providers;
+
+import static org.eclipse.papyrus.infra.ui.providers.TestContentProvider.factory1;
+import static org.eclipse.papyrus.infra.ui.providers.TestContentProvider.factory2;
+import static org.eclipse.papyrus.junit.matchers.MoreMatchers.greaterThan;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.CoreMatchers.not;
+import static org.hamcrest.CoreMatchers.notNullValue;
+import static org.hamcrest.CoreMatchers.nullValue;
+import static org.hamcrest.CoreMatchers.sameInstance;
+import static org.junit.Assert.assertThat;
+
+import org.eclipse.jface.viewers.ITreeContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+import org.junit.Test;
+
+/**
+ * Test cases for the default composed semantic content provider factory.
+ */
+public class SemanticContentProviderFactoryTest {
+
+ private ITreeContentProvider fixture = factory1().compose(factory2())
+ .createSemanticContentProvider(null); // Doesn't actually need a resource set
+
+ private IStaticContentProvider sFixture = (IStaticContentProvider) fixture;
+ private IHierarchicContentProvider hFixture = (IHierarchicContentProvider) fixture;
+ private IAdaptableContentProvider aFixture = (IAdaptableContentProvider) fixture;
+
+ @Test
+ public void getElements_Object() {
+ assertThat(fixture.getElements("foo"),
+ is(new Object[] { "root1", "root2", "root3", "A", "B", "C" }));
+ }
+
+ @Test
+ public void dispose() {
+ assertThat(sFixture.getElements().length, greaterThan(3));
+ fixture.dispose();
+ assertThat(sFixture.getElements().length, is(0));
+ }
+
+ @Test
+ public void getChildren() {
+ assertThat(fixture.getChildren("child2.2"), is(new Object[] { "child2.2.1", "child2.2.2" }));
+ assertThat(fixture.getChildren("4"), is(new Object[] { "i", "ii" }));
+ assertThat(fixture.getChildren("bogus"), is(new Object[] {}));
+ }
+
+ @Test
+ public void getParent() {
+ assertThat(fixture.getParent("root2"), nullValue()); // It's a root
+ assertThat(fixture.getParent("B"), nullValue()); // It's a root
+ assertThat(fixture.getParent("child2.2"), is("root2"));
+ assertThat(fixture.getParent("ii"), is("4"));
+ assertThat(fixture.getParent("bogus"), nullValue()); // It's not an element
+ }
+
+ @Test
+ public void hasChildren() {
+ assertThat(fixture.hasChildren("root2"), is(true));
+ assertThat(fixture.hasChildren("C"), is(true));
+ assertThat(fixture.hasChildren("child2.2"), is(true));
+ assertThat(fixture.hasChildren("4"), is(true));
+ assertThat(fixture.hasChildren("child2.2.3"), is(false));
+ assertThat(fixture.hasChildren("i"), is(false));
+ assertThat(fixture.hasChildren("bogus"), is(false)); // It's not an element
+ }
+
+ @Test
+ public void getAdaptedValue() {
+ assertThat(aFixture.getAdaptedValue("B"), notNullValue());
+ assertThat(aFixture.getAdaptedValue("B"), sameInstance(aFixture.getAdaptedValue("B")));
+ assertThat(aFixture.getAdaptedValue("4"), notNullValue());
+ assertThat(aFixture.getAdaptedValue("4"), not(aFixture.getAdaptedValue("B")));
+ assertThat(aFixture.getAdaptedValue("bogus"), is("bogus")); // Not recognized as an element
+ }
+
+ @Test
+ public void isValidValue() {
+ assertThat(hFixture.isValidValue("C"), is(true));
+ assertThat(hFixture.isValidValue("5"), is(true));
+ assertThat(hFixture.isValidValue("bogus"), is(false));
+ }
+
+ @Test
+ public void getElements() {
+ assertThat(sFixture.getElements(),
+ is(new Object[] { "root1", "root2", "root3", "A", "B", "C" }));
+ }
+
+}
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/TestContentProvider.java b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/TestContentProvider.java
new file mode 100644
index 00000000000..4ea2e90742f
--- /dev/null
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/providers/TestContentProvider.java
@@ -0,0 +1,214 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.ui.providers;
+
+import static java.util.stream.Collectors.toList;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import java.util.stream.Stream;
+
+import org.eclipse.jface.viewers.Viewer;
+import org.eclipse.papyrus.infra.widgets.providers.IAdaptableContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IHierarchicContentProvider;
+import org.eclipse.papyrus.infra.widgets.providers.IStaticContentProvider;
+
+/**
+ * Example content provider for test purposes.
+ */
+public class TestContentProvider implements IStaticContentProvider, IHierarchicContentProvider, IAdaptableContentProvider {
+
+ private static final Object[] NONE = {};
+
+ private final Map<Object, Node> nodes;
+ private final List<Object> elements;
+
+ private TestContentProvider(Node... roots) {
+ super();
+
+ this.elements = Stream.of(roots)
+ .map(Node::element)
+ .collect(toList());
+ this.nodes = Stream.of(roots).reduce(
+ new HashMap<Object, Node>(),
+ TestContentProvider::map,
+ (acc, map) -> acc);
+ }
+
+ public static TestContentProvider example1() {
+ return new TestContentProvider(
+ n("root1",
+ n("child1.1"),
+ n("child1.2")),
+ n("root2",
+ n("child2.1"),
+ n("child2.2",
+ n("child2.2.1"),
+ n("child2.2.2")),
+ n("child2.3")),
+ n("root3",
+ n("child3.1"),
+ n("child3.2")));
+ }
+
+ public static TestContentProvider example2() {
+ return new TestContentProvider(
+ n("A",
+ n("1"),
+ n("2")),
+ n("B",
+ n("3"),
+ n("4",
+ n("i"),
+ n("ii")),
+ n("5")),
+ n("C",
+ n("6"),
+ n("7")));
+ }
+
+ public static ISemanticContentProviderFactory factory1() {
+ return rset -> example1();
+ }
+
+ public static ISemanticContentProviderFactory factory2() {
+ return rset -> example2();
+ }
+
+ private static Node n(Object element, Node... children) {
+ Node result = new Node(element);
+ Stream.of(children).forEach(child -> result.add(child));
+ return result;
+ }
+
+ @Override
+ public Object[] getElements(Object inputElement) {
+ return elements.toArray();
+ }
+
+ @Override
+ public void dispose() {
+ nodes.clear();
+ elements.clear();
+ }
+
+ @Override
+ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {
+ // Pass
+ }
+
+ @Override
+ public Object[] getChildren(Object parentElement) {
+ return node(parentElement)
+ .map(Node::children)
+ .map(Collection::stream)
+ .map(s -> s.map(Node::element))
+ .map(Stream::toArray)
+ .orElse(NONE);
+ }
+
+ private Optional<Node> node(Object element) {
+ return Optional.ofNullable(nodes.get(element));
+ }
+
+ @Override
+ public Object getParent(Object element) {
+ return node(element)
+ .map(Node::parent)
+ .map(Node::element)
+ .orElse(null);
+ }
+
+ @Override
+ public boolean hasChildren(Object element) {
+ return !node(element)
+ .map(Node::children)
+ .map(Collection::isEmpty)
+ .orElse(true);
+ }
+
+ @Override
+ public Object getAdaptedValue(Object containerElement) {
+ return node(containerElement).orElse(null); // Just for something different but related
+ }
+
+ @Override
+ public boolean isValidValue(Object element) {
+ return node(element).isPresent();
+ }
+
+ @Override
+ public Object[] getElements() {
+ return elements.toArray();
+ }
+
+ static Map<Object, Node> map(Map<Object, Node> map, Node node) {
+ node.map(map);
+ return map;
+ }
+
+
+ //
+ // Nested types
+ //
+
+ private static class Node {
+ private final Object element;
+ private final List<Node> children = new ArrayList<>(3);
+ private Node parent;
+
+ Node(Object element) {
+ this(element, null);
+ }
+
+ Node(Object element, Node parent) {
+ super();
+
+ this.element = element;
+ if (parent != null) {
+ parent.add(this);
+ }
+ }
+
+ void add(Node child) {
+ child.parent = this;
+ children.add(child);
+ }
+
+ Object element() {
+ return element;
+ }
+
+ Node parent() {
+ return parent;
+ }
+
+ List<Node> children() {
+ return Collections.unmodifiableList(children);
+ }
+
+ void map(Map<Object, Node> map) {
+ map.put(element, this);
+ if (!children.isEmpty()) {
+ children.forEach(child -> child.map(map));
+ }
+ }
+
+ }
+}
diff --git a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/tests/AllTests.java b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/tests/AllTests.java
index e7eeb22c2d9..5d201a4bae4 100644
--- a/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/tests/AllTests.java
+++ b/tests/junit/plugins/infra/org.eclipse.papyrus.infra.ui.tests/src/org/eclipse/papyrus/infra/ui/tests/AllTests.java
@@ -16,6 +16,8 @@ package org.eclipse.papyrus.infra.ui.tests;
import org.eclipse.papyrus.infra.ui.contentoutline.NestedEditorDelegatedOutlinePageTest;
import org.eclipse.papyrus.infra.ui.lifecycleevents.LifeCycleEventsProviderTest;
import org.eclipse.papyrus.infra.ui.lifecycleevents.SaveAndDirtyServiceTest;
+import org.eclipse.papyrus.infra.ui.providers.DelegatingPapyrusContentProviderTest;
+import org.eclipse.papyrus.infra.ui.providers.SemanticContentProviderFactoryTest;
import org.eclipse.papyrus.infra.ui.util.UIUtilTest;
import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
import org.junit.runner.RunWith;
@@ -30,6 +32,8 @@ import org.junit.runners.Suite.SuiteClasses;
SaveAndDirtyServiceTest.class,
LifeCycleEventsProviderTest.class,
NestedEditorDelegatedOutlinePageTest.class,
+ DelegatingPapyrusContentProviderTest.class,
+ SemanticContentProviderFactoryTest.class,
})
public class AllTests {
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.classpath b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.classpath
new file mode 100644
index 00000000000..eca7bdba8f0
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+ <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/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.project b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.project
new file mode 100644
index 00000000000..fda0faedfe8
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.project
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.papyrus.infra.services.semantic.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/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.core.prefs b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 00000000000..b3aa6d60f94
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,291 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8
+org.eclipse.jdt.core.compiler.compliance=1.8
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.8
+org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_annotation=0
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_assignment=0
+org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16
+org.eclipse.jdt.core.formatter.alignment_for_compact_if=16
+org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80
+org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0
+org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16
+org.eclipse.jdt.core.formatter.alignment_for_method_declaration=0
+org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_resources_in_try=80
+org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16
+org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16
+org.eclipse.jdt.core.formatter.alignment_for_union_type_in_multicatch=16
+org.eclipse.jdt.core.formatter.blank_lines_after_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_after_package=1
+org.eclipse.jdt.core.formatter.blank_lines_before_field=0
+org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0
+org.eclipse.jdt.core.formatter.blank_lines_before_imports=1
+org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1
+org.eclipse.jdt.core.formatter.blank_lines_before_method=1
+org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1
+org.eclipse.jdt.core.formatter.blank_lines_before_package=0
+org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1
+org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1
+org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_lambda_body=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line
+org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false
+org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false
+org.eclipse.jdt.core.formatter.comment.format_block_comments=true
+org.eclipse.jdt.core.formatter.comment.format_header=false
+org.eclipse.jdt.core.formatter.comment.format_html=true
+org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true
+org.eclipse.jdt.core.formatter.comment.format_line_comments=true
+org.eclipse.jdt.core.formatter.comment.format_source_code=true
+org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true
+org.eclipse.jdt.core.formatter.comment.indent_root_tags=true
+org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert
+org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert
+org.eclipse.jdt.core.formatter.comment.line_length=260
+org.eclipse.jdt.core.formatter.comment.new_lines_at_block_boundaries=true
+org.eclipse.jdt.core.formatter.comment.new_lines_at_javadoc_boundaries=true
+org.eclipse.jdt.core.formatter.comment.preserve_white_space_between_code_and_line_comments=false
+org.eclipse.jdt.core.formatter.compact_else_if=true
+org.eclipse.jdt.core.formatter.continuation_indentation=2
+org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2
+org.eclipse.jdt.core.formatter.disabling_tag=@formatter\:off
+org.eclipse.jdt.core.formatter.enabling_tag=@formatter\:on
+org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false
+org.eclipse.jdt.core.formatter.format_line_comment_starting_on_first_column=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true
+org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true
+org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_empty_lines=false
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true
+org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true
+org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false
+org.eclipse.jdt.core.formatter.indentation.size=4
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_field=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_local_variable=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_method=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_package=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_parameter=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_annotation_on_type=insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_label=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_after_type_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert
+org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert
+org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert
+org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert
+org.eclipse.jdt.core.formatter.insert_space_after_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_try_resources=insert
+org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert
+org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_try=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_lambda_arrow=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_try=insert
+org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert
+org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert
+org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert
+org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_try_resources=do not insert
+org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert
+org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert
+org.eclipse.jdt.core.formatter.join_lines_in_comments=false
+org.eclipse.jdt.core.formatter.join_wrapped_lines=false
+org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false
+org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false
+org.eclipse.jdt.core.formatter.lineSplit=260
+org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false
+org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0
+org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=5
+org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true
+org.eclipse.jdt.core.formatter.tabulation.char=tab
+org.eclipse.jdt.core.formatter.tabulation.size=4
+org.eclipse.jdt.core.formatter.use_on_off_tags=false
+org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false
+org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true
+org.eclipse.jdt.core.formatter.wrap_before_or_operator_multicatch=true
+org.eclipse.jdt.core.formatter.wrap_outer_expressions_when_nested=true
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.ui.prefs b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 00000000000..954281dbc31
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,68 @@
+cleanup.add_default_serial_version_id=true
+cleanup.add_generated_serial_version_id=false
+cleanup.add_missing_annotations=true
+cleanup.add_missing_deprecated_annotations=true
+cleanup.add_missing_methods=false
+cleanup.add_missing_nls_tags=false
+cleanup.add_missing_override_annotations=true
+cleanup.add_missing_override_annotations_interface_methods=true
+cleanup.add_serial_version_id=false
+cleanup.always_use_blocks=true
+cleanup.always_use_parentheses_in_expressions=false
+cleanup.always_use_this_for_non_static_field_access=false
+cleanup.always_use_this_for_non_static_method_access=false
+cleanup.convert_functional_interfaces=false
+cleanup.convert_to_enhanced_for_loop=false
+cleanup.correct_indentation=false
+cleanup.format_source_code=false
+cleanup.format_source_code_changes_only=false
+cleanup.insert_inferred_type_arguments=false
+cleanup.make_local_variable_final=true
+cleanup.make_parameters_final=false
+cleanup.make_private_fields_final=true
+cleanup.make_type_abstract_if_missing_method=false
+cleanup.make_variable_declarations_final=false
+cleanup.never_use_blocks=false
+cleanup.never_use_parentheses_in_expressions=true
+cleanup.organize_imports=false
+cleanup.qualify_static_field_accesses_with_declaring_class=false
+cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+cleanup.qualify_static_member_accesses_with_declaring_class=true
+cleanup.qualify_static_method_accesses_with_declaring_class=false
+cleanup.remove_private_constructors=true
+cleanup.remove_redundant_type_arguments=true
+cleanup.remove_trailing_whitespaces=true
+cleanup.remove_trailing_whitespaces_all=true
+cleanup.remove_trailing_whitespaces_ignore_empty=false
+cleanup.remove_unnecessary_casts=true
+cleanup.remove_unnecessary_nls_tags=true
+cleanup.remove_unused_imports=true
+cleanup.remove_unused_local_variables=false
+cleanup.remove_unused_private_fields=true
+cleanup.remove_unused_private_members=false
+cleanup.remove_unused_private_methods=true
+cleanup.remove_unused_private_types=true
+cleanup.sort_members=false
+cleanup.sort_members_all=false
+cleanup.use_anonymous_class_creation=false
+cleanup.use_blocks=true
+cleanup.use_blocks_only_for_return_and_throw=false
+cleanup.use_lambda=true
+cleanup.use_parentheses_in_expressions=false
+cleanup.use_this_for_non_static_field_access=false
+cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+cleanup.use_this_for_non_static_method_access=false
+cleanup.use_this_for_non_static_method_access_only_if_necessary=true
+cleanup.use_type_arguments=false
+cleanup_profile=_Papyrus
+cleanup_settings_version=2
+eclipse.preferences.version=1
+formatter_profile=_Papyrus
+formatter_settings_version=12
+org.eclipse.jdt.ui.ignorelowercasenames=true
+org.eclipse.jdt.ui.importorder=java;javax;org;com;
+org.eclipse.jdt.ui.javadoc=true
+org.eclipse.jdt.ui.ondemandthreshold=99
+org.eclipse.jdt.ui.staticondemandthreshold=99
+org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8" standalone\="no"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\n * @return the ${bare_field_name}\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\n * @param ${param} the ${bare_field_name} to set\n */</template><template autoinsert\="false" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\n * Constructor.\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/*****************************************************************************\n * Copyright (c) ${year} CEA LIST and others.\n * \n * All rights reserved. This program and the accompanying materials\n * are made available under the terms of the Eclipse Public License v1.0\n * which accompanies this distribution, and is available at\n * http\://www.eclipse.org/legal/epl-v10.html\n *\n * Contributors\:\n * CEA LIST - Initial API and implementation\n * \n *****************************************************************************/\n</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\n * @author ${user}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\n * \n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\n * ${tags}\n */</template><template autoinsert\="false" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/**\n * ${see_to_overridden}\n *\n * ${tags}\n */</template><template autoinsert\="false" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\n * ${see_to_target}\n *\n * ${tags}\n */</template><template autoinsert\="true" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">${filecomment}\n${package_declaration}\n\n${typecomment}\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/META-INF/MANIFEST.MF b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/META-INF/MANIFEST.MF
new file mode 100644
index 00000000000..a00af98edf7
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/META-INF/MANIFEST.MF
@@ -0,0 +1,18 @@
+Manifest-Version: 1.0
+Require-Bundle: org.junit;bundle-version="4.10.0",
+ org.eclipse.papyrus.junit.framework;bundle-version="1.2.0",
+ org.eclipse.uml2.uml;bundle-version="5.0.0",
+ org.eclipse.papyrus.junit.utils;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.core;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.services.semantic;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.nattable.model;bundle-version="1.2.0",
+ org.eclipse.papyrus.uml.tools;bundle-version="1.2.0",
+ org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.2.0"
+Export-Package: org.eclipse.papyrus.infra.services.semantic.tests
+Bundle-Vendor: %providerName
+Bundle-Version: 1.2.0.qualifier
+Bundle-Name: %pluginName
+Bundle-Localization: plugin
+Bundle-ManifestVersion: 2
+Bundle-SymbolicName: org.eclipse.papyrus.infra.services.semantic.tests
+Bundle-RequiredExecutionEnvironment: JavaSE-1.8
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/about.html b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/about.html
new file mode 100644
index 00000000000..d35d5aed64c
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.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/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/build.properties b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/build.properties
new file mode 100644
index 00000000000..5cc6015defd
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/build.properties
@@ -0,0 +1,19 @@
+#
+# Copyright (c) 2016 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+#
+source.. = src/
+output.. = bin/
+bin.includes = META-INF/,\
+ .,\
+ about.html,\
+ plugin.properties,\
+ resources/
+src.includes = about.html
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/org.eclipse.papyrus.infra.services.semantic.tests.launch b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/org.eclipse.papyrus.infra.services.semantic.tests.launch
new file mode 100644
index 00000000000..80956d9b59c
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/org.eclipse.papyrus.infra.services.semantic.tests.launch
@@ -0,0 +1,44 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.pde.ui.JunitLaunchConfig">
+<booleanAttribute key="append.args" value="true"/>
+<stringAttribute key="application" value="org.eclipse.pde.junit.runtime.coretestapplication"/>
+<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-editservice-workspace"/>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/AllTests.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/>
+<booleanAttribute key="org.eclipse.jdt.junit.KEEPRUNNING_ATTR" value="false"/>
+<stringAttribute key="org.eclipse.jdt.junit.TESTNAME" value=""/>
+<stringAttribute key="org.eclipse.jdt.junit.TEST_KIND" value="org.eclipse.jdt.junit.loader.junit4"/>
+<booleanAttribute key="org.eclipse.jdt.launching.ATTR_USE_START_ON_FIRST_THREAD" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.JRE_CONTAINER" value="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.eclipse.papyrus.infra.services.semantic.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.infra.services.semantic.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 -Xms512m -Xmx1024m -DsuppressRawWhenUnchecked=true -XX:MaxPermSize=512M"/>
+<stringAttribute key="pde.version" value="3.3"/>
+<stringAttribute key="product" value="org.eclipse.sdk.ide"/>
+<booleanAttribute key="run_in_ui_thread" value="true"/>
+<booleanAttribute key="show_selected_only" value="false"/>
+<stringAttribute key="templateConfig" value="${target_home}/configuration/config.ini"/>
+<booleanAttribute key="tracing" value="false"/>
+<booleanAttribute key="useCustomFeatures" value="false"/>
+<booleanAttribute key="useDefaultConfig" value="true"/>
+<booleanAttribute key="useDefaultConfigArea" value="false"/>
+<booleanAttribute key="useProduct" value="false"/>
+</launchConfiguration>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/plugin.properties b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/plugin.properties
new file mode 100644
index 00000000000..53a66a4f6d6
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/plugin.properties
@@ -0,0 +1,13 @@
+#
+# Copyright (c) 2016 Christian W. Damus and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+#
+# Contributors:
+# Christian W. Damus - Initial API and implementation
+#
+pluginName=Papyrus Semantic Service Tests
+providerName=Eclipse Modeling Project
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/pom.xml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/pom.xml
new file mode 100644
index 00000000000..0ba7e7ab031
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/pom.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.tests.releng</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <relativePath>../../../../../../releng/main-tests</relativePath>
+ </parent>
+ <groupId>org.eclipse.papyrus</groupId>
+ <artifactId>org.eclipse.papyrus.infra.services.semantic.tests</artifactId>
+ <version>1.2.0-SNAPSHOT</version>
+ <packaging>eclipse-test-plugin</packaging>
+</project>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.di b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.di
new file mode 100644
index 00000000000..bf9abab340f
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.di
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI"/>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.notation b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.notation
new file mode 100644
index 00000000000..f104c88c1cc
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.notation
@@ -0,0 +1,328 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:configuration="http://www.eclipse.org/papyrus/infra/viewpoints/configuration" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:nattable="http://www.eclipse.org/papyrus/nattable/model" xmlns:nattableaxis="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis" xmlns:nattableaxisconfiguration="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration" xmlns:nattableaxisprovider="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider" xmlns:nattableconfiguration="http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration" xmlns:notation="http://www.eclipse.org/gmf/runtime/1.0.2/notation" xmlns:style="http://www.eclipse.org/papyrus/infra/viewpoints/policy/style" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML" xsi:schemaLocation="http://www.eclipse.org/papyrus/nattable/model/table/nattableaxis http://www.eclipse.org/papyrus/nattable/model#//nattableaxis http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableaxisconfiguration http://www.eclipse.org/papyrus/nattable/model/table/nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model#//nattableaxisprovider http://www.eclipse.org/papyrus/nattable/model/nattableconfiguration http://www.eclipse.org/papyrus/nattable/model#//nattableconfiguration">
+ <notation:Diagram xmi:id="_QOIe0L-DEeWkKLAJ7hUDZQ" type="PapyrusUMLClassDiagram" name="Class Diagram" measurementUnit="Pixel">
+ <children xmi:type="notation:Shape" xmi:id="_SAgbYL-DEeWkKLAJ7hUDZQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SAqzcL-DEeWkKLAJ7hUDZQ" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SAqzcb-DEeWkKLAJ7hUDZQ" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SAqzcr-DEeWkKLAJ7hUDZQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SAvr8L-DEeWkKLAJ7hUDZQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SAvr8b-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SAvr8r-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SAvr87-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SAvr9L-DEeWkKLAJ7hUDZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SAvr9b-DEeWkKLAJ7hUDZQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SAvr9r-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SAvr97-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SAvr-L-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SAvr-b-DEeWkKLAJ7hUDZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SAwTAL-DEeWkKLAJ7hUDZQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SAwTAb-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SAwTAr-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SAwTA7-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SAwTBL-DEeWkKLAJ7hUDZQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_SAQjwL-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SAhCcL-DEeWkKLAJ7hUDZQ" x="58" y="67"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_SrPacL-DEeWkKLAJ7hUDZQ" type="2008">
+ <children xmi:type="notation:DecorationNode" xmi:id="_SrQokL-DEeWkKLAJ7hUDZQ" type="5029"/>
+ <children xmi:type="notation:DecorationNode" xmi:id="_SrQokb-DEeWkKLAJ7hUDZQ" type="8510">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_SrQokr-DEeWkKLAJ7hUDZQ" y="5"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SrRPoL-DEeWkKLAJ7hUDZQ" type="7017">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SrRPob-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SrRPor-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SrRPo7-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SrRPpL-DEeWkKLAJ7hUDZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SrRPpb-DEeWkKLAJ7hUDZQ" type="7018">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SrRPpr-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SrRPp7-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SrRPqL-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SrRPqb-DEeWkKLAJ7hUDZQ"/>
+ </children>
+ <children xmi:type="notation:BasicCompartment" xmi:id="_SrRPqr-DEeWkKLAJ7hUDZQ" type="7019">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_SrRPq7-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:SortingStyle" xmi:id="_SrRPrL-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:FilteringStyle" xmi:id="_SrRPrb-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SrRPrr-DEeWkKLAJ7hUDZQ"/>
+ </children>
+ <element xmi:type="uml:Class" href="model.uml#_SrM-ML-DEeWkKLAJ7hUDZQ"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_SrPacb-DEeWkKLAJ7hUDZQ" x="252" y="190"/>
+ </children>
+ <children xmi:type="notation:Shape" xmi:id="_TWh2UL-HEeWkKLAJ7hUDZQ" type="StereotypeComment">
+ <styles xmi:type="notation:TitleStyle" xmi:id="_TWh2Ub-HEeWkKLAJ7hUDZQ" showTitle="true"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_TWjrgL-HEeWkKLAJ7hUDZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_SrM-ML-DEeWkKLAJ7hUDZQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <layoutConstraint xmi:type="notation:Bounds" xmi:id="_TWh2Ur-HEeWkKLAJ7hUDZQ" x="452" y="190"/>
+ </children>
+ <styles xmi:type="notation:StringValueStyle" xmi:id="_QOIe0b-DEeWkKLAJ7hUDZQ" name="diagram_compatibility_version" stringValue="1.1.0"/>
+ <styles xmi:type="notation:DiagramStyle" xmi:id="_QOIe0r-DEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="style:PapyrusViewStyle" xmi:id="_QOIe07-DEeWkKLAJ7hUDZQ">
+ <owner xmi:type="uml:Model" href="model.uml#_QIjbQL-DEeWkKLAJ7hUDZQ"/>
+ </styles>
+ <element xmi:type="uml:Model" href="model.uml#_QIjbQL-DEeWkKLAJ7hUDZQ"/>
+ <edges xmi:type="notation:Connector" xmi:id="_TXk8AL-DEeWkKLAJ7hUDZQ" type="4001" source="_SAgbYL-DEeWkKLAJ7hUDZQ" target="_SrPacL-DEeWkKLAJ7hUDZQ">
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXljEL-DEeWkKLAJ7hUDZQ" type="6001">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TXljEb-DEeWkKLAJ7hUDZQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXljEr-DEeWkKLAJ7hUDZQ" type="6002">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TXljE7-DEeWkKLAJ7hUDZQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXljFL-DEeWkKLAJ7hUDZQ" type="6003">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TXljFb-DEeWkKLAJ7hUDZQ" y="-20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXljFr-DEeWkKLAJ7hUDZQ" type="6005">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TXljF7-DEeWkKLAJ7hUDZQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXljGL-DEeWkKLAJ7hUDZQ" type="6033">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TXljGb-DEeWkKLAJ7hUDZQ" y="20"/>
+ </children>
+ <children xmi:type="notation:DecorationNode" xmi:id="_TXljGr-DEeWkKLAJ7hUDZQ" type="6034">
+ <layoutConstraint xmi:type="notation:Location" xmi:id="_TXljG7-DEeWkKLAJ7hUDZQ" y="-20"/>
+ </children>
+ <styles xmi:type="notation:FontStyle" xmi:id="_TXk8Ab-DEeWkKLAJ7hUDZQ"/>
+ <element xmi:type="uml:Association" href="model.uml#_TXHpAL-DEeWkKLAJ7hUDZQ"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_TXk8Ar-DEeWkKLAJ7hUDZQ" points="[126, 167, -643984, -643984]$[252, 219, -643984, -643984]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_TZLegL-DEeWkKLAJ7hUDZQ" id="(0.6800000000000002,1.0)"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_TZLegb-DEeWkKLAJ7hUDZQ" id="(0.0,0.29919999999999985)"/>
+ </edges>
+ <edges xmi:type="notation:Connector" xmi:id="_TWkSkL-HEeWkKLAJ7hUDZQ" type="StereotypeCommentLink" source="_SrPacL-DEeWkKLAJ7hUDZQ" target="_TWh2UL-HEeWkKLAJ7hUDZQ">
+ <styles xmi:type="notation:FontStyle" xmi:id="_TWkSkb-HEeWkKLAJ7hUDZQ"/>
+ <styles xmi:type="notation:EObjectValueStyle" xmi:id="_TWk5oL-HEeWkKLAJ7hUDZQ" name="BASE_ELEMENT">
+ <eObjectValue xmi:type="uml:Class" href="model.uml#_SrM-ML-DEeWkKLAJ7hUDZQ"/>
+ </styles>
+ <element xsi:nil="true"/>
+ <bendpoints xmi:type="notation:RelativeBendpoints" xmi:id="_TWkSkr-HEeWkKLAJ7hUDZQ" points="[0, 0, 0, 0]$[0, 0, 0, 0]"/>
+ <sourceAnchor xmi:type="notation:IdentityAnchor" xmi:id="_TWkSk7-HEeWkKLAJ7hUDZQ"/>
+ <targetAnchor xmi:type="notation:IdentityAnchor" xmi:id="_TWkSlL-HEeWkKLAJ7hUDZQ"/>
+ </edges>
+ </notation:Diagram>
+ <nattable:Table xmi:id="_ZVSQkL-DEeWkKLAJ7hUDZQ" name="classes table" currentRowAxisProvider="_ZVSQkr-DEeWkKLAJ7hUDZQ" currentColumnAxisProvider="_ZVSQkb-DEeWkKLAJ7hUDZQ">
+ <context xmi:type="uml:Model" href="model.uml#_QIjbQL-DEeWkKLAJ7hUDZQ"/>
+ <owner xmi:type="uml:Model" href="model.uml#_QIjbQL-DEeWkKLAJ7hUDZQ"/>
+ <prototype xmi:type="configuration:PapyrusSyncTable" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/genericTable.configuration#_Uz8agHDuEeWh-MssWmCB_A"/>
+ <tableConfiguration xmi:type="nattableconfiguration:TableConfiguration" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#/"/>
+ <columnAxisProvidersHistory xmi:type="nattableaxisprovider:SlaveObjectAxisProvider" xmi:id="_ZVSQkb-DEeWkKLAJ7hUDZQ" description="This axis provider provides available columns according to the rows of the table (features of the object displayed on the other axis)" name="UML Feature axis provider">
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalEL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/attribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalEb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/name"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalEr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//EncapsulatedClassifier/ownedPort"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalE7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//RedefinableElement/redefinedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalFL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/isFinalSpecialization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalFb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedElement"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalFr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/inheritedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalF7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/qualifiedName"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalGL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/interfaceRealization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalGb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//TemplateableElement/templateBinding"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalGr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedAttribute"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalG7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/classifierBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalHL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/nameExpression"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalHb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/powertypeExtent"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalHr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/isActive"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalH7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/namespace"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalIL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/generalization"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalIb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//TemplateableElement/ownedTemplateSignature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalIr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/ownedUseCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalI7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//ParameterableElement/templateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalJL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/owner"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalJb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/clientDependency"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalJr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//RedefinableElement/isLeaf"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalJ7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/superClass"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalKL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedOperation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalKb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//ParameterableElement/owningTemplateParameter"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalKr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/importedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalK7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/packageImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalLL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//RedefinableElement/redefinitionContext"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalLb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Type/package"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalLr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/isAbstract"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalL7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedRule"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalML-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/ownedConnector"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalMb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/nestedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalMr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/extension"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalM7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/feature"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalNL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/elementImport"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalNb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//BehavioredClassifier/ownedBehavior"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalNr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/general"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalN7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/useCase"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalOL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Element/ownedComment"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalOb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EAttribute" href="http://www.eclipse.org/uml2/5.0.0/UML#//NamedElement/visibility"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalOr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/member"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalO7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/collaborationUse"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalPL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/representation"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalPb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/role"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalPr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Namespace/ownedMember"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalP7-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/redefinedClassifier"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalQL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//StructuredClassifier/part"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalQb-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Class/ownedReception"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EStructuralFeatureAxis" xmi:id="_cJalQr-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@columnHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="ecore:EReference" href="http://www.eclipse.org/uml2/5.0.0/UML#//Classifier/substitution"/>
+ </axis>
+ </columnAxisProvidersHistory>
+ <rowAxisProvidersHistory xmi:type="nattableaxisprovider:MasterObjectAxisProvider" xmi:id="_ZVSQkr-DEeWkKLAJ7hUDZQ" description="This axis provider contains the object dropped by the user into the table" name="DroppedElementAxisProvider">
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_cJVFgL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="model.uml#_SAQjwL-DEeWkKLAJ7hUDZQ"/>
+ </axis>
+ <axis xmi:type="nattableaxis:EObjectAxis" xmi:id="_cJVskL-DEeWkKLAJ7hUDZQ">
+ <manager xmi:type="nattableaxisconfiguration:AxisManagerRepresentation" href="platform:/plugin/org.eclipse.papyrus.uml.nattable.generic.config/configs/generic.nattableconfiguration#//@rowHeaderAxisConfiguration/@axisManagers.0"/>
+ <element xmi:type="uml:Class" href="model.uml#_SrM-ML-DEeWkKLAJ7hUDZQ"/>
+ </axis>
+ </rowAxisProvidersHistory>
+ </nattable:Table>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.uml b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.uml
new file mode 100644
index 00000000000..bc143044733
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/resources/model.uml
@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xmi:XMI xmi:version="20131001" xmlns:xmi="http://www.omg.org/spec/XMI/20131001" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:standard="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard" xmlns:uml="http://www.eclipse.org/uml2/5.0.0/UML">
+ <uml:Model xmi:id="_QIjbQL-DEeWkKLAJ7hUDZQ" name="model">
+ <packageImport xmi:type="uml:PackageImport" xmi:id="_QggoQL-DEeWkKLAJ7hUDZQ">
+ <importedPackage xmi:type="uml:Model" href="pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#_0"/>
+ </packageImport>
+ <packagedElement xmi:type="uml:Class" xmi:id="_SAQjwL-DEeWkKLAJ7hUDZQ" name="Class1">
+ <ownedAttribute xmi:type="uml:Property" xmi:id="_TXL6cL-DEeWkKLAJ7hUDZQ" name="class2" type="_SrM-ML-DEeWkKLAJ7hUDZQ" association="_TXHpAL-DEeWkKLAJ7hUDZQ"/>
+ </packagedElement>
+ <packagedElement xmi:type="uml:Class" xmi:id="_SrM-ML-DEeWkKLAJ7hUDZQ" name="Class2"/>
+ <packagedElement xmi:type="uml:Association" xmi:id="_TXHpAL-DEeWkKLAJ7hUDZQ" memberEnd="_TXL6cL-DEeWkKLAJ7hUDZQ _TXL6cb-DEeWkKLAJ7hUDZQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_TXKsUL-DEeWkKLAJ7hUDZQ" source="org.eclipse.papyrus">
+ <details xmi:type="ecore:EStringToStringMapEntry" xmi:id="_TXKsUb-DEeWkKLAJ7hUDZQ" key="nature" value="UML_Nature"/>
+ </eAnnotations>
+ <ownedEnd xmi:type="uml:Property" xmi:id="_TXL6cb-DEeWkKLAJ7hUDZQ" name="class1" type="_SAQjwL-DEeWkKLAJ7hUDZQ" association="_TXHpAL-DEeWkKLAJ7hUDZQ"/>
+ </packagedElement>
+ <profileApplication xmi:type="uml:ProfileApplication" xmi:id="_Q32NYL-HEeWkKLAJ7hUDZQ">
+ <eAnnotations xmi:type="ecore:EAnnotation" xmi:id="_Q353wL-HEeWkKLAJ7hUDZQ" source="http://www.eclipse.org/uml2/2.0.0/UML">
+ <references xmi:type="ecore:EPackage" href="http://www.eclipse.org/uml2/5.0.0/UML/Profile/Standard#/"/>
+ </eAnnotations>
+ <appliedProfile xmi:type="uml:Profile" href="pathmap://UML_PROFILES/Standard.profile.uml#_0"/>
+ </profileApplication>
+ </uml:Model>
+ <standard:Auxiliary xmi:id="_TV9OkL-HEeWkKLAJ7hUDZQ" base_Class="_SrM-ML-DEeWkKLAJ7hUDZQ"/>
+</xmi:XMI>
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/AllTests.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/AllTests.java
new file mode 100644
index 00000000000..797cdd3286b
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/AllTests.java
@@ -0,0 +1,27 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.services.semantic.tests;
+
+import org.eclipse.papyrus.junit.framework.classification.ClassificationSuite;
+import org.junit.runner.RunWith;
+import org.junit.runners.Suite.SuiteClasses;
+
+/**
+ * The master test suite for the plug-in.
+ */
+@RunWith(ClassificationSuite.class)
+@SuiteClasses(SemanticServiceTest.class)
+public class AllTests {
+ // Nothing required
+}
diff --git a/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/SemanticServiceTest.java b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/SemanticServiceTest.java
new file mode 100644
index 00000000000..deda3f4dc90
--- /dev/null
+++ b/tests/junit/plugins/infra/services/org.eclipse.papyrus.infra.services.semantic.tests/src/org/eclipse/papyrus/infra/services/semantic/tests/SemanticServiceTest.java
@@ -0,0 +1,101 @@
+/*****************************************************************************
+ * Copyright (c) 2016 Christian W. Damus and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Christian W. Damus - Initial API and implementation
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.infra.services.semantic.tests;
+
+import static org.hamcrest.CoreMatchers.hasItem;
+import static org.hamcrest.CoreMatchers.instanceOf;
+import static org.hamcrest.CoreMatchers.not;
+import static org.junit.Assert.assertThat;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.Diagram;
+import org.eclipse.papyrus.infra.core.resource.IModel;
+import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
+import org.eclipse.papyrus.infra.nattable.model.nattable.Table;
+import org.eclipse.papyrus.infra.services.semantic.service.SemanticService;
+import org.eclipse.papyrus.junit.utils.rules.ModelSetFixture;
+import org.eclipse.papyrus.junit.utils.rules.PluginResource;
+import org.eclipse.papyrus.junit.utils.rules.ServiceRegistryModelSetFixture;
+import org.eclipse.papyrus.uml.tools.model.UmlModel;
+import org.eclipse.uml2.uml.Model;
+import org.eclipse.uml2.uml.Profile;
+import org.eclipse.uml2.uml.util.UMLUtil;
+import org.hamcrest.BaseMatcher;
+import org.hamcrest.Description;
+import org.hamcrest.Matcher;
+import org.junit.ClassRule;
+import org.junit.Test;
+
+/**
+ * Tests for the Semantic Service.
+ */
+@PluginResource("resources/model.di")
+public class SemanticServiceTest {
+
+ @ClassRule
+ public static final ModelSetFixture fixture = new ServiceRegistryModelSetFixture();
+
+ @Test
+ public void getSemanticRoots() {
+ SemanticService service = fixture.requireService(SemanticService.class);
+ List<EObject> roots = Arrays.asList(service.getSemanticRoots());
+
+ // This is semantic content
+ assertThat(roots, hasItem(instanceOf(Model.class)));
+ assertThat(roots, hasItem(instanceOf(Profile.class)));
+
+ // Stereotype applications are semantic content, but not roots
+ assertThat(roots, not(hasItem(isStereotypeApplication())));
+
+ // Notation views are not semantic content
+ assertThat(roots, not(hasItem(instanceOf(Diagram.class))));
+ assertThat(roots, not(hasItem(instanceOf(Table.class))));
+ }
+
+ @Test
+ public void getSemanticIModels() {
+ SemanticService service = fixture.requireService(SemanticService.class);
+ List<String> modelIDs = Stream.of(service.getSemanticIModels())
+ .map(IModel::getIdentifier)
+ .collect(Collectors.toList());
+
+ assertThat(modelIDs, hasItem(UmlModel.MODEL_ID));
+
+ assertThat(modelIDs, not(hasItem(NotationModel.MODEL_ID)));
+ }
+
+ //
+ // Test framework
+ //
+
+ static Matcher<EObject> isStereotypeApplication() {
+ return new BaseMatcher<EObject>() {
+ @Override
+ public void describeTo(Description description) {
+ description.appendText("is stereotype application");
+ }
+
+ @Override
+ public boolean matches(Object item) {
+ return (item instanceof EObject) && (UMLUtil.getStereotype((EObject) item) != null);
+ }
+ };
+ }
+
+}
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
index 1c635e3aa69..c4bbc371846 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/AbstractModelFixture.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014, 2015 CEA, Christian W. Damus, and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,10 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
- * Christian W. Damus - bug 399859
- * Christian W. Damus - bug 451230
- * Christian W. Damus - bug 458685
- * Christian W. Damus - bug 469188
+ * Christian W. Damus - bugs 399859, 451230, 458685, 469188, 485220
*
*/
package org.eclipse.papyrus.junit.utils.rules;
@@ -107,6 +104,8 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
private T domain;
+ private EObject root;
+
private Package model;
private Class<?> testClass;
@@ -189,6 +188,15 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
}
/**
+ * Obtains the first root of the main test resource.
+ *
+ * @return the first test resource root
+ */
+ public EObject getRoot() {
+ return root;
+ }
+
+ /**
* Obtains the test model, which is resident in the <tt>model.uml</tt> file in the test project (as indicated by its {@linkplain #getModelResourceURI() URI}).
*
* @return the test model
@@ -198,7 +206,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
}
public Resource getModelResource() {
- return getModel().eResource();
+ return getRoot().eResource();
}
public URI getModelResourceURI() {
@@ -206,7 +214,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
}
public URI getModelURI() {
- return EcoreUtil.getURI(getModel());
+ return EcoreUtil.getURI(getRoot());
}
protected abstract T createEditingDomain();
@@ -218,7 +226,10 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
Resource main = Iterables.getFirst(initModelResources(description), null);
assertThat("No main UML resource in model fixture", main, notNullValue());
- model = (Package) main.getContents().get(0);
+ root = main.getContents().get(0);
+ if (root instanceof Package) {
+ model = (Package) root;
+ }
// We have finished initializing
initialResourceURIs = null;
@@ -509,6 +520,7 @@ public abstract class AbstractModelFixture<T extends EditingDomain> extends Test
initialResourceURIs = null;
model = null;
+ root = null;
if (domain instanceof TransactionalEditingDomain) {
((TransactionalEditingDomain) domain).dispose();
diff --git a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java
index f8477d18d74..65a8fbc9152 100644
--- a/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java
+++ b/tests/junit/plugins/junit/org.eclipse.papyrus.junit.utils/src/org/eclipse/papyrus/junit/utils/rules/ModelSetFixture.java
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2014 CEA, Christian W. Damus, and others.
+ * Copyright (c) 2014, 2016 CEA, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -8,7 +8,7 @@
*
* Contributors:
* Christian W. Damus (CEA) - Initial API and implementation
- * Christian W. Damus - bug 399859
+ * Christian W. Damus - bugs 399859, 485220
*
*/
package org.eclipse.papyrus.junit.utils.rules;
@@ -16,6 +16,7 @@ package org.eclipse.papyrus.junit.utils.rules;
import static org.junit.Assert.fail;
import java.util.Collections;
+import java.util.regex.Pattern;
import org.eclipse.emf.ecore.resource.ResourceSet;
import org.eclipse.emf.transaction.TransactionalEditingDomain;
@@ -24,6 +25,7 @@ import org.eclipse.papyrus.infra.core.resource.ModelMultiException;
import org.eclipse.papyrus.infra.core.resource.ModelSet;
import org.eclipse.papyrus.infra.core.services.ServiceDescriptor;
import org.eclipse.papyrus.infra.core.services.ServiceDescriptor.ServiceTypeKind;
+import org.eclipse.papyrus.infra.core.services.ServiceException;
import org.eclipse.papyrus.infra.core.services.ServiceStartKind;
import org.eclipse.papyrus.infra.core.services.ServicesRegistry;
import org.eclipse.papyrus.infra.emf.utils.ServiceUtilsForResourceSet;
@@ -90,9 +92,36 @@ public class ModelSetFixture extends AbstractModelFixture<TransactionalEditingDo
try {
getResourceSet().loadModels(getModelResourceURI());
} catch (ModelMultiException e) {
- e.printStackTrace();
+ // Is the problem only a missing model resource?
+ Pattern missingResource = Pattern.compile("ResourceException: Resource '.*' does not exist."); //$NON-NLS-1$
+ for (Throwable next : e.getExceptions()) {
+ if ((next.getMessage() == null) || !missingResource.matcher(next.getMessage()).find()) {
+ e.printStackTrace();
+
+ fail("Failed to initialize ModelSet fixture: " + e.getLocalizedMessage());
+ }
+ }
+ }
+ }
- fail("Failed to initialize ModelSet fixture: " + e.getLocalizedMessage());
+ public final <S> S tryService(Class<S> serviceType) {
+ try {
+ ServicesRegistry services = ServiceUtilsForResourceSet.getInstance().getServiceRegistry(getResourceSet());
+ return services.getService(serviceType);
+ } catch (ServiceException e) {
+ // Okay, no such service
+ return null; // unreachable
+ }
+ }
+
+ public final <S> S requireService(Class<S> serviceType) {
+ try {
+ ServicesRegistry services = ServiceUtilsForResourceSet.getInstance().getServiceRegistry(getResourceSet());
+ return services.getService(serviceType);
+ } catch (ServiceException e) {
+ e.printStackTrace();
+ fail("Failed to initialize service registry and/or service: " + e.getLocalizedMessage());
+ return null; // unreachable
}
}
}

Back to the top