Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/.project28
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs7
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF36
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties3
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/about.html106
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties11
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc12
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml41
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet189
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java69
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java227
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java57
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java93
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java43
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties8
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java47
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java34
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java34
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java74
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java76
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java75
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java137
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java37
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java90
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java20
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java22
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java19
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java21
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java49
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java229
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java29
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java62
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java235
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java582
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java345
-rw-r--r--deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java170
65 files changed, 0 insertions, 3890 deletions
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath b/deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath
deleted file mode 100644
index 8031177be12..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/.classpath
+++ /dev/null
@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
- <classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
- <classpathentry excluding="org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java" kind="src" path="src"/>
- <classpathentry kind="output" path="bin"/>
-</classpath>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/.project b/deprecated/org.eclipse.papyrus.uml.profilefacet/.project
deleted file mode 100644
index ac03ef4651b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/.project
+++ /dev/null
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
- <name>org.eclipse.papyrus.uml.profilefacet</name>
- <comment></comment>
- <projects>
- </projects>
- <buildSpec>
- <buildCommand>
- <name>org.eclipse.jdt.core.javabuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.ManifestBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- <buildCommand>
- <name>org.eclipse.pde.SchemaBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
- </buildSpec>
- <natures>
- <nature>org.eclipse.pde.PluginNature</nature>
- <nature>org.eclipse.jdt.core.javanature</nature>
- </natures>
-</projectDescription>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs b/deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs
deleted file mode 100644
index 44217f8c068..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/.settings/org.eclipse.jdt.core.prefs
+++ /dev/null
@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.5
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF b/deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF
deleted file mode 100644
index 1a89f31de42..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,36 +0,0 @@
-Manifest-Version: 1.0
-Require-Bundle: org.eclipse.ui,
- org.eclipse.papyrus.infra.core.log;bundle-version="1.0.0",
- org.eclipse.uml2.uml,
- org.eclipse.emf.facet.infra.query.core,
- org.eclipse.papyrus.uml.profilefacet.metamodel;bundle-version="1.0.0",
- org.eclipse.emf.facet.infra.common.core;bundle-version="0.2.1",
- org.eclipse.papyrus.uml.tools.utils;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.commands;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.emf.commands.core,
- org.eclipse.emf.facet.infra.facet.core,
- org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.emf;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.table.instance;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.gmfdiag.common;bundle-version="1.0.0",
- org.eclipse.emf.facet.widgets.nattable.instance,
- org.eclipse.papyrus.infra.services.controlmode;bundle-version="1.0.0",
- com.google.guava;bundle-version="11.0.0",
- org.eclipse.papyrus.infra.table.controlmode;bundle-version="1.0.0",
- org.eclipse.papyrus.infra.services.edit;bundle-version="1.0.0",
- org.eclipse.gmf.runtime.emf.type.core;bundle-version="1.7.0"
-Export-Package: org.eclipse.papyrus.uml.profilefacet.queries.getter,
- org.eclipse.papyrus.uml.profilefacet.queries.registry,
- org.eclipse.papyrus.uml.profilefacet.queries.setter,
- org.eclipse.papyrus.uml.profilefacet.queries.tester,
- org.eclipse.papyrus.uml.profilefacet.utils
-Bundle-Vendor: %Bundle-Vendor
-Bundle-ActivationPolicy: lazy
-Bundle-Version: 1.0.0.qualifier
-Bundle-Name: %Bundle-Name
-Bundle-ManifestVersion: 2
-Bundle-Activator: org.eclipse.papyrus.uml.profilefacet.Activator
-Bundle-SymbolicName: org.eclipse.papyrus.uml.profilefacet;singleton:=t
- rue
-Bundle-RequiredExecutionEnvironment: J2SE-1.5
-
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties
deleted file mode 100644
index 75497b08193..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/OSGI-INF/l10n/bundle.properties
+++ /dev/null
@@ -1,3 +0,0 @@
-#Properties file for org.eclipse.papyrus.uml.profilefacet
-Bundle-Vendor = Eclipse Modeling Project
-Bundle-Name = UML Profilefacet (Incubation) \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/about.html b/deprecated/org.eclipse.papyrus.uml.profilefacet/about.html
deleted file mode 100644
index 34ab520eed4..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/about.html
+++ /dev/null
@@ -1,106 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
-<title>Eclipse Foundation Software User Agreement</title>
-</head>
-
-<body lang="EN-US">
-<h2>Eclipse Foundation Software User Agreement</h2>
-<p>April 14, 2010</p>
-
-<h3>Usage Of Content</h3>
-
-<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
- (COLLECTIVELY &quot;CONTENT&quot;). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
- CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
- OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
- NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
- CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
-
-<h3>Applicable Licenses</h3>
-
-<p>Unless otherwise indicated, all Content made available by the Eclipse Foundation is provided to you under the terms and conditions of the Eclipse Public License Version 1.0
- (&quot;EPL&quot;). A copy of the EPL is provided with this Content and is also available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
- For purposes of the EPL, &quot;Program&quot; will mean the Content.</p>
-
-<p>Content includes, but is not limited to, source code, object code, documentation and other files maintained in the Eclipse Foundation source code
- repository (&quot;Repository&quot;) in software modules (&quot;Modules&quot;) and made available as downloadable archives (&quot;Downloads&quot;).</p>
-
-<ul>
- <li>Content may be structured and packaged into modules to facilitate delivering, extending, and upgrading the Content. Typical modules may include plug-ins (&quot;Plug-ins&quot;), plug-in fragments (&quot;Fragments&quot;), and features (&quot;Features&quot;).</li>
- <li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java&trade; ARchive) in a directory named &quot;plugins&quot;.</li>
- <li>A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material. Each Feature may be packaged as a sub-directory in a directory named &quot;features&quot;. Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of the Plug-ins
- and/or Fragments associated with that Feature.</li>
- <li>Features may also include other Features (&quot;Included Features&quot;). Within a Feature, files named &quot;feature.xml&quot; may contain a list of the names and version numbers of Included Features.</li>
-</ul>
-
-<p>The terms and conditions governing Plug-ins and Fragments should be contained in files named &quot;about.html&quot; (&quot;Abouts&quot;). The terms and conditions governing Features and
-Included Features should be contained in files named &quot;license.html&quot; (&quot;Feature Licenses&quot;). Abouts and Feature Licenses may be located in any directory of a Download or Module
-including, but not limited to the following locations:</p>
-
-<ul>
- <li>The top-level (root) directory</li>
- <li>Plug-in and Fragment directories</li>
- <li>Inside Plug-ins and Fragments packaged as JARs</li>
- <li>Sub-directories of the directory named &quot;src&quot; of certain Plug-ins</li>
- <li>Feature directories</li>
-</ul>
-
-<p>Note: if a Feature made available by the Eclipse Foundation is installed using the Provisioning Technology (as defined below), you must agree to a license (&quot;Feature Update License&quot;) during the
-installation process. If the Feature contains Included Features, the Feature Update License should either provide you with the terms and conditions governing the Included Features or
-inform you where you can locate them. Feature Update Licenses may be found in the &quot;license&quot; property of files named &quot;feature.properties&quot; found within a Feature.
-Such Abouts, Feature Licenses, and Feature Update Licenses contain the terms and conditions (or references to such terms and conditions) that govern your use of the associated Content in
-that directory.</p>
-
-<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS. SOME OF THESE
-OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
-
-<ul>
- <li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
- <li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
- <li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
- <li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
- <li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
-</ul>
-
-<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License is provided, please
-contact the Eclipse Foundation to determine what terms and conditions govern that particular Content.</p>
-
-
-<h3>Use of Provisioning Technology</h3>
-
-<p>The Eclipse Foundation makes available provisioning software, examples of which include, but are not limited to, p2 and the Eclipse
- Update Manager (&quot;Provisioning Technology&quot;) for the purpose of allowing users to install software, documentation, information and/or
- other materials (collectively &quot;Installable Software&quot;). This capability is provided with the intent of allowing such users to
- install, extend and update Eclipse-based products. Information about packaging Installable Software is available at <a
- href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
- (&quot;Specification&quot;).</p>
-
-<p>You may use Provisioning Technology to allow other parties to install Installable Software. You shall be responsible for enabling the
- applicable license agreements relating to the Installable Software to be presented to, and accepted by, the users of the Provisioning Technology
- in accordance with the Specification. By using Provisioning Technology in such a manner and making it available in accordance with the
- Specification, you further acknowledge your agreement to, and the acquisition of all necessary rights to permit the following:</p>
-
-<ol>
- <li>A series of actions may occur (&quot;Provisioning Process&quot;) in which a user may execute the Provisioning Technology
- on a machine (&quot;Target Machine&quot;) with the intent of installing, extending or updating the functionality of an Eclipse-based
- product.</li>
- <li>During the Provisioning Process, the Provisioning Technology may cause third party Installable Software or a portion thereof to be
- accessed and copied to the Target Machine.</li>
- <li>Pursuant to the Specification, you will provide to the user the terms and conditions that govern the use of the Installable
- Software (&quot;Installable Software Agreement&quot;) and such Installable Software Agreement shall be accessed from the Target
- Machine in accordance with the Specification. Such Installable Software Agreement must inform the user of the terms and conditions that govern
- the Installable Software and must solicit acceptance by the end user in the manner prescribed in such Installable Software Agreement. Upon such
- indication of agreement by the user, the provisioning Technology will complete installation of the Installable Software.</li>
-</ol>
-
-<h3>Cryptography</h3>
-
-<p>Content may contain encryption software. The country in which you are currently may have restrictions on the import, possession, and use, and/or re-export to
- another country, of encryption software. BEFORE using any encryption software, please check the country's laws, regulations and policies concerning the import,
- possession, or use, and re-export of encryption software, to see if this is permitted.</p>
-
-<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
-</body>
-</html> \ No newline at end of file
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties
deleted file mode 100644
index 873b1f3d4d8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/build.properties
+++ /dev/null
@@ -1,11 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
- .,\
- plugin.xml,\
- resources/,\
- OSGI-INF/,\
- about.html,\
- plugin.pdoc,\
- build.properties
-src.includes = about.html
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc b/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc
deleted file mode 100644
index 7f68b8c1e49..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.pdoc
+++ /dev/null
@@ -1,12 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<doc:Documentation
- xmi:version="2.0"
- xmlns:xmi="http://www.omg.org/XMI"
- xmlns:doc="http://www.eclipse.org/papyrus/documentation/plugin/documentation"
- description="This plugins provides useful classes for profilefacet elements">
- <referent
- firstName="vincent"
- lastName="lorenzo"
- eMail="vincent.lorenzo@cea.fr"
- currentCompany="CEA-LIST"/>
-</doc:Documentation>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml b/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml
deleted file mode 100644
index b8b515f2c62..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/plugin.xml
+++ /dev/null
@@ -1,41 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?eclipse version="3.4"?>
-
-<plugin>
- <extension point="org.eclipse.emf.facet.infra.query.registration">
- <modelqueryset file="resources/uml_stereotype_queries.querySet"/>
- </extension>
- <extension
- point="org.eclipse.emf.transaction.listeners">
- <listener
- class="org.eclipse.papyrus.uml.profilefacet.listener.ReapplyProfileTriggerListener">
- </listener>
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.emf.type.core.elementTypes">
- <metamodel
- nsURI="http://www.eclipse.org/Papyrus/Table/0.8.0/papyrustableinstance">
- <adviceBinding
- class="org.eclipse.papyrus.uml.profilefacet.advice.DeleteProfileFacetSetAdvice"
- id="org.eclipse.papyrus.uml.profilefacet.advice.DeleteProfileFacetSetAdvice"
- inheritance="all"
- typeId="*">
- </adviceBinding>
- </metamodel>
- </extension>
- <extension
- point="org.eclipse.gmf.runtime.emf.type.core.elementTypeBindings">
- <binding
- context="org.eclipse.papyrus.infra.services.edit.TypeContext">
- <elementType
- ref="org.eclipse.papyrus.uml.profilefacet.advice.DeleteProfileFacetSetAdvice">
- </elementType>
- </binding>
- </extension>
- <extension
- point="org.eclipse.papyrus.infra.services.controlmode.participant">
- <participant
- class="org.eclipse.papyrus.uml.profilefacet.controlmode.ProfileFacetSetControlParticipant">
- </participant>
- </extension>
-</plugin>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet b/deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet
deleted file mode 100644
index 9dcc15672ad..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/resources/uml_stereotype_queries.querySet
+++ /dev/null
@@ -1,189 +0,0 @@
-<?xml version="1.0" encoding="ASCII"?>
-<query:ModelQuerySet xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ecore="http://www.eclipse.org/emf/2002/Ecore" xmlns:query="http://www.eclipse.org/EmfFacet/infra/query/0.8.incubation" name="uml_stereotype_queries" description="">
- <associatedMetamodels href="http://www.eclipse.org/emf/2002/Ecore#/"/>
- <associatedMetamodels href="http://www.eclipse.org/uml2/4.0.0/UML#/"/>
- <queries xsi:type="query:JavaModelQuery" name="getBooleanMultiValue" description="Returns a multi value on Boolean for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetBooleanMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getBooleanSingleValue" description="Returns a single value on Boolean for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetBooleanSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getDatatypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetDatatypeMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getDatatypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetDatatypeSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getEObjectMultiReferenceValue" description="Returns a multi reference on EObject for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetEObjectMultiReference">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getEObjectSingleReferenceValue" description="Returns a single reference on EObject for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetEObjectSingleReference">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getIntegerMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetIntMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getIntegerSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetIntSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getPrimitiveTypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetPrimitiveTypeMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getPrimitiveTypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetPrimitiveTypeSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getRealMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetRealMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getRealSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetRealSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getStringMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetStringMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getStringSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetStringSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getUnlimitedNaturalMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUnlimitedNaturalMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getUnlimitedNaturalSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUnlimitedNaturalSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getUMLEnumerationMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUMLEnumerationMultiValue">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="getUMLEnumerationSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.getter.GetUMLEnumerationSingleValue">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setBooleanMultiValue" description="Returns a multi value on Boolean for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetBooleanMultiValue">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//ENamedElement"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setBooleanSingleValue" description="Returns a single value on Boolean for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetBooleanSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setDatatypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetDatatypeMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setDatatypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetDatatypeSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setEObjectMultiReferenceValue" description="Returns a multi reference on EObject for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetEObjectMultiReference">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setEObjectSingleReferenceValue" description="Returns a single reference on EObject for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetEObjectSingleReference">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setIntegerMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetIntMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setIntegerSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetIntSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setPrimitiveTypeMultiValue" description="Returns a multi value on primitive type for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetPrimitiveTypeMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setPrimitiveTypeSingleValue" description="Returns a single value on primitive type for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetPrimitiveTypeSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setRealMultiValue" description="Returns a multi value on int for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetRealMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setRealSingleValue" description="Returns a single value on int for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetRealSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EDouble"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setStringMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetStringMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setStringSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetStringSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EString"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setUnlimitedNaturalMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUnlimitedNaturalMultiValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setUnlimitedNaturalSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUnlimitedNaturalSingleValue">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EInt"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setUMLEnumerationMultiValue" description="Returns a multi value on string for a property of a stereotype" upperBound="-1" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUMLEnumerationMultiValue">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="setUMLEnumerationSingleValue" description="Returns a single string value for a property of a stereotype" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.setter.SetUMLEnumerationSingleValue">
- <returnType xsi:type="ecore:EClass" href="http://www.eclipse.org/uml2/4.0.0/UML#//EnumerationLiteral"/>
- <scope href="http://www.eclipse.org/emf/2002/Ecore#//EObject"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
- <queries xsi:type="query:JavaModelQuery" name="isAppliedRequiredStereotype" description="Returns true if all required stereotypes are applied" lowerBound="1" implementationClassName="org.eclipse.papyrus.uml.profilefacet.queries.tester.IsAppliedRequiredStereotype">
- <returnType xsi:type="ecore:EDataType" href="http://www.eclipse.org/emf/2002/Ecore#//EBoolean"/>
- <scope href="http://www.eclipse.org/uml2/4.0.0/UML#//Element"/>
- </queries>
-</query:ModelQuerySet>
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java
deleted file mode 100644
index bd900da8945..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/Activator.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet;
-
-import org.eclipse.papyrus.infra.core.log.LogHelper;
-import org.eclipse.ui.plugin.AbstractUIPlugin;
-import org.osgi.framework.BundleContext;
-
-/**
- * The activator class controls the plug-in life cycle
- */
-public class Activator extends AbstractUIPlugin {
-
- // The plug-in ID
- public static final String PLUGIN_ID = "org.eclipse.papyrus.uml.profilefacet"; //$NON-NLS-1$
-
- // The shared instance
- private static Activator plugin;
-
- public static LogHelper log;
-
- /**
- * The constructor
- */
- public Activator() {
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext)
- */
- public void start(BundleContext context) throws Exception {
- super.start(context);
- plugin = this;
- log = new LogHelper(this);
- }
-
- /*
- * (non-Javadoc)
- *
- * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext)
- */
- public void stop(BundleContext context) throws Exception {
- plugin = null;
- super.stop(context);
- }
-
- /**
- * Returns the shared instance
- *
- * @return the shared instance
- */
- public static Activator getDefault() {
- return plugin;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java
deleted file mode 100644
index 7f890451ea6..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/advice/DeleteProfileFacetSetAdvice.java
+++ /dev/null
@@ -1,227 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.advice;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashSet;
-import java.util.Iterator;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
-import org.eclipse.emf.facet.infra.facet.Facet;
-import org.eclipse.emf.facet.infra.facet.FacetSet;
-import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
-import org.eclipse.emf.facet.infra.query.ModelQuery;
-import org.eclipse.emf.facet.infra.query.ModelQuerySet;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableinstancePackage;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.TableInstance2;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.Tableinstance2Package;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.CompositeCommand;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.core.util.CrossReferenceAdapter;
-import org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest;
-import org.eclipse.gmf.runtime.emf.type.core.requests.DestroyElementRequest;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.services.edit.service.ElementEditServiceUtils;
-import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-
-/**
- *
- * This advice helper destroy the {@link ProfileFacetSet} used in a table if the destroyed table is the last one to use it
- * This advice helper destroy the {@link EPackage} which contains the destroyed {@link ProfileFacetSet} used in a table if the destroyed
- * {@link ProfileFacetSet} is the last
- * one owned by the {@link EPackage}
- *
- * We assume that the EPackage contains only {@link ProfileFacetSet}, which contains only {@link StereotypeFacet}
- *
- * @author Vincent Lorenzo
- *
- */
-public class DeleteProfileFacetSetAdvice extends AbstractEditHelperAdvice {
-
- /**
- *
- * @see org.eclipse.gmf.runtime.emf.type.core.edithelper.AbstractEditHelperAdvice#getBeforeDestroyDependentsCommand(org.eclipse.gmf.runtime.emf.type.core.requests.DestroyDependentsRequest)
- *
- * @param request
- * @return
- */
- @Override
- protected ICommand getBeforeDestroyDependentsCommand(DestroyDependentsRequest request) {
- final EObject objectToDestroy = request.getElementToDestroy();
- if(objectToDestroy == null) {
- return null;
- }
-
-
- //the destroyed element is a PapyrusTableInstace
- if(objectToDestroy instanceof TableInstance2) {
- final TableInstance2 instance = (TableInstance2)objectToDestroy;
- final Collection<FacetSet> rootFacetSetToDestroy = new ArrayList<FacetSet>();
- final Collection<ModelQuerySet> querySetToDestroy = new HashSet<ModelQuerySet>();
- final Collection<Facet> allStereotypeFacetsUsedInTheTable = new ArrayList<Facet>();
- allStereotypeFacetsUsedInTheTable.addAll(instance.getFacets2());
-
- final Collection<FacetSet> rootFacetSets = new HashSet<FacetSet>();
- final Collection<EPackage> rootPackages = new HashSet<EPackage>();
- for(Facet facet : allStereotypeFacetsUsedInTheTable) {
- if(facet instanceof StereotypeFacet) {
- EObject container = facet.eContainer();
- while(container.eContainer() != null && container.eContainer() instanceof FacetSet) {
- container = container.eContainer();
- }
- assert container instanceof FacetSet;
- EObject rootPackage = container.eContainer();
- if(rootPackage != null) {// null for the provided Sysml ProfileFacetSet
- assert (rootPackage instanceof EPackage && rootPackage.eContainer() == null);
- rootFacetSets.add((FacetSet)container);
- rootPackages.add((EPackage)rootPackage);
- }
- }
- }
-
- if(rootFacetSets.size() != 0) {//the table references StereotypeFacet
- final TransactionalEditingDomain domain = request.getEditingDomain();
-
- //we must execute this code during the command execution, because if we are destroying several tables in the same time which references the same ProfileFacetSet, this one will be not destroyed
- final ICommand cmd = new AbstractTransactionalCommand(domain, "Destroy ProfileFacetSet Command", null) { //$NON-NLS-1$
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- final Collection<EPackage> epackageToDestroy = new ArrayList<EPackage>();
- for(final EPackage currentRoot : rootPackages) {
- for(final EObject current : currentRoot.eContents()) {
- if(current instanceof FacetSet) {
- if(!isUsed(instance, (FacetSet)current)) {
- rootFacetSetToDestroy.add((FacetSet)current);
- final ModelQuerySet querySet = getQuerySet((FacetSet)current);
- if(querySet != null) {
- querySetToDestroy.add(querySet);
- }
- }
- }
- }
-
- final Collection<EObject> currentContents = new ArrayList<EObject>(currentRoot.eContents());
- currentContents.removeAll(rootFacetSetToDestroy);
- if(currentContents.isEmpty()) {
- epackageToDestroy.add(currentRoot);
- }
- }
-
-
- CompositeCommand destroyCommand = new CompositeCommand("Destroy ProfileFacetSet command"); //$NON-NLS-1$
-
- for(final EObject element : querySetToDestroy) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(element);
- final DestroyElementRequest destroyRequest = new DestroyElementRequest(element, false);
- destroyCommand.add(provider.getEditCommand(destroyRequest));
- }
-
- for(final EObject element : rootFacetSetToDestroy) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(element);
- final DestroyElementRequest destroyRequest = new DestroyElementRequest(element, false);
- destroyCommand.add(provider.getEditCommand(destroyRequest));
- }
- for(EPackage ePackage : epackageToDestroy) {
- final IElementEditService provider = ElementEditServiceUtils.getCommandProvider(ePackage);
- final DestroyElementRequest destroyRequest = new DestroyElementRequest(ePackage, false);
- destroyCommand.add(provider.getEditCommand(destroyRequest));
- }
-
-
- if(!destroyCommand.isEmpty()) {
- domain.getCommandStack().execute(new GMFtoEMFCommandWrapper(destroyCommand));
- }
- return CommandResult.newOKCommandResult();
- }
- };
- return cmd;
-
- }
-
- }
- return null;
- }
-
- /**
- *
- * @param deletedTableInstance
- * the deleted table instance
- * @param facetSet
- * a facetset
- * @return
- * <code>true</code> if the facetset is used by another table
- */
- protected boolean isUsed(final TableInstance deletedTableInstance, final FacetSet facetSet) {
- boolean isUsed = false;
- for(final Facet facet : facetSet.getFacets()) {
- final ECrossReferenceAdapter crossReferencerAdapter = CrossReferenceAdapter.getCrossReferenceAdapter(facet);
- final Collection<Setting> settings = crossReferencerAdapter.getNonNavigableInverseReferences(facet, true);
- Iterator<Setting> iterator = settings.iterator();
- while(iterator.hasNext() && !isUsed) {
- final Setting current = iterator.next();
- EObject object = current.getEObject();
- EStructuralFeature feature = current.getEStructuralFeature();
- if(object != deletedTableInstance || (feature != TableinstancePackage.eINSTANCE.getTableInstance_Facets() && feature != Tableinstance2Package.eINSTANCE.getTableInstance2_Facets2())) {
- isUsed = true;
- }
- }
- }
- if(!isUsed) {
- for(final EPackage subPackage : facetSet.getESubpackages()) {
- if(subPackage instanceof FacetSet && !isUsed) {
- isUsed = isUsed(deletedTableInstance, (FacetSet)subPackage);
- }
- }
- }
- return isUsed;
- }
-
- /**
- *
- * @param facetset
- * a facetset
- * @return
- * the {@link ModelQuerySet} used by this facetset
- */
- protected ModelQuerySet getQuerySet(final FacetSet facetset) {
- ModelQuerySet querySet = null;
- TreeIterator<EObject> iterator = facetset.eAllContents();
- while(iterator.hasNext() && querySet == null) {
- final EObject current = iterator.next();
- if(current instanceof FacetStructuralFeature) {
- ModelQuery modelQuery = ((FacetStructuralFeature)current).getValueQuery();
- querySet = modelQuery.getModelQuerySet();
- }
- }
-
- return querySet;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java
deleted file mode 100644
index bec00a68b7b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/controlmode/ProfileFacetSetControlParticipant.java
+++ /dev/null
@@ -1,57 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2013 Atos.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Mathieu Velten <a href="mailto:mathieu.velten@atos.net"> - initial API and implementation
- ******************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.controlmode;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.papyrus.infra.core.resource.sasheditor.SashModel;
-import org.eclipse.papyrus.infra.services.controlmode.ControlModeRequest;
-import org.eclipse.papyrus.infra.services.controlmode.participants.IControlCommandParticipant;
-import org.eclipse.papyrus.infra.services.controlmode.participants.IUncontrolCommandParticipant;
-import org.eclipse.papyrus.uml.profilefacet.utils.ProfileFacetSetMoveHelper;
-
-
-public class ProfileFacetSetControlParticipant implements IControlCommandParticipant, IUncontrolCommandParticipant {
-
- public String getID() {
- return "org.eclipse.papyrus.uml.profilefacet.controlmode.ProfileFacetSetControlParticipant";
- }
-
- public int getPriority() {
- return 20;
- }
-
- public boolean provideUnControlCommand(ControlModeRequest request) {
- return request.getTargetObject() instanceof EObject;
- }
-
- public boolean provideControlCommand(ControlModeRequest request) {
- return request.getTargetObject() instanceof EObject;
- }
-
- public ICommand getPreUncontrolCommand(ControlModeRequest request) {
- return ProfileFacetSetMoveHelper.getMoveAllFacetSetsCommand(request.getEditingDomain(), request.getTargetObject(), request.getSourceResource(SashModel.MODEL_FILE_EXTENSION), request.getTargetResource(SashModel.MODEL_FILE_EXTENSION));
-
- }
-
- public ICommand getPostUncontrolCommand(ControlModeRequest request) {
- return null;
- }
-
- public ICommand getPreControlCommand(ControlModeRequest request) {
- return null;
- }
-
- public ICommand getPostControlCommand(ControlModeRequest request) {
- return ProfileFacetSetMoveHelper.getMoveAllFacetSetsCommand(request.getEditingDomain(), request.getTargetObject(), request.getSourceResource(SashModel.MODEL_FILE_EXTENSION), request.getTargetResource(SashModel.MODEL_FILE_EXTENSION));
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java
deleted file mode 100644
index 60fe4c5d8e0..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/listener/ReapplyProfileTriggerListener.java
+++ /dev/null
@@ -1,93 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.listener;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.notify.Notification;
-import org.eclipse.emf.ecore.EAnnotation;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.TriggerListener;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
-import org.eclipse.papyrus.uml.profilefacet.utils.ProfileFacetSetDestroyer;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.ProfileApplication;
-
-/**
- *
- * This trigger listener listen the profile application to manage the existing {@link ProfileFacetSet} in the model
- *
- */
-public class ReapplyProfileTriggerListener extends TriggerListener {
-
- /**
- *
- * @see org.eclipse.emf.transaction.TriggerListener#trigger(org.eclipse.emf.transaction.TransactionalEditingDomain,
- * org.eclipse.emf.common.notify.Notification)
- *
- * @param domain
- * @param notification
- * @return
- */
- @Override
- protected Command trigger(final TransactionalEditingDomain domain, final Notification notification) {
- final int eventType = notification.getEventType();
- final Object notifier = notification.getNotifier();
- final Object newValue = notification.getNewValue();
-
- if(eventType == Notification.SET && newValue instanceof EPackage && notifier instanceof EAnnotation) {
- Profile appliedProfile = getAppliedProfile((EAnnotation)notifier);
- while(appliedProfile.eContainer() != null) {
- appliedProfile = (Profile)appliedProfile.eContainer();
- }
- if(appliedProfile != null) {
- return getUpdateFacetSetCommand(appliedProfile);
- }
- }
- return null;
- }
-
- /**
- *
- * @param profile
- * a profile
- * @return
- * the command to update the ProfileFacetSets which references this profile or <code>null</code>
- */
- protected Command getUpdateFacetSetCommand(final Profile profile) {
- final ProfileFacetSetDestroyer updater = new ProfileFacetSetDestroyer(profile);
- final Command cmd = updater.getDestroyFacetSetCommand();
- if(cmd != null && cmd.canExecute()) {
- return cmd;
- }
- return null;
- }
-
- /**
- *
- * @param annotation
- * an eannotation
- * @return
- * the profile referenced by the eannotation or <code>null</code>
- */
- protected Profile getAppliedProfile(final EAnnotation annotation) {
- final EObject container = annotation.eContainer();
- if(container instanceof ProfileApplication) {
- return ((ProfileApplication)container).getAppliedProfile();
- }
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java
deleted file mode 100644
index 9a500d348e3..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/Messages.java
+++ /dev/null
@@ -1,43 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.messages;
-
-import org.eclipse.osgi.util.NLS;
-
-public class Messages extends NLS {
-
- private static final String BUNDLE_NAME = "org.eclipse.papyrus.uml.profilefacet.messages.messages"; //$NON-NLS-1$
-
- public static String AdditionalContentsUtils_ProfileEFacetDescription;
-
- public static String FacetOperationRegistry_RequiredFacetNotFound;
-
- public static String FacetOperationRegistry_RequiredFacetOperationNotFound;
-
- public static String ProfileFacetSetDestroyer_DestroyProfileFacetSetCommand;
-
- public static String ProfileFacetSetDestroyer_ErrorMessageOnDeleteProfileFacetSet;
- public static String ProfileFacetSetDestroyer_RemoveColumns;
-
- public static String ProfileFacetSetDestroyer_RemoveFacetSetAppliedOnTheTable;
-
- public static String ProfileFacetSetDestroyer_RemoveProfileFacetSetForReappliedProfile;
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties
deleted file mode 100644
index c5b4918fa15..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/messages/messages.properties
+++ /dev/null
@@ -1,8 +0,0 @@
-AdditionalContentsUtils_ProfileEFacetDescription=This EPackage provides facets to edit easily additional contents (Stereotype Properties for example). It had been generated by the Papyrus Show/Hide columns
-FacetOperationRegistry_RequiredFacetNotFound=The required facet {0} has not been found
-FacetOperationRegistry_RequiredFacetOperationNotFound=The required FacetOperation called {0} has not been found
-ProfileFacetSetDestroyer_DestroyProfileFacetSetCommand=Destroy ProfileFacetSet command
-ProfileFacetSetDestroyer_ErrorMessageOnDeleteProfileFacetSet=We can't delete the existing ProfileFacetSet, because you have apply 2 Profile with the same XMI_ID on your model. \n Often it is because you do a Save As of your first profile to create the second one
-ProfileFacetSetDestroyer_RemoveColumns=Remove Columns
-ProfileFacetSetDestroyer_RemoveFacetSetAppliedOnTheTable=Remove facet applied on table
-ProfileFacetSetDestroyer_RemoveProfileFacetSetForReappliedProfile=Remove ProfileFacetSet for reapplied Profile
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java
deleted file mode 100644
index cd7ea447e37..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetBooleanMultiValue extends GetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java
deleted file mode 100644
index 040cc853f79..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetBooleanSingleValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetBooleanSingleValue extends GetGenericSingleValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java
deleted file mode 100644
index aa7837e843a..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetDatatypeMultiValue extends GetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java
deleted file mode 100644
index bd4c8f5cb3e..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetDatatypeSingleValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetDatatypeSingleValue extends GetGenericSingleValue<String> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java
deleted file mode 100644
index 4e28941e9e8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectMultiReference.java
+++ /dev/null
@@ -1,47 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-
-
-public class GetEObjectMultiReference extends GetGenericMultiValue<EObject> {
-
- @Override
- public List<EObject> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- final List<EObject> value = super.evaluate(source, parameterValues);
- if(value == null) {
- return Collections.emptyList();
- } else {
- final List<EObject> returnedValue = new ArrayList<EObject>();
- for(EObject eObject : value) {
- if(UMLUtil.getStereotype(eObject) != null) {
- returnedValue.add(UMLUtil.getBaseElement(eObject));
- } else {
- returnedValue.add(eObject);
- }
- }
- return returnedValue;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java
deleted file mode 100644
index 5c99cac1606..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetEObjectSingleReference.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.util.UMLUtil;
-
-
-public class GetEObjectSingleReference extends GetGenericSingleValue<EObject> {
-
- @Override
- public EObject evaluate(final Element source, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
- EObject obj = super.evaluate(source, parameterValues);
-
- if(UMLUtil.getStereotype(obj) != null) {
- obj = UMLUtil.getBaseElement(obj);
- }
- return obj;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java
deleted file mode 100644
index f5d7d5fac11..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericMultiValue.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class GetGenericMultiValue<R> extends GetGenericSingleValue<List<R>> {
-
- @Override
- public List<R> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- final List<R> value = super.evaluate(source, parameterValues);
- if(value == null) {
- return Collections.emptyList();
- } else {
- return value;
- }
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java
deleted file mode 100644
index cd06b36c10d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetGenericSingleValue.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-import java.util.Collection;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
-import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQueryWithEditingDomain;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
-import org.eclipse.papyrus.uml.profilefacet.utils.StereotypePropertyUtils;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-
-
-public class GetGenericSingleValue<R> implements IJavaModelQueryWithEditingDomain<Element, R> {
-
-
- /**
- *
- * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery#evaluate(org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList)
- *
- * @param source
- * @param parameterValues
- * @return
- * @throws ModelQueryExecutionException
- */
- public R evaluate(final Element source, final ParameterValueList parameterValues) throws ModelQueryExecutionException {
- final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
- if(element != null) {
- final String propertyQN = element.getPropertyQualifiedName();
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- final Stereotype appliedSte = StereotypePropertyUtils.getAppliedStereotype(source, element);
- return (R)source.getValue(appliedSte, propertyName);
- }
-
- return null;
- }
-
- /**
- *
- * @see org.eclipse.emf.facet.infra.query.core.java.IJavaModelQueryWithEditingDomain#evaluate(org.eclipse.emf.ecore.EObject,
- * org.eclipse.emf.facet.infra.query.core.java.ParameterValueList, org.eclipse.emf.edit.domain.EditingDomain)
- *
- * @param context
- * @param parameterValues
- * @param editingDomain
- * @return
- * @throws ModelQueryExecutionException
- */
- public R evaluate(final Element context, final ParameterValueList parameterValues, EditingDomain editingDomain) throws ModelQueryExecutionException {
- return evaluate(context, parameterValues);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java
deleted file mode 100644
index 4ffbe2fc1d1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetIntMultiValue extends GetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java
deleted file mode 100644
index c89af9653ae..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetIntSingleValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetIntSingleValue extends GetGenericSingleValue<Integer> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java
deleted file mode 100644
index 2593587c6ab..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetPrimitiveTypeMultiValue extends GetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java
deleted file mode 100644
index 85f9199e4b3..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetPrimitiveTypeSingleValue.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-public class GetPrimitiveTypeSingleValue extends GetGenericSingleValue<String> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java
deleted file mode 100644
index 47387465905..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealMultiValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetRealMultiValue extends GetGenericMultiValue<Boolean> {
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java
deleted file mode 100644
index f979471e186..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetRealSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-
-public class GetRealSingleValue extends GetGenericSingleValue<Double> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java
deleted file mode 100644
index 37c8818bbec..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetStringMultiValue extends GetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java
deleted file mode 100644
index 71e7ea9db67..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetStringSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-
-public class GetStringSingleValue extends GetGenericSingleValue<String> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java
deleted file mode 100644
index d8c8b7d6a48..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationMultiValue.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-import java.util.Collection;
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
-import org.eclipse.papyrus.uml.tools.utils.EnumerationUtil;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.Stereotype;
-import org.eclipse.uml2.uml.TypedElement;
-
-
-
-public class GetUMLEnumerationMultiValue extends GetGenericMultiValue<EnumerationLiteral> {
-
-
- @Override
- public List<EnumerationLiteral> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
-
- final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
- if(element != null) {
- final EObject container = element.eContainer();
- assert container instanceof StereotypeFacet;
- final StereotypeFacet facet = (StereotypeFacet)container;
- final String stereotypeQN = facet.getStereotypeQualifiedName();
- final Stereotype appliedStereotype = source.getAppliedStereotype(stereotypeQN);
- final String propertyQN = element.getPropertyQualifiedName();
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- if(appliedStereotype != null) {
- final Enumeration type = (Enumeration)((TypedElement)appliedStereotype.getOwnedMember(propertyName)).getType();
- final Object value = source.getValue(appliedStereotype, propertyName);
- assert value instanceof Collection<?>;
- return EnumerationUtil.adaptToEnumerationLiteralList(type, (Collection<?>)value);
- } else if(appliedStereotype == null) {//the property can comes from inheritance...
- for(Stereotype appliedSte : source.getAppliedStereotypes()) {
- final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedSte);
- for(final Stereotype current : superClasses) {
- if(current.getQualifiedName().equals(stereotypeQN)) {
- final Enumeration type = (Enumeration)((TypedElement)current.getOwnedMember(propertyName)).getType();
- final Object value = source.getValue(appliedSte, propertyName);
- assert value instanceof Collection<?>;
- return EnumerationUtil.adaptToEnumerationLiteralList(type, (Collection<?>)value);
- }
- }
- }
- }
- }
-
- return Collections.emptyList();
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java
deleted file mode 100644
index a51f417ce17..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUMLEnumerationSingleValue.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-import java.util.Collection;
-
-import org.eclipse.emf.common.util.Enumerator;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
-import org.eclipse.papyrus.uml.tools.utils.EnumerationUtil;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Enumeration;
-import org.eclipse.uml2.uml.EnumerationLiteral;
-import org.eclipse.uml2.uml.Stereotype;
-import org.eclipse.uml2.uml.TypedElement;
-
-
-public class GetUMLEnumerationSingleValue extends GetGenericSingleValue<EnumerationLiteral> {
-
- @Override
- public EnumerationLiteral evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
- if(element != null) {
- final EObject container = element.eContainer();
- assert container instanceof StereotypeFacet;
- final StereotypeFacet facet = (StereotypeFacet)container;
- final String stereotypeQN = facet.getStereotypeQualifiedName();
- final Stereotype appliedStereotype = source.getAppliedStereotype(stereotypeQN);
- final String propertyQN = element.getPropertyQualifiedName();
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- if(appliedStereotype != null) {
- final Object value = source.getValue(appliedStereotype, propertyName);
- if(value instanceof Enumerator) {
- final Enumeration type = (Enumeration)((TypedElement)appliedStereotype.getOwnedMember(propertyName)).getType();
- return EnumerationUtil.findEnumerationLiteral(type, (Enumerator)value);
- }
- return (EnumerationLiteral)value;
- } else if(appliedStereotype == null) {//the property can comes from inheritance...
- for(Stereotype appliedSte : source.getAppliedStereotypes()) {
- final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedSte);
- for(final Stereotype current : superClasses) {
- if(current.getQualifiedName().equals(stereotypeQN)) {
- final Object value = source.getValue(appliedSte, propertyName);
- if(value instanceof Enumerator) {
- final Enumeration type = (Enumeration)((TypedElement)current.getOwnedMember(propertyName)).getType();
- return EnumerationUtil.findEnumerationLiteral(type, (Enumerator)value);
- }
- return (EnumerationLiteral)value;
- }
- }
- }
- }
- }
-
- return null;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java
deleted file mode 100644
index b7870313589..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalMultiValue.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetUnlimitedNaturalMultiValue extends GetGenericMultiValue<Boolean> {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java
deleted file mode 100644
index 5bfe0d2f4bf..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/getter/GetUnlimitedNaturalSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.getter;
-
-
-
-public class GetUnlimitedNaturalSingleValue extends GetGenericSingleValue<String> {
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java
deleted file mode 100644
index 6abae052b4f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/registry/QueryRegistry.java
+++ /dev/null
@@ -1,137 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.registry;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.facet.infra.query.ModelQuery;
-import org.eclipse.emf.facet.infra.query.ModelQuerySet;
-import org.eclipse.emf.facet.infra.query.core.ModelQuerySetCatalog;
-
-
-
-public class QueryRegistry {
-
- /** the keys to get the FacetOperation */
- public static final String GET_STRING_SINGLE_VALUE_OPERATION_ID = "getStringSingleValue"; //$NON-NLS-1$
-
- public static final String GET_STRING_MULTI_VALUE_OPERATION_ID = "getStringMultiValue"; //$NON-NLS-1$
-
- public static final String GET_EOBJECT_SINGLE_REFERENCE_OPERATION_ID = "getEObjectSingleReferenceValue"; //$NON-NLS-1$
-
- public static final String GET_EOBJECT_MULTI_REFERENCE_OPERATION_ID = "getEObjectMultiReferenceValue"; //$NON-NLS-1$
-
- public static final String GET_BOOLEAN_SINGLE_VALUE_OPERATION_ID = "getBooleanSingleValue"; //$NON-NLS-1$
-
- public static final String GET_BOOLEAN_MULTI_VALUE_OPERATION_ID = "getBooleanMultiValue"; //$NON-NLS-1$
-
- public static final String GET_INTEGER_SINGLE_VALUE_OPERATION_ID = "getIntegerSingleValue"; //$NON-NLS-1$
-
- public static final String GET_INTEGER_MULTI_VALUE_OPERATION_ID = "getIntegerMultiValue"; //$NON-NLS-1$
-
- public static final String GET_REAL_SINGLE_VALUE_OPERATION_ID = "getRealSingleValue"; //$NON-NLS-1$
-
- public static final String GET_REAL_MULTI_VALUE_OPERATION_ID = "getRealMultiValue"; //$NON-NLS-1$
-
- public static final String GET_UNLIMITED_NATURAL_SINGLE_VALUE_OPERATION_ID = "getUnlimitedNaturalSingleValue"; //$NON-NLS-1$
-
- public static final String GET_UNLIMITED_NATURAL_MULTI_VALUE_OPERATION_ID = "getUnlimitedNaturalMultiValue"; //$NON-NLS-1$
-
- public static final String GET_UML_ENUMERATION_SINGLE_VALUE_OPERATION_ID = "getUMLEnumerationSingleValue"; //$NON-NLS-1$
-
- public static final String GET_UML_ENUMERATION_MULTI_VALUE_OPERATION_ID = "getUMLEnumerationMultiValue"; //$NON-NLS-1$
-
- public static final String GET_DATATYPE_MULTI_VALUE_OPERATION_ID = "getDatatypeMultiValue";//$NON-NLS-1$
-
- public static final String GET_DATATYPE_SINGLE_VALUE_OPERATION_ID = "getDatatypeSingleValue";//$NON-NLS-1$
-
- public static final String GET_PRIMITIVE_TYPE_MULTI_VALUE_OPERATION_ID = "getPrimitiveTypeMultiValue";//$NON-NLS-1$
-
- public static final String GET_PRIMITIVE_TYPE_SINGLE_VALUE_OPERATION_ID = "getPrimitiveTypeSingleValue";//$NON-NLS-1$
-
-
- public static final String SET_STRING_SINGLE_VALUE_OPERATION_ID = "setStringSingleValue"; //$NON-NLS-1$
-
- public static final String SET_STRING_MULTI_VALUE_OPERATION_ID = "setStringMultiValue"; //$NON-NLS-1$
-
- public static final String SET_EOBJECT_SINGLE_REFERENCE_OPERATION_ID = "setEObjectSingleReferenceValue"; //$NON-NLS-1$
-
- public static final String SET_EOBJECT_MULTI_REFERENCE_OPERATION_ID = "setEObjectMultiReferenceValue"; //$NON-NLS-1$
-
- public static final String SET_BOOLEAN_SINGLE_VALUE_OPERATION_ID = "setBooleanSingleValue"; //$NON-NLS-1$
-
- public static final String SET_BOOLEAN_MULTI_VALUE_OPERATION_ID = "setBooleanMultiValue"; //$NON-NLS-1$
-
- public static final String SET_INTEGER_SINGLE_VALUE_OPERATION_ID = "setIntegerSingleValue"; //$NON-NLS-1$
-
- public static final String SET_INTEGER_MULTI_VALUE_OPERATION_ID = "setIntegerMultiValue"; //$NON-NLS-1$
-
- public static final String SET_REAL_SINGLE_VALUE_OPERATION_ID = "setRealSingleValue"; //$NON-NLS-1$
-
- public static final String SET_REAL_MULTI_VALUE_OPERATION_ID = "setRealMultiValue"; //$NON-NLS-1$
-
- public static final String SET_UNLIMITED_NATURAL_SINGLE_VALUE_OPERATION_ID = "setUnlimitedNaturalSingleValue"; //$NON-NLS-1$
-
- public static final String SET_UNLIMITED_NATURAL_MULTI_VALUE_OPERATION_ID = "setUnlimitedNaturalMultiValue"; //$NON-NLS-1$
-
- public static final String SET_UML_ENUMERATION_SINGLE_VALUE_OPERATION_ID = "setUMLEnumerationSingleValue"; //$NON-NLS-1$
-
- public static final String SET_UML_ENUMERATION_MULTI_VALUE_OPERATION_ID = "setUMLEnumerationMultiValue"; //$NON-NLS-1$
-
- public static final String SET_DATATYPE_MULTI_VALUE_OPERATION_ID = "setDatatypeMultiValue";//$NON-NLS-1$
-
- public static final String SET_DATATYPE_SINGLE_VALUE_OPERATION_ID = "setDatatypeSingleValue";//$NON-NLS-1$
-
- public static final String SET_PRIMITIVE_TYPE_MULTI_VALUE_OPERATION_ID = "setPrimitiveTypeMultiValue";//$NON-NLS-1$
-
- public static final String SET_PRIMITIVE_TYPE_SINGLE_VALUE_OPERATION_ID = "setPrimitiveTypeSingleValue";//$NON-NLS-1$
-
- public static final String IS_APPLIED_REQUIRED_STEREOTYPE = "isAppliedRequiredStereotype";
-
-
- /** this map register the Query : key = id of the operation, value = the operation itself */
- private final Map<String, ModelQuery> registry;
-
- private static final String UML_STEREOTYPE_QUERY_SET_NAME = "uml_stereotype_queries";
-
-
- public QueryRegistry() {
- final ModelQuerySet set = getQuerySet(UML_STEREOTYPE_QUERY_SET_NAME);
- assert set != null;
- this.registry = new HashMap<String, ModelQuery>();
- for(final ModelQuery query : set.getQueries()) {
- this.registry.put(query.getName(), query);
- }
- }
-
- /**
- *
- * @param id
- * the id of the looked operation for
- * @return
- */
- public ModelQuery getModelQuery(final String id) {
- ModelQuery op = this.registry.get(id);
- assert op != null;
- return op;
- }
-
-
-
- private static final ModelQuerySet getQuerySet(final String facetName) {
- return ModelQuerySetCatalog.getSingleton().getModelQuerySet(facetName);
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java
deleted file mode 100644
index eed77a249af..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetBooleanMultiValue extends SetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java
deleted file mode 100644
index d2f1e65beb1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetBooleanSingleValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetBooleanSingleValue extends SetGenericSingleValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java
deleted file mode 100644
index 1d06e35c043..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetDatatypeMultiValue extends SetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java
deleted file mode 100644
index abe30c874cb..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetDatatypeSingleValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetDatatypeSingleValue extends SetGenericSingleValue<String> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java
deleted file mode 100644
index 407fadca449..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectMultiReference.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetEObjectMultiReference extends SetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java
deleted file mode 100644
index f80f51ab346..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetEObjectSingleReference.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-import org.eclipse.emf.ecore.EObject;
-
-
-public class SetEObjectSingleReference extends SetGenericSingleValue<EObject> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java
deleted file mode 100644
index 3385d558b87..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericMultiValue.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-import java.util.Collections;
-import java.util.List;
-
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.uml2.uml.Element;
-
-public abstract class SetGenericMultiValue<R> extends SetGenericSingleValue<List<R>> {
-
- @Override
- public List<R> evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- super.evaluate(source, parameterValues);
- return Collections.emptyList();
- }
-
- @Override
- public List<R> evaluate(Element source, ParameterValueList parameterValues, EditingDomain domain) throws ModelQueryExecutionException {
- super.evaluate(source, parameterValues, domain);
- return Collections.emptyList();
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java
deleted file mode 100644
index f85709b9730..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetGenericSingleValue.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-import java.util.Collection;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.edit.domain.EditingDomain;
-import org.eclipse.emf.facet.infra.facet.core.FacetContext;
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQueryWithEditingDomain;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.emf.transaction.util.TransactionUtil;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
-import org.eclipse.papyrus.uml.profilefacet.utils.StereotypePropertyUtils;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-
-public class SetGenericSingleValue<R> implements IJavaModelQueryWithEditingDomain<Element, R> {
-
-
- /**
- *
- * @param source
- * @param parameterValues
- * @return
- * @throws ModelQueryExecutionException
- */
- public R evaluate(Element source, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- final EditingDomain domain = TransactionUtil.getEditingDomain(source);
- return evaluate(source, parameterValues, domain);
- }
-
- /**
- *
- * @param source
- * @param parameterValues
- * @param editingDomain
- * @return
- * @throws ModelQueryExecutionException
- */
- public R evaluate(final Element source, final ParameterValueList parameterValues, final EditingDomain editingDomain) throws ModelQueryExecutionException {
- assert editingDomain != null;
- final R newValue = (R)parameterValues.getValueByParameterName(FacetContext.NEW_VALUE);
- final StereotypePropertyElement element = (StereotypePropertyElement)parameterValues.getParameterValueByName(ArgumentUtils.EDITED_FEATURE).getValue();
- if(element != null) {
- final Stereotype foundStereotype = StereotypePropertyUtils.getAppliedStereotype(source, element);
- final String propertyQN = element.getPropertyQualifiedName();
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- if(foundStereotype != null) {
- final Stereotype stereotype = foundStereotype;
- //FIXME : we should use the service edit
- final ICommand setValueCommand = new AbstractTransactionalCommand((TransactionalEditingDomain)editingDomain, "Set Stereotype Value Command", null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- source.setValue(stereotype, propertyName, newValue);
- return CommandResult.newOKCommandResult();
- }
- };
-
- editingDomain.getCommandStack().execute(new GMFtoEMFCommandWrapper(setValueCommand));
- }
- }
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java
deleted file mode 100644
index 7c8d659d0e8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetIntMultiValue extends SetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java
deleted file mode 100644
index a24f3582391..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetIntSingleValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetIntSingleValue extends SetGenericSingleValue<Integer> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java
deleted file mode 100644
index 3fb1716e709..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetPrimitiveTypeMultiValue extends SetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java
deleted file mode 100644
index 2553d413936..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetPrimitiveTypeSingleValue.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-public class SetPrimitiveTypeSingleValue extends SetGenericSingleValue<String> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java
deleted file mode 100644
index 45313508b2b..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealMultiValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetRealMultiValue extends SetGenericMultiValue<Boolean> {
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java
deleted file mode 100644
index e5f202e753d..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetRealSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-
-public class SetRealSingleValue extends SetGenericSingleValue<Double> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java
deleted file mode 100644
index 9ff244769e1..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringMultiValue.java
+++ /dev/null
@@ -1,20 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetStringMultiValue extends SetGenericMultiValue<Boolean> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java
deleted file mode 100644
index 6c4a8254131..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetStringSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-
-public class SetStringSingleValue extends SetGenericSingleValue<String> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java
deleted file mode 100644
index 954f0e96628..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationMultiValue.java
+++ /dev/null
@@ -1,22 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-import org.eclipse.uml2.uml.EnumerationLiteral;
-
-
-
-public class SetUMLEnumerationMultiValue extends SetGenericMultiValue<EnumerationLiteral> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java
deleted file mode 100644
index 53cd9df2e19..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUMLEnumerationSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-import org.eclipse.uml2.uml.EnumerationLiteral;
-
-
-public class SetUMLEnumerationSingleValue extends SetGenericSingleValue<EnumerationLiteral> {
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java
deleted file mode 100644
index 35745fbedac..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalMultiValue.java
+++ /dev/null
@@ -1,19 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetUnlimitedNaturalMultiValue extends SetGenericMultiValue<Boolean> {
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java
deleted file mode 100644
index fca13676106..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/setter/SetUnlimitedNaturalSingleValue.java
+++ /dev/null
@@ -1,21 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.setter;
-
-
-
-public class SetUnlimitedNaturalSingleValue extends SetGenericSingleValue<String> {
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java
deleted file mode 100644
index 294b12f4031..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/queries/tester/IsAppliedRequiredStereotype.java
+++ /dev/null
@@ -1,49 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.queries.tester;
-
-
-
-import java.util.Collection;
-
-import org.eclipse.emf.facet.infra.query.core.exception.ModelQueryExecutionException;
-import org.eclipse.emf.facet.infra.query.core.java.IJavaModelQuery;
-import org.eclipse.emf.facet.infra.query.core.java.ParameterValueList;
-import org.eclipse.papyrus.uml.profilefacet.utils.ArgumentUtils;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.Stereotype;
-
-
-public class IsAppliedRequiredStereotype implements IJavaModelQuery<Element, Boolean> {
-
- public Boolean evaluate(Element context, ParameterValueList parameterValues) throws ModelQueryExecutionException {
- final String steQN = (String)parameterValues.getValueByParameterName(ArgumentUtils.STEREOTYPE_QUALIFIED_NAME);
- final Stereotype ste = context.getAppliedStereotype(steQN);
- if(ste == null) {
- for(final Stereotype appliedStereotype : context.getApplicableStereotypes()) {
- final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedStereotype);
- for(final Stereotype current : superClasses) {
- if(current.getQualifiedName().equals(steQN)) {
- return Boolean.TRUE;
- }
- }
- }
- } else {
- return Boolean.TRUE;
- }
- return Boolean.FALSE;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java
deleted file mode 100644
index d476ed0aea8..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/AdditionalContentsUtils.java
+++ /dev/null
@@ -1,229 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012, 2013 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- * Christian W. Damus (CEA) - Don't assume that profiles are in XMI resources (CDO)
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcoreFactory;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.core.resource.ModelSet;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.gmfdiag.common.model.NotationModel;
-import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
-import org.eclipse.papyrus.uml.profilefacet.messages.Messages;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.uml2.uml.Profile;
-
-
-
-/**
- *
- * This class provides utilities for the AdditionalContentsFacetSet.
- * This facetset is used to provide additional contents for table EFacet (Currently,
- * this main job is to provide FacetSet to edit easily the properties of the stereotypes into a table
- *
- */
-public class AdditionalContentsUtils {
-
- private AdditionalContentsUtils() {
- //to prevent instanciation
- }
-
- public static final String ADDITIONAL_CONTENTS_EPCKAGE_NAME = "AdditionalContentsForTable"; //$NON-NLS-1$
-
- public static final String ADDITIONAL_CONTENTS_EPACKAGE_NS_URI = "http://www.eclipse.org/papyrustable/additionalcontentsepackage"; //$NON-NLS-1$
-
- public static final String ADDITIONAL_CONTENTS_EPACKAGE_PREFIX = "additionalcontentsepackage"; //$NON-NLS-1$
-
- public static final String ADDITIONAL_CONTENTS_FACET_SET_DOCUMENTATION = Messages.AdditionalContentsUtils_ProfileEFacetDescription;
-
- public static final String ADDITIONAL_CONTENTS_QUERY_SET_NAME = "AdditionalContentsModelQuerySetForTable"; //$NON-NLS-1$
-
- public static EPackage createAdditionalContentsEPackage() {
- final EPackage additionFeatureRootFacetSet = EcoreFactory.eINSTANCE.createEPackage();
- additionFeatureRootFacetSet.setName(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPCKAGE_NAME);
- additionFeatureRootFacetSet.setNsPrefix(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_PREFIX);
- additionFeatureRootFacetSet.setNsURI(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_NS_URI);
- return additionFeatureRootFacetSet;
- }
-
- public static EPackage getAdditionalContentsEPackage(final PapyrusTableInstance table) {
- EPackage ePackage = null;
- final ModelSet modelSet = (ModelSet)table.eResource().getResourceSet();
- final Resource resource = modelSet.getAssociatedResource(table.eResource(), NotationModel.NOTATION_FILE_EXTENSION, true);
- final Iterator<EObject> iter = resource.getContents().iterator();
- while(iter.hasNext() && ePackage == null) {
- final EObject current = iter.next();
- if(current instanceof EPackage) {
- final EPackage tmp = (EPackage)current;
- if(AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_NS_URI.equals(tmp.getNsURI())) {
- ePackage = tmp;
- }
- }
- }
-
- return ePackage;
- }
-
- /**
- *
- * @param source
- * a resource
- * @return
- * return the EPackage with the uri {@link #ADDITIONAL_CONTENTS_FACET_SET_NS_URI} in the resource or <code>null</code> if not found
- */
- public static EPackage getAdditionalContentsEPackage(final Resource source) {
- if(source != null) {
- EPackage additionalSet = null;
- Iterator<EObject> iter = source.getContents().iterator();
- while(iter.hasNext() && additionalSet == null) {
- final EObject contents = iter.next();
- if(contents instanceof EPackage && AdditionalContentsUtils.ADDITIONAL_CONTENTS_EPACKAGE_NS_URI.equals(((EPackage)contents).getNsURI())) {
- additionalSet = (EPackage)contents;
- }
- }
- return additionalSet;
- }
- return null;
- }
-
- /**
- *
- * @param resourceSet
- * a resource set
- * @return all ProfileFacetSet owned by the resource setassuming that :
- * <ul>
- * <li>the ProfileFacetSet are stored as root of the resource</li>
- * <li>the ProfileFacetSet are stored in the notation file</li>
- * </ul>
- */
- public static final Collection<ProfileFacetSet> getAllProfileFacetSets(final ResourceSet resourceSet) {
- final Collection<ProfileFacetSet> facetSets = new HashSet<ProfileFacetSet>();
- final TransactionalEditingDomain domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(resourceSet);
-
- for(final Resource current : resourceSet.getResources()) {
- //we assume that all ProfileFacetSet are stored into notation files
- if(NotationModel.NOTATION_FILE_EXTENSION.equals(current.getURI().fileExtension()) && !domain.isReadOnly(current)) {
- final EPackage additionalContentsEPackage = getAdditionalContentsEPackage(current);
- if(additionalContentsEPackage != null) {
- for(final EPackage currentEPackage : additionalContentsEPackage.getESubpackages()) {
- if(currentEPackage instanceof ProfileFacetSet) {
- facetSets.add((ProfileFacetSet)currentEPackage);
- }
- }
- }
- }
- }
- return facetSets;
- }
-
- /**
- *
- * @param profile
- * a profile
- * @return
- * the list of the existing {@link ProfileFacetSet} for this profile.
- * This is a collection, because in case of a model splitted in several file, we could have several representation for the same profile
- */
- public static final Collection<ProfileFacetSet> getAllFacetSet(final Profile profile) {
- final String profileID = profile.eResource().getURIFragment(profile);
-
- final Collection<ProfileFacetSet> facetSets = new HashSet<ProfileFacetSet>();
- final ResourceSet resourceSet = profile.eResource().getResourceSet();
-
- final Collection<ProfileFacetSet> allExistingFacetSets = getAllProfileFacetSets(resourceSet);
- for(final ProfileFacetSet current : allExistingFacetSets) {
- if(profileID.equals(((ProfileFacetSet)current).getRepresentedElement_XMI_ID())) {
- facetSets.add(current);
- }
- }
- return facetSets;
- }
-
- /**
- *
- * @param profileFacetSet
- * a profile facet set
- * @return
- * the list all {@link StereotypeFacet} owned by this {@link ProfileFacetSet} and its sub - {@link ProfileFacetSet}
- */
- public static final Collection<StereotypeFacet> getAllStereotypeFacets(final ProfileFacetSet profileFacetSet) {
- final Collection<StereotypeFacet> facets = new HashSet<StereotypeFacet>();
- for(final ProfileFacetSet current : profileFacetSet.getSubProfileFacetSet()) {
- facets.addAll(getAllStereotypeFacets(current));
- }
- facets.addAll(profileFacetSet.getStereotypeFacets());
- return facets;
- }
-
- /**
- *
- * @param resourceSet
- * a resourceset
- * @return
- * <code>true</code> if there is not several ProfileFacetSet representing Profile with the same ID in the same resource.
- * That is to say that we can have seral ProfileFacetSet representing Profile with the same id owned by differents resources!
- */
- public static final boolean areAllFacetSetUniqueByResource(final ResourceSet resourceSet) {
- final Map<String, Collection<Resource>> XMI_ID_Resource = new HashMap<String, Collection<Resource>>();
- final Collection<ProfileFacetSet> allExistingProfileFacetSet = getAllProfileFacetSets(resourceSet);
- for(ProfileFacetSet profileFacetSet : allExistingProfileFacetSet) {
- final String id = profileFacetSet.getRepresentedElement_XMI_ID();
- if(XMI_ID_Resource.containsKey(id)) {
- if(XMI_ID_Resource.get(id).contains(profileFacetSet.eResource())) {
- return false;
- }
- } else {
- Collection<Resource> res = new ArrayList<Resource>();
- XMI_ID_Resource.put(id, res);
- }
- XMI_ID_Resource.get(id).add(profileFacetSet.eResource());
- }
- return true;
- }
-
- /**
- *
- * @param profile
- * a profile
- * @param additionalResourceEPackage
- * an epackage
- * @return
- * the {@link ProfileFacetSet} for this profile if it is owned by the epackage or <code>null</code> if not found
- */
- public static final ProfileFacetSet findProfileFacetSet(final Profile profile, final EPackage additionalResourceEPackage) {
- final XMIResource resource = (XMIResource)profile.eResource();
- final String profileID = resource.getID(profile);
- for(final EPackage current : additionalResourceEPackage.getESubpackages()) {
- if(current instanceof ProfileFacetSet) {
- if(profileID.equals(((ProfileFacetSet)current).getRepresentedElement_XMI_ID())) {
- return (ProfileFacetSet)current;
- }
- }
- }
- return null;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java
deleted file mode 100644
index 0bd18765c6f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ArgumentUtils.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-
-public class ArgumentUtils {
-
-
- private ArgumentUtils() {
- //to prevent instanciation
- }
-
- public static final String STEREOTYPE_QUALIFIED_NAME = "stereotypeQualifiedName";
-
- public static final String EDITED_FEATURE = "editedFeature";
-
- public static final String EDITING_DOMAIN = "editingDomain";
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java
deleted file mode 100644
index 3d91238f683..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ModelQuerySetUtil.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.facet.infra.facet.Facet;
-import org.eclipse.emf.facet.infra.facet.FacetSet;
-import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
-import org.eclipse.emf.facet.infra.query.ModelQuerySet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
-
-
-public class ModelQuerySetUtil {
-
-
- private ModelQuerySetUtil() {
- //to prevent instanciation
- }
-
- /**
- *
- * @param eobject
- * this object can be an instance of :
- * <ul>
- * <li>{@link FacetStructuralFeature}</li>
- * <li>{@link Facet}</li>
- * <li>{@link ProfileFacetSet}</li>
- * </ul>
- * @return
- * the {@link ModelQuerySet} used by this eobject. We assume that all {@link Facet} and {@link FacetStructuralFeature} uses the same
- * {@link ModelQuerySet} for those queries
- */
- public static final ModelQuerySet getModelQuerySet(final EObject eobject) {
- if(eobject instanceof FacetStructuralFeature) {
- return ((FacetStructuralFeature)eobject).getValueQuery().getModelQuerySet();
- }
- if(eobject instanceof Facet) {
- return ((Facet)eobject).getConditionQuery().getModelQuerySet();
- }
- if(eobject instanceof FacetSet) {
- if(((FacetSet)eobject).getFacets().size() != 0) {
- return getModelQuerySet(((FacetSet)eobject).getFacets().get(0));
- } else if(((FacetSet)eobject).getESubpackages().size() != 0) {
- return getModelQuerySet(((FacetSet)eobject).getESubpackages().get(0));
- }
- }
- return null;
- }
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java
deleted file mode 100644
index 4cffad68a4f..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetDestroyer.java
+++ /dev/null
@@ -1,235 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.resource.ResourceSet;
-import org.eclipse.emf.facet.infra.facet.Facet;
-import org.eclipse.emf.facet.infra.query.ModelQuerySet;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.Column;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetAttributeColumn;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetReferenceColumn;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FeatureColumn;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.jface.dialogs.MessageDialog;
-import org.eclipse.papyrus.commands.wrappers.GMFtoEMFCommandWrapper;
-import org.eclipse.papyrus.infra.emf.commands.RemoveFromResourcecommand;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
-import org.eclipse.papyrus.uml.profilefacet.messages.Messages;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.swt.widgets.Display;
-import org.eclipse.uml2.uml.Profile;
-
-/**
- *
- * This class provides the command to destroy all columns, ProfileFacetSet and ModelQuerySet in a ResourceSet for a profile
- *
- */
-public class ProfileFacetSetDestroyer {
-
- /** the reapply profile */
- final private Profile profile;
-
- /** the editing domain for the command */
- final private TransactionalEditingDomain domain;
-
- /**
- *
- * Constructor.
- *
- * @param profile
- * tha managed profile
- */
- public ProfileFacetSetDestroyer(final Profile profile) {
- this.profile = profile;
- domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(profile);
- }
-
- /**
- *
- * @return
- * the command to destroy all existing querySet and facetset referecing the reapply profile
- */
- public Command getDestroyFacetSetCommand() {
- final CompoundCommand cmd = new CompoundCommand(Messages.ProfileFacetSetDestroyer_DestroyProfileFacetSetCommand);
-
- if(!AdditionalContentsUtils.areAllFacetSetUniqueByResource((profile.eResource().getResourceSet()))) {
- MessageDialog.openError(Display.getDefault().getActiveShell(), Messages.ProfileFacetSetDestroyer_RemoveProfileFacetSetForReappliedProfile, Messages.ProfileFacetSetDestroyer_ErrorMessageOnDeleteProfileFacetSet);
- return null;
- }
-
- //1. get the list of all ProfileFacetSet for this profile
- final Collection<ProfileFacetSet> facetSets = AdditionalContentsUtils.getAllFacetSet(profile);
-
- //2. get the list of all StereotypeFacet owned by the previous ProfileFacetSet
- final Collection<StereotypeFacet> facets = new HashSet<StereotypeFacet>();
- for(ProfileFacetSet profileFacetSet : facetSets) {
- facets.addAll(AdditionalContentsUtils.getAllStereotypeFacets(profileFacetSet));
- }
-
- //3. find all PapyrusTableInstance using StereotypeFacet of the previous list
- final Map<PapyrusTableInstance, Collection<StereotypeFacet>> map = getAllPapyrusTableInstanceToManaged(profile.eResource().getResourceSet(), facets);
-
- //4. we build the command to destroy all Column referencing FacetStructuralFeature owned by one of the managed StereotypeFacet
- for(final PapyrusTableInstance current : map.keySet()) {
- for(final Column column : current.getTable().getColumns()) {
- if(column instanceof FacetAttributeColumn || column instanceof FacetReferenceColumn) {
- final EObject featureContainer = ((FeatureColumn)column).getFeature().eContainer();
- if(facets.contains(featureContainer)) {
- ICommand cc = new AbstractTransactionalCommand(domain, Messages.ProfileFacetSetDestroyer_RemoveColumns, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- current.getTable().getColumns().remove(column);
- return null;
- }
- };
- cmd.append(new GMFtoEMFCommandWrapper(cc));
- cc = null;
- }
- }
- }
-
- //4.1 remove the application of the facet for the current table
- ICommand cc = new AbstractTransactionalCommand(domain, Messages.ProfileFacetSetDestroyer_RemoveFacetSetAppliedOnTheTable, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- current.getTable().getFacets2().removeAll(map.get(current));
- return null;
- }
- };
- cmd.append(new GMFtoEMFCommandWrapper(cc));
-
-
- }
-
- //5. we build a map, with the EPackage additional contents as key and the list of ProfileFacetSet that they own and that we should remove as value
- final Map<EPackage, Collection<ProfileFacetSet>> ePackage_ProfileFacetSet = new HashMap<EPackage, Collection<ProfileFacetSet>>();
- for(final ProfileFacetSet set : facetSets) {
- final EPackage pack = (EPackage)set.eContainer();
- if(!ePackage_ProfileFacetSet.containsKey(pack)) {
- ePackage_ProfileFacetSet.put(pack, new ArrayList<ProfileFacetSet>());
- }
- ePackage_ProfileFacetSet.get(pack).add(set);
- }
-
- //6. we build the command to unreference the ProfileFacetSet and their associated QuerySet
- for(final EPackage pack : ePackage_ProfileFacetSet.keySet()) {
- final Collection<ProfileFacetSet> value = ePackage_ProfileFacetSet.get(pack);
-
- //6.1 : remove the facetset of the EPackage
- ICommand cc = new AbstractTransactionalCommand(domain, null, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- pack.getESubpackages().removeAll(value);
- return CommandResult.newOKCommandResult();
- }
- };
-
-
- cmd.append(new GMFtoEMFCommandWrapper(cc));
-
- //6.2 we remove the additional contents EPackage if needed. We can't know before to execute the method in case of SEVERAL profile re-application
- cc = new AbstractTransactionalCommand(domain, null, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
- if(pack.getESubpackages().size() == 0) {
- new RemoveFromResourcecommand(domain, pack.eResource(), pack).execute();
- }
- return CommandResult.newOKCommandResult();
- }
- };
- cmd.append(new GMFtoEMFCommandWrapper(cc));
- cc = null;
-
- //6.3 remove the QuerySet from the resource
- for(final ProfileFacetSet set : value) {
- final ModelQuerySet querySet = ModelQuerySetUtil.getModelQuerySet(set);
- if(querySet != null) {
- cmd.append(new RemoveFromResourcecommand(domain, querySet.eResource(), querySet));
- }
- }
- }
- return cmd;
- }
-
- /**
- *
- * @param resourceSet
- * a {@link ResourceSet}
- * @param allKnownFacets
- * the collection of the know StereotypeFacet
- * @return
- * a map with {@link PapyrusTableInstance} as key and a collection of the referenced {@link StereotypeFacet} contained by allKnownFacets
- * that they reference
- */
- public Map<PapyrusTableInstance, Collection<StereotypeFacet>> getAllPapyrusTableInstanceToManaged(final ResourceSet resourceSet, final Collection<StereotypeFacet> allKnownFacets) {
- final Map<PapyrusTableInstance, Collection<StereotypeFacet>> map = new HashMap<PapyrusTableInstance, Collection<StereotypeFacet>>();
- for(final PapyrusTableInstance pTable : getAllPapyrusTableInstances(resourceSet)) {
- if(!domain.isReadOnly(pTable.eResource())) {
- final Collection<StereotypeFacet> usedStereotypeFacets = new ArrayList<StereotypeFacet>();
- for(final Facet current : pTable.getTable().getFacets2()) {
- if(current instanceof StereotypeFacet && allKnownFacets.contains(current)) {
- usedStereotypeFacets.add((StereotypeFacet)current);
- }
- }
- if(!usedStereotypeFacets.isEmpty()) {
- map.put(pTable, usedStereotypeFacets);
- }
- }
- }
- return map;
- }
-
-
- /**
- *
- * @param resourceSet
- * a resourceSet
- * @return
- * a collection owning all {@link PapyrusTableInstance} owned by {@link Resource} of the {@link ResourceSet}
- */
- public static final Collection<PapyrusTableInstance> getAllPapyrusTableInstances(final ResourceSet resourceSet) {
- final Collection<PapyrusTableInstance> allTables = new ArrayList<PapyrusTableInstance>();
- for(final Resource resource : resourceSet.getResources()) {
- for(final EObject current : resource.getContents()) {
- if(current instanceof PapyrusTableInstance) {
- allTables.add((PapyrusTableInstance)current);
- }
- }
- }
- return allTables;
- }
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java
deleted file mode 100644
index d98dcf83666..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetMoveHelper.java
+++ /dev/null
@@ -1,582 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 Atos.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Olivier Melois (ATOS) olivier.melois@atos.net - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Iterator;
-import java.util.Map;
-import java.util.Set;
-
-import org.eclipse.core.commands.ExecutionException;
-import org.eclipse.core.runtime.Assert;
-import org.eclipse.core.runtime.IAdaptable;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EStructuralFeature.Setting;
-import org.eclipse.emf.ecore.resource.Resource;
-import org.eclipse.emf.ecore.util.ECrossReferenceAdapter;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.ecore.util.EcoreUtil.Copier;
-import org.eclipse.emf.ecore.xmi.XMIResource;
-import org.eclipse.emf.facet.infra.facet.Facet;
-import org.eclipse.emf.facet.infra.facet.FacetSet;
-import org.eclipse.emf.facet.infra.query.ModelQuerySet;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetAttributeColumn;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.FacetReferenceColumn;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance.TableInstance;
-import org.eclipse.emf.facet.widgets.nattable.instance.tableinstance2.TableInstance2;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.gmf.runtime.common.core.command.CommandResult;
-import org.eclipse.gmf.runtime.common.core.command.ICommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.AbstractTransactionalCommand;
-import org.eclipse.gmf.runtime.emf.commands.core.command.CompositeTransactionalCommand;
-import org.eclipse.papyrus.infra.table.instance.papyrustableinstance.PapyrusTableInstance;
-import org.eclipse.papyrus.infra.table.instance.util.TableContentsUtils;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-
-/**
- * Helper used to move the tables into the right resources when controlling a package.
- */
-public final class ProfileFacetSetMoveHelper {
-
-
- private ProfileFacetSetMoveHelper() {
- //to prevent instanciation
- }
-
-// public static void addAllPageRefTableMoveCommands(final TransactionalEditingDomain domain, final EObject selection, final Resource source, final Resource target, final SashWindowsMngr windowsMngr, final CompoundCommand commandToModify) {
-// //1. we get the PapyrusTable to move
-// final Collection<PapyrusTableInstance> tables = getPapyrusTableInstances(selection);
-//
-// //2. add pages to the page list
-// for(final PapyrusTableInstance pTable : tables) {
-// final PageRef pageRef = DiUtils.getPageRef(source, pTable);
-// final ICommand addPageCommand = new AbstractTransactionalCommand(domain, "Add Page Command", null) { //$NON-NLS-1$
-//
-// @Override
-// protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
-// windowsMngr.getPageList().addPage(pageRef.getPageIdentifier());
-// try {
-// DiUtils.addPageToTabFolder(windowsMngr, pageRef);
-// } catch (final SashEditorException e) {
-// // Activator.log.error(e);
-// return CommandResult.newErrorCommandResult(e);
-// }
-// return CommandResult.newOKCommandResult();
-// }
-// };
-//
-// commandToModify.append(new GMFtoEMFCommandWrapper(addPageCommand));
-// }
-// }
-//
-// /**
-// * Adds commands to move every table that descend from the selection to the target resource.
-// */
-// public static void addAllTableMoveCommands(EditingDomain domain, EObject selection, final Resource source, final Resource target, CompoundCommand commandToModify) {
-//
-// /*
-// * All the tables in the tables that descend from the selection.
-// */
-// // Iterable<EObject> allDescendingPapyrusTables = createDescendantTablesIterable(selection);
-//
-// /*
-// * Making sure the editing domain is transactional.
-// */
-// if(!(domain instanceof TransactionalEditingDomain)) {
-// throw new RuntimeException("Unable to retrieve the transactional editing domain");////$NON-NLS-1$
-// }
-// TransactionalEditingDomain editingDomain = (TransactionalEditingDomain)domain;
-//
-// /*
-// * Moving every table from the new resource.
-// */
-//
-// final Collection<PapyrusTableInstance> pTables = getPapyrusTableInstances(selection);
-// final Collection<TableInstance2> tablesInstances = new ArrayList<TableInstance2>();
-// for(PapyrusTableInstance papyrusTableInstance : pTables) {
-// tablesInstances.add(papyrusTableInstance.getTable());
-// }
-//
-// final ICommand changeResourceCommand = new AbstractTransactionalCommand(editingDomain, "", Collections.emptyList()) { //$NON-NLS-1$
-//
-// @Override
-// protected CommandResult doExecuteWithResult(IProgressMonitor monitor, IAdaptable info) throws ExecutionException {
-// target.getContents().addAll(pTables);
-// target.getContents().addAll(tablesInstances);
-// return CommandResult.newOKCommandResult();
-// }
-// };
-// commandToModify.append(new GMFtoEMFCommandWrapper(changeResourceCommand));
-// }
-//
-//
-// /**
-// *
-// * @param selection
-// * the current selection
-// * @return
-// * the list of the papyrus table instance which have the selection has context
-// */
-// protected static Collection<PapyrusTableInstance> getPapyrusTableInstances(final EObject selection) {
-// final Collection<PapyrusTableInstance> pTables = new ArrayList<PapyrusTableInstance>();
-// Iterable<EObject> allDescendingPapyrusTables = createDescendantTablesIterable(selection);
-// for(EObject eObject : allDescendingPapyrusTables) {
-// if(eObject instanceof PapyrusTableInstance) {
-// pTables.add((PapyrusTableInstance)eObject);
-// }
-// }
-// return pTables;
-//
-// }
-//
-// /**
-// * Creates an iterable containing all the Papyrus Tables that are descending from the context.
-// *
-// * @author olivier melois (Atos)
-// */
-// public static Iterable<EObject> createDescendantTablesIterable(EObject context) {
-//
-// Set<EObject> result = Sets.newHashSet();
-//
-// TreeIterator<EObject> eAllContents = EcoreUtil.getAllProperContents(context, true); // was context.eAllContents().
-// Iterator<EObject> contextAndDescendants = Iterators.concat(eAllContents, Iterators.singletonIterator(context));
-//
-// final Predicate<Setting> keepPapyrusTableInstances = new Predicate<Setting>() {
-//
-// public boolean apply(Setting setting) {
-// boolean result = true;
-// if(setting != null) {
-// EObject settingEObject = setting.getEObject();
-// result &= settingEObject instanceof PapyrusTableInstance;
-// result &= PapyrustableinstancePackage.Literals.PAPYRUS_TABLE_INSTANCE__TABLE == setting.getEStructuralFeature();
-// } else {
-// result = false;
-// }
-// return result;
-// }
-// };
-//
-// /*
-// * Predicate used to keep the usages which are PapyrusTableInstances
-// */
-// Predicate<Setting> keepTableInstances = new Predicate<Setting>() {
-//
-// public boolean apply(Setting setting) {
-// boolean result = true;
-// if(setting != null) {
-// EObject settingEObject = setting.getEObject();
-// result &= settingEObject instanceof TableInstance;
-// result &= setting.getEStructuralFeature() == TableinstancePackage.Literals.TABLE_INSTANCE__CONTEXT;
-//
-// Collection<Setting> references = PapyrusEcoreUtils.getUsages(settingEObject);
-// Iterable<Setting> papyrusTableInstances = Iterables.filter(references, keepPapyrusTableInstances);
-// //Veryfing that there is at least one papyrusTableInstance
-// result = result && !Iterables.isEmpty(papyrusTableInstances);
-//
-// } else {
-// result = false;
-// }
-// return result;
-// }
-// };
-//
-// /*
-// * Function to get the eObject from a setting
-// */
-// Function<Setting, EObject> getEObject = new Function<Setting, EObject>() {
-//
-// public EObject apply(Setting input) {
-// EObject settingEObject = input.getEObject();
-// Collection<Setting> references = PapyrusEcoreUtils.getUsages(settingEObject);
-// Iterable<Setting> papyrusTableInstances = Iterables.filter(references, keepPapyrusTableInstances);
-// //Getting the eobject of thie first element of this iterable.
-// return Iterables.get(papyrusTableInstances, 0).getEObject();
-// }
-//
-// };
-//
-// /*
-// * For the context and his descendants :
-// */
-// while(contextAndDescendants.hasNext()) {
-// EObject current = contextAndDescendants.next();
-// //Usages
-// Iterable<Setting> usages = PapyrusEcoreUtils.getUsages(current);
-// //Filtering to keep only papyrus table instances.
-// Iterable<Setting> tableInstanceSettings = Iterables.filter(usages, keepTableInstances);
-// //Getting the eObjects
-// Iterable<EObject> papyrusTableInstances = Iterables.transform(tableInstanceSettings, getEObject);
-// //Adding all the kept usages.
-// Iterables.addAll(result, papyrusTableInstances);
-// }
-//
-// return result;
-// }
-
- public static ICommand getMoveAllFacetSetsCommand(TransactionalEditingDomain domain, EObject selection, Resource source, final Resource target) {
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "Move facet sets");
- final Collection<PapyrusTableInstance> pTables = TableContentsUtils.getPapyrusTableInstances(selection);
- if(!pTables.isEmpty()) {
- final Set<Facet> facetsUsed = new HashSet<Facet>();
- for(PapyrusTableInstance papyrusTableInstance : pTables) {
- facetsUsed.addAll(papyrusTableInstance.getTable().getFacets2());
- }
-
- //1.we get the list of the facetset to move
- final Set<FacetSet> facetsets = new HashSet<FacetSet>();
- for(Facet facet : facetsUsed) {
- final FacetSet facetset = getRootFacetSet(facet);
- if(facetset.eResource() == source) {
- facetsets.add(facetset);
- }
- }
- if(!facetsets.isEmpty()) {
-
- //3. we look for the additionalFacetSet
- final EPackage additionalEPackageSource = AdditionalContentsUtils.getAdditionalContentsEPackage(source);
- final EPackage additionalEPackageTarget = AdditionalContentsUtils.getAdditionalContentsEPackage(target);
-
- //indicate if we should move the additionalFacetSet from the source to the target
- boolean moveAdditionalFacetSet = facetsets.size() != 0;
- if(additionalEPackageSource == null && additionalEPackageTarget == null) {
- //nothing to do
- } else if(additionalEPackageSource == null && additionalEPackageTarget != null) {
- //nothing to do
- } else if(additionalEPackageSource != null) {
- if(moveAdditionalFacetSet) {
- if(additionalEPackageTarget != null) {
- ICommand tmp = getMergeAdditionalContentsEPackageCommand((TransactionalEditingDomain)domain, (XMIResource)source, (XMIResource)target, pTables, facetsets, facetsets, additionalEPackageSource, additionalEPackageTarget);
- if(tmp != null) {
- cc.add(tmp);
- }
- } else {
- //we should copy the AdditionalContentsEPackage
- final Copier copier = new Copier();
- final EPackage copy = (EPackage)copier.copy(additionalEPackageSource);
-
- //we copy only the required facetSet, that why we do a clear on the epackage contents
- copy.getEClassifiers().clear();
- copy.getESubpackages().clear();
- final Collection<FacetSet> duplicatedFacetSets = copier.copyAll(facetsets);
- copy.getESubpackages().addAll(duplicatedFacetSets);
-
- final Collection<ModelQuerySet> sets = new HashSet<ModelQuerySet>();
- for(final FacetSet current : facetsets) {
- final ModelQuerySet tmp = ModelQuerySetUtil.getModelQuerySet(current);
- if(tmp != null) {
- sets.add(tmp);
- }
- }
-
- final Collection<ModelQuerySet> duplicatedQuerySet = copier.copyAll(sets);
- copier.copyReferences();
- final ICommand addToResource = new AbstractTransactionalCommand((TransactionalEditingDomain)domain, "Add the copy of the Additional Content EPackage to the resource", null) { //$NON-NLS-1$
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- target.getContents().add(copy);
- target.getContents().addAll(duplicatedQuerySet);
- return CommandResult.newOKCommandResult();
- }
- };
- cc.add(addToResource);
-
- ICommand tmp2 = getUpdateFacetElementReferencesCommand((TransactionalEditingDomain)domain, pTables, copier);
- if(tmp2 != null) {
- cc.add(tmp2);
- }
-
- cc.add(getCopyXMI_IDCommand((TransactionalEditingDomain)domain, copier));
- }
- }
- }
- }
- }
- if(cc.isEmpty()) {
- return null;
- }
- return cc;
- }
-
- /**
- *
- * @param domain
- * the editing domain
- * @param sourceResource
- * the source resource
- * @param targetResource
- * the target resource
- * @param tables
- * the list of the controlled tables
- * @param sourceFacetSets
- * the facetsets referenced by the source resource
- * @param targetFacetSets
- * the facetsets referenced by the target resource
- * @param source
- * the additional contents EPackage source
- * @param target
- * the additional contents EPackage target
- * @return
- * the command to merge the contents of the Epakche source into the EPackage target AND duplicating the required ModelQuerySet referenced
- * by the source FacetSets
- */
- private static ICommand getMergeAdditionalContentsEPackageCommand(final TransactionalEditingDomain domain, final XMIResource sourceResource, final XMIResource targetResource, final Collection<PapyrusTableInstance> tables, final Collection<FacetSet> sourceFacetSets, Collection<FacetSet> targetFacetSets, EPackage source, final EPackage target) {
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "Merge additional epackage contents");
- //1. we init the maps
- final Map<ModelQuerySet, ModelQuerySet> sourceVSTargetModelQuerySet = new HashMap<ModelQuerySet, ModelQuerySet>();
- final Map<String, FacetSet> sourceMap = new HashMap<String, FacetSet>();
- for(final FacetSet current : sourceFacetSets) {
- final String XMI_ID = sourceResource.getID(current);
- sourceMap.put(XMI_ID, current);
- }
- final Map<String, FacetSet> targeteMap = new HashMap<String, FacetSet>();
- for(final FacetSet current : targetFacetSets) {
- final String XMI_ID = targetResource.getID(current);
- targeteMap.put(XMI_ID, current);
- }
-
- //2. we look for the facet set to create
- for(final String XMI_ID : sourceMap.keySet()) {
- final FacetSet sourceFacetSet = sourceMap.get(XMI_ID);
- final FacetSet targetFacetSet = targeteMap.get(XMI_ID);
- if(targetFacetSet == null) {
- //we create the facetset
- final Copier copier = new Copier();
- final FacetSet copy = (FacetSet)copier.copy(sourceFacetSet);
- final ModelQuerySet modelQuerySet = ModelQuerySetUtil.getModelQuerySet(sourceFacetSet);
- if(!sourceVSTargetModelQuerySet.containsKey(modelQuerySet)) {
- final ModelQuerySet duplicatedQuerySet = (ModelQuerySet)copier.copy(modelQuerySet);
- sourceVSTargetModelQuerySet.put(modelQuerySet, duplicatedQuerySet);
- final ICommand addModelQuerySetToResource = new AbstractTransactionalCommand(domain, null, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- targetResource.getContents().add(duplicatedQuerySet);
- return CommandResult.newOKCommandResult();
- }
- };
- cc.add(addModelQuerySetToResource);
- }
-
- copier.copyReferences();
- targeteMap.put(XMI_ID, copy);
- final ICommand addFacetSetToAdditionalContentsFacetSet = new AbstractTransactionalCommand(domain, null, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- target.getESubpackages().add(copy);
- return CommandResult.newOKCommandResult();
- }
- };
- cc.add(addFacetSetToAdditionalContentsFacetSet);
- cc.add(getCopyXMI_IDCommand(domain, copier));
- ICommand tmp = getUpdateFacetElementReferencesCommand(domain, tables, copier);
- if(tmp != null) {
- cc.add(tmp);
- }
- }
- }
- if(cc.isEmpty()) {
- return null;
- } else {
- return cc;
- }
- }
-
-
- /**
- *
- * @param facet
- * a facet
- * @return
- * the root facetset for this facet (the root facetset is maybe not the high level container)
- */
- public static final FacetSet getRootFacetSet(final Facet facet) {
- FacetSet set = (FacetSet)facet.eContainer();
- while(set.eContainer() != null && set.eContainer() instanceof FacetSet) {
- set = (FacetSet)set.eContainer();
- }
- return set;
- }
-
-
- /**
- * Gets the copy xm i_ id command.
- *
- * @param domain
- * the editing domain for the command
- * @param map
- * the map with the source object as key and the target object as value
- * @return the copy xm i_ id command
- * the command set the XMI_ID of the source eobject to the target eobject
- */
- private static ICommand getCopyXMI_IDCommand(final TransactionalEditingDomain domain, final Map<EObject, EObject> map) {
- return new AbstractTransactionalCommand(domain, "Copy XMI_ID Command", null) { //$NON-NLS-1$
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- for(final EObject sourceValue : map.keySet()) {
- final EObject targetValue = map.get(sourceValue);
- Assert.isNotNull(targetValue);
- final XMIResource sourceRes = (XMIResource)sourceValue.eResource();
- final XMIResource targetRes = (XMIResource)targetValue.eResource();
-
- assert sourceRes != null;
- assert targetRes != null;
- final String XMI_ID = sourceRes.getID(sourceValue);
- targetRes.setID(targetValue, XMI_ID);
- }
- return CommandResult.newOKCommandResult();
- }
- };
- }
-
- /**
- * Gets the update facet element references command.
- *
- * @param domain
- * the editing domain
- * @param papyrusTables
- * the list of the controlled tables
- * @param sourceToTarget
- * the map with the source element as key and the target element as value
- * @return the update facet element references command
- * the command to replace each call to source element by a call to target element in the managed tables or <code>null</code> if there is
- * nothing to do
- */
- private static ICommand getUpdateFacetElementReferencesCommand(final TransactionalEditingDomain domain, final Collection<PapyrusTableInstance> papyrusTables, final Map<EObject, EObject> sourceToTarget) {
- CompositeTransactionalCommand cc = new CompositeTransactionalCommand(domain, "Update References To facet Element Command");
- final Collection<TableInstance2> tableInstances = new ArrayList<TableInstance2>();
- for(final PapyrusTableInstance pTable : papyrusTables) {
- tableInstances.add(pTable.getTable());
- }
- for(final PapyrusTableInstance pTable : papyrusTables) {
- for(final EObject eobjectSource : sourceToTarget.keySet()) {
- final EObject eobjectTarget = sourceToTarget.get(eobjectSource);
- if(eobjectSource instanceof StereotypePropertyElement) {
- final ECrossReferenceAdapter adapter = ECrossReferenceAdapter.getCrossReferenceAdapter(eobjectSource);
- for(final Setting setting : adapter.getNonNavigableInverseReferences(eobjectSource)) {
- final EObject eobject = setting.getEObject();
- if(eobject instanceof FacetAttributeColumn || eobject instanceof FacetReferenceColumn) {
- final TableInstance t = (TableInstance)eobject.eContainer();
- if(tableInstances.contains(t)) {
- final ICommand cmd = new AbstractTransactionalCommand(domain, null, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- EcoreUtil.replace(setting, eobjectSource, eobjectTarget);
- return CommandResult.newOKCommandResult();
- }
- };
- cc.add(cmd);
- }
- }
- }
- } else if(eobjectSource instanceof Facet) {
- final ECrossReferenceAdapter adapter = ECrossReferenceAdapter.getCrossReferenceAdapter(eobjectSource);
- for(final Setting setting : adapter.getNonNavigableInverseReferences(eobjectSource)) {
- final EObject eobject = setting.getEObject();
- if(eobject instanceof TableInstance2 && tableInstances.contains(eobject)) {
- final ICommand cmd = new AbstractTransactionalCommand(domain, null, null) {
-
- @Override
- protected CommandResult doExecuteWithResult(final IProgressMonitor monitor, final IAdaptable info) throws ExecutionException {
- EcoreUtil.replace(setting, eobjectSource, eobjectTarget);
- return CommandResult.newOKCommandResult();
- }
- };
- cc.add(cmd);
- }
- }
- }
- }
- }
- if(cc.isEmpty()) {
- return null;
- }
- return cc;
- }
-
-
- /**
- * Creates the mapping between facet sets.
- *
- * @param source
- * the source FacetSet (should be the AdditionalContentsFacetSet source
- * @param target
- * the target FacetSet (should be the AdditionalContentsFacetSet target
- * @return the map
- * a map with the source elements as key and the target elements as values
- */
- private static Map<EObject, EObject> createMappingBetweenFacetSets(final EPackage source, final EPackage target) {
- final Map<String, EObject> sourceMap = createXMI_ID_MapForFacetSetContents(source);
- final Map<String, EObject> targetMap = createXMI_ID_MapForFacetSetContents(target);
- final Map<EObject, EObject> mapping = new HashMap<EObject, EObject>();
-
- for(final String xmi_id : sourceMap.keySet()) {
- final EObject key = sourceMap.get(xmi_id);
- final EObject value = targetMap.get(xmi_id);
- if(value != null) {
- mapping.put(key, value);
- }
- }
- return mapping;
- }
-
- /**
- * Creates the xm i_ i d_ map_ for first facet sets.
- *
- * @param set
- * a facetset
- * @return the map
- * a map with the XMI_ID of the owned subFacetSet (first level only) as key and the corresponding FacetSet as value
- */
- private static Map<String, FacetSet> createXMI_ID_Map_ForFirstFacetSets(final EPackage set) {
- final Map<String, FacetSet> map = new HashMap<String, FacetSet>();
- final XMIResource sourceRes = (XMIResource)set.eResource();
- for(final EPackage current : set.getESubpackages()) {
- if(current instanceof FacetSet) {
- final String XMI_ID = sourceRes.getID(current);
- map.put(XMI_ID, (FacetSet)current);
- }
- }
- return map;
- }
-
- /**
- * Creates the xm i_ i d_ map for facet set contents.
- *
- * @param set
- * a facetset
- * @return the map
- * a map with the XMI_ID of the facet as key and its eobject as value
- */
- private static Map<String, EObject> createXMI_ID_MapForFacetSetContents(final EPackage set) {
- final Map<String, EObject> map = new HashMap<String, EObject>();
- final XMIResource resource = (XMIResource)set.eResource();
- final Iterator<EObject> iter = set.eAllContents();
- while(iter.hasNext()) {
- final EObject key = iter.next();
- final String XMI_ID = resource.getID(key);
- map.put(XMI_ID, key);
- }
- return map;
- }
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java
deleted file mode 100644
index 517833a45e5..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/ProfileFacetSetUpdater.java
+++ /dev/null
@@ -1,345 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-
-import org.eclipse.emf.common.command.Command;
-import org.eclipse.emf.common.command.CompoundCommand;
-import org.eclipse.emf.common.util.TreeIterator;
-import org.eclipse.emf.ecore.ENamedElement;
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EPackage;
-import org.eclipse.emf.ecore.EcorePackage;
-import org.eclipse.emf.ecore.util.EcoreUtil;
-import org.eclipse.emf.edit.command.AddCommand;
-import org.eclipse.emf.edit.command.CommandParameter;
-import org.eclipse.emf.edit.command.SetCommand;
-import org.eclipse.emf.facet.infra.facet.Facet;
-import org.eclipse.emf.facet.infra.facet.FacetSet;
-import org.eclipse.emf.facet.infra.facet.FacetStructuralFeature;
-import org.eclipse.emf.facet.infra.query.ModelQuery;
-import org.eclipse.emf.facet.infra.query.ModelQuerySet;
-import org.eclipse.emf.facet.infra.query.QueryPackage;
-import org.eclipse.emf.transaction.TransactionalEditingDomain;
-import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.Argument;
-import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.ParametricQuery;
-import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.ParametricqueryPackage;
-import org.eclipse.papyrus.infra.emf.facet.queries.parametricquery.StringArgument;
-import org.eclipse.papyrus.infra.emf.utils.EMFHelper;
-import org.eclipse.papyrus.uml.profilefacet.Activator;
-import org.eclipse.papyrus.uml.profilefacet.generation.factory.ProfileFacetGenericFactory;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.EObjectFacetRepresentation;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetPackage;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.ProfileFacetSet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-import org.eclipse.uml2.uml.Profile;
-
-
-public class ProfileFacetSetUpdater {
-
- final private ProfileFacetSet source;
-
- final private Profile profile;
-
- private Map<String, EObjectFacetRepresentation> currentMap;
-
- private Map<String, EObjectFacetRepresentation> newMap;
-
- final private TransactionalEditingDomain domain;
-
- final private ModelQuerySet sourceQuerySet;
-
- public ProfileFacetSetUpdater(final Profile profile, final ProfileFacetSet source) {
- this.source = source;
- this.profile = profile;
- this.sourceQuerySet = getModelQuerySet(source);
- domain = (TransactionalEditingDomain)EMFHelper.resolveEditingDomain(profile);
- }
-
-
- public static final ModelQuerySet getModelQuerySet(final EObject obj) {
- if(obj instanceof FacetStructuralFeature) {
- return ((FacetStructuralFeature)obj).getValueQuery().getModelQuerySet();
- }
- if(obj instanceof Facet) {
- return ((Facet)obj).getConditionQuery().getModelQuerySet();
- }
- if(obj instanceof FacetSet) {
- if(((FacetSet)obj).getFacets().size() != 0) {
- return getModelQuerySet(((FacetSet)obj).getFacets().get(0));
- }
- }
- return null;
- }
-
- public Command getUpdateCommand() {
- final CompoundCommand cmd = new CompoundCommand("Update ProfileFacetSet command");
- final ProfileFacetGenericFactory factory = new ProfileFacetGenericFactory();
- final ProfileFacetSet generatedFacetSet = factory.createProfileFacetSet(this.profile);
-
- this.currentMap = createMapping(this.source);
- this.newMap = createMapping(generatedFacetSet);
-
- //1. we update the name changes
- Command tmp = getRenameElementCommand();
- if(tmp != null) {
- if(tmp.canExecute()) {
- cmd.append(tmp);
- } else {
- Activator.log.warn("Rename ProfileFacetSet Command according to reapplied profile is not executable");
- }
- }
-
-// tmp = getAddElementCommand();
-// if(tmp != null) {
-// if(tmp.canExecute()) {
-// cmd.append(tmp);
-// } else {
-// Activator.log.warn("Add ProfileFacetSet element command according to reapplied profile is not executable");
-// }
-// }
-
- EcoreUtil.delete(generatedFacetSet);
- return cmd;
- }
-
-
- private Map<String, EObjectFacetRepresentation> createMapping(final ProfileFacetSet set) {
- final Map<String, EObjectFacetRepresentation> map = new HashMap<String, EObjectFacetRepresentation>();
- map.put(set.getRepresentedElement_XMI_ID(), set);
- final TreeIterator<EObject> iter = set.eAllContents();
- while(iter.hasNext()) {
- final EObject current = iter.next();
- if(current instanceof EObjectFacetRepresentation) {
- final String representedEObjectID = ((EObjectFacetRepresentation)current).getRepresentedElement_XMI_ID();
- map.put(representedEObjectID, (EObjectFacetRepresentation)current);
- }
- }
- return map;
- }
-
- private Command getRenameElementCommand() {
- final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
- for(final String xmi_id : currentMap.keySet()) {
- final ENamedElement current = (ENamedElement)currentMap.get(xmi_id);
- final ENamedElement new_ = (ENamedElement)newMap.get(xmi_id);
- if(!current.getName().equals(new_.getName())) {
-
- //1. update the name
- CommandParameter commandParameter = new CommandParameter(current, EcorePackage.eINSTANCE.getENamedElement_Name(), new_.getName());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
-
- if(current instanceof EPackage) {
- //2. update the nsURI
- commandParameter = new CommandParameter(current, EcorePackage.eINSTANCE.getEPackage_NsURI(), ((EPackage)new_).getNsURI());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
- //3. update the nsPrefix
- commandParameter = new CommandParameter(current, EcorePackage.eINSTANCE.getEPackage_NsPrefix(), ((EPackage)new_).getNsPrefix());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
- }
- //4. update the profile qualified name
- if(current instanceof ProfileFacetSet) {
- commandParameter = new CommandParameter(current, ProfileFacetPackage.eINSTANCE.getProfileFacetSet_ProfileQualifiedName(), ((ProfileFacetSet)new_).getProfileQualifiedName());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
- }
-
- //5. update the stereotype qualified name
- if(current instanceof StereotypeFacet) {
- commandParameter = new CommandParameter(current, ProfileFacetPackage.eINSTANCE.getStereotypeFacet_StereotypeQualifiedName(), ((StereotypeFacet)new_).getStereotypeQualifiedName());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
-
- final StereotypeFacet facet = (StereotypeFacet)current;
- final ModelQuery query = facet.getConditionQuery();
- final ModelQuery newQuery = ((StereotypeFacet)new_).getConditionQuery();
-
- //5.1 we update the query
- final Command tmp = getUpdateQueryCommand(newQuery, query);
- if(tmp != null) {
- cmd.append(tmp);
- }
- }
-
- //6. update the represented property
- if(current instanceof StereotypePropertyElement) {
- //we update the property qualified name
- commandParameter = new CommandParameter(current, ProfileFacetPackage.eINSTANCE.getStereotypePropertyElement_PropertyQualifiedName(), ((StereotypePropertyElement)new_).getPropertyQualifiedName());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
-
-
- //we should update the set queries
- final ModelQuery currentSetQuery = ((StereotypePropertyElement)current).getSetQuery();
- final ModelQuery newSetQuery = ((StereotypePropertyElement)new_).getSetQuery();
- Command tmp = getUpdateQueryCommand(newSetQuery, currentSetQuery);
- if(tmp != null) {
- cmd.append(tmp);
- }
-
- //we should update the value queries
- final ModelQuery currentValueQuery = ((StereotypePropertyElement)current).getValueQuery();
- final ModelQuery newValueQuery = ((StereotypePropertyElement)new_).getValueQuery();
-
- tmp = getUpdateQueryCommand(newValueQuery, currentValueQuery);
- if(tmp != null) {
- cmd.append(tmp);
- }
-
- }
- }
- }
- if(cmd.isEmpty()) {
- return null;
- }
- return cmd;
- }
-
- private Command getUpdateQueryCommand(final ModelQuery source, final ModelQuery target) {
- assert source.eResource() == null;
- assert target.eResource() != null;
- final CompoundCommand cmd = new CompoundCommand("Update Query Command");
- //5.1 update the name of the query
- CommandParameter commandParameter = new CommandParameter(target, QueryPackage.eINSTANCE.getModelQuery_Name(), source.getName());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
-
- //5.2. we update the description of the setQuery
- commandParameter = new CommandParameter(target, QueryPackage.eINSTANCE.getModelQuery_Description(), source.getDescription());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
-
- //5.3 update the value of the argument
- if(target instanceof ParametricQuery) {
- final ParametricQuery targetParamQuery = (ParametricQuery)target;
- final ParametricQuery sourceParamQuery = (ParametricQuery)source;
-
- //4. update the stereotype qualified name
- final Argument sourceArg = getArgument(sourceParamQuery, ArgumentUtils.STEREOTYPE_QUALIFIED_NAME);
- final Argument targetArg = getArgument(targetParamQuery, ArgumentUtils.STEREOTYPE_QUALIFIED_NAME);
- if(sourceArg != null) {
- assert targetArg != null;
- assert sourceArg instanceof StringArgument;
- assert targetArg instanceof StringArgument;
- commandParameter = new CommandParameter(targetArg, ParametricqueryPackage.eINSTANCE.getStringArgument_Value(), ((StringArgument)sourceArg).getValue());
- cmd.append(domain.createCommand(SetCommand.class, commandParameter));
- }
- }
- return cmd;
- }
-
- private Argument getArgument(final ParametricQuery query, final String argumentName) {
- for(Argument argument : query.getArguments()) {
- if(argumentName.equals(argument.getArgumentName())) {
- return argument;
- }
- }
- return null;
-
- }
-
- private Command getMultiplicityPropertyChangeCommand() {
- final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
- return cmd;
- }
-
- private Command getPropertyTypeChangeCommand() {
- final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
- //FIXME warning between reference and attribute
- return cmd;
- }
-
- private Command getAddElementCommand() {
- final CompoundCommand cmd = new CompoundCommand("Add Elements Command");
- final Collection<String> currentElements = currentMap.keySet();
- final Collection<String> newElements = newMap.keySet();
- newElements.removeAll(currentElements);
-
- final Collection<ProfileFacetSet> newFacetSets = new ArrayList<ProfileFacetSet>();
- for(final String element : newElements) {
- final EObjectFacetRepresentation newElement = newMap.get(element);
- final EObjectFacetRepresentation parent = (EObjectFacetRepresentation)newElement.eContainer();
-
-
-
-
- final String parentElementId = parent.getRepresentedElement_XMI_ID();
- if(currentMap.containsKey(parentElementId)) {//we should manage it
- if(parent instanceof Facet && newElement instanceof FacetStructuralFeature) {
- CommandParameter param = new CommandParameter(parent, EcorePackage.eINSTANCE.getEClass_EStructuralFeatures(), newElement);
- cmd.append(domain.createCommand(AddCommand.class, param));
- } else if(parent instanceof FacetSet && newElement instanceof Facet) {
- CommandParameter param = new CommandParameter(parent, EcorePackage.eINSTANCE.getEPackage_EClassifiers(), newElement);
- cmd.append(domain.createCommand(AddCommand.class, param));
- } else if(parent instanceof FacetSet && newElement instanceof FacetSet) {
- CommandParameter param = new CommandParameter(parent, EcorePackage.eINSTANCE.getEPackage_ESubpackages(), newElement);
- cmd.append(domain.createCommand(AddCommand.class, param));
- }
- final Collection<ModelQuery> unsavedQueries = getAllUnsavedQueries(newElement);
- if(unsavedQueries.size() != 0) {
- CommandParameter param = new CommandParameter(this.sourceQuerySet, QueryPackage.eINSTANCE.getModelQuerySet_Queries(), unsavedQueries);
- cmd.append(domain.createCommand(AddCommand.class, param));
- }
- } else {
- //we do nothing, this element we be added in the same time as its parent
- }
- }
- return cmd;
- }
-
- private Command getDestroyElementCommand() {
- final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
- return cmd;
- }
-
- private Command getMoveElementCommand() {
- final CompoundCommand cmd = new CompoundCommand("Rename Element Command");
- return cmd;
- }
-
-
- public static Collection<ModelQuery> getAllUnsavedQueries(final EObject object) {
- final Collection<ModelQuery> queries = new ArrayList<ModelQuery>();
- if(object instanceof StereotypePropertyElement) {
- final ModelQuery setQuery = ((StereotypePropertyElement)object).getSetQuery();
- if(setQuery.eResource() == null) {
- queries.add(setQuery);
- }
- final ModelQuery getQuery = ((StereotypePropertyElement)object).getValueQuery();
- if(getQuery.eResource() == null) {
- queries.add(getQuery);
- }
- } else if(object instanceof StereotypeFacet) {
- final ModelQuery conditionQuery = ((StereotypeFacet)object).getConditionQuery();
- if(conditionQuery.eResource() == null) {
- queries.add(conditionQuery);
- }
- for(final StereotypePropertyElement feature : ((StereotypeFacet)object).getStereotypePropertyElements()) {
- queries.addAll(getAllUnsavedQueries(feature));
- }
- } else if(object instanceof ProfileFacetSet) {
- for(final StereotypeFacet steFacet : ((ProfileFacetSet)object).getStereotypeFacets()) {
- queries.addAll(getAllUnsavedQueries(steFacet));
- }
- for(final ProfileFacetSet profileFacetSet : ((ProfileFacetSet)object).getSubProfileFacetSet()) {
- queries.addAll(getAllUnsavedQueries(profileFacetSet));
- }
- }
- return queries;
- }
-
-
-
-
-}
diff --git a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java b/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java
deleted file mode 100644
index 8fbf0fd4916..00000000000
--- a/deprecated/org.eclipse.papyrus.uml.profilefacet/src/org/eclipse/papyrus/uml/profilefacet/utils/StereotypePropertyUtils.java
+++ /dev/null
@@ -1,170 +0,0 @@
-/*****************************************************************************
- * Copyright (c) 2012 CEA LIST.
- *
- *
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
- *
- *****************************************************************************/
-package org.eclipse.papyrus.uml.profilefacet.utils;
-
-import java.util.Collection;
-import java.util.List;
-
-import org.eclipse.emf.ecore.EObject;
-import org.eclipse.emf.ecore.EStructuralFeature;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypeFacet;
-import org.eclipse.papyrus.uml.profilefacet.metamodel.profilefacet.StereotypePropertyElement;
-import org.eclipse.papyrus.uml.tools.utils.NameResolutionUtils;
-import org.eclipse.papyrus.uml.tools.utils.NamedElementUtil;
-import org.eclipse.papyrus.uml.tools.utils.StereotypeUtil;
-import org.eclipse.uml2.uml.Element;
-import org.eclipse.uml2.uml.NamedElement;
-import org.eclipse.uml2.uml.Namespace;
-import org.eclipse.uml2.uml.Profile;
-import org.eclipse.uml2.uml.Property;
-import org.eclipse.uml2.uml.Stereotype;
-import org.eclipse.uml2.uml.UMLPackage;
-
-/**
- *
- * This class provides methods to found the real Property represented by a {@link StereotypePropertyElement}
- *
- */
-public class StereotypePropertyUtils {
-
-
- private StereotypePropertyUtils() {
- //to prevent instanciation
- }
-
- /**
- *
- * @param tableContext
- * the context of the table
- * @param el
- * a stereotype property element
- * @return
- * the property represented by the {@link StereotypePropertyElement} or <code>null</code> if not found
- */
- public static final Property findRealStereotypeProperty(final Namespace namespace, final StereotypePropertyElement el) {
- final String propertyQualifiedName = el.getPropertyQualifiedName();
- for(final Profile profile : namespace.getNearestPackage().getAllAppliedProfiles()) {
- final List<NamedElement> properties = NameResolutionUtils.getNamedElements(propertyQualifiedName, profile, UMLPackage.eINSTANCE.getProperty());
- if(properties.size() == 1) {
- return (Property)properties.get(0);
- }
- }
- return null;
- }
-
- /**
- *
- * @param stereotypedElement
- * a stereotyped element
- * @param el
- * a representation of the stereotype property
- * @return
- * the feature represented by the {@link StereotypePropertyElement} or <code>null</code> if not found
- */
- public static final EStructuralFeature getEStructuralFeature(final Element stereotypedElement, final StereotypePropertyElement el) {
- final EObject stereotypeApplication = getStereotypeApplication(stereotypedElement, el);
- if(stereotypeApplication != null) {
- final String propertyQN = el.getPropertyQualifiedName();
- final String propertyName = NamedElementUtil.getNameFromQualifiedName(propertyQN);
- return stereotypeApplication.eClass().getEStructuralFeature(propertyName);
- }
- return null;
- }
-
- /**
- *
- * @param stereotypedElement
- * a stereotyped element
- * @param el
- * a feature representing a stereotype property
- * @return
- * the steretoype application required by the stereotype property or <code>null</code> if not found
- */
- public static final EObject getStereotypeApplication(final Element stereotypedElement, final StereotypePropertyElement el) {
- return getStereotypeApplication(stereotypedElement, (StereotypeFacet)el.eContainer());
- }
-
- /**
- *
- * @param stereotypedElement
- * a stereotyped element
- * @param facet
- * a facet
- * @return
- * the stereotype application represented by the facet or <code>null</code> if not found
- */
- public static final EObject getStereotypeApplication(final Element stereotypedElement, final StereotypeFacet facet) {
- final String steQN = facet.getStereotypeQualifiedName();
- final Stereotype ste = getAppliedStereotype(stereotypedElement, steQN);
- if(ste != null) {
- return stereotypedElement.getStereotypeApplication(ste);
- }
- return null;
- }
-
- /**
- *
- * @param el
- * an element
- * @param stereotypeQN
- * a stereotype qualified name
- * @return
- * the stereotype represented by the qualified name or a stereotype which inherits of the stereotype identified by its qualifiedname or
- * <code>null</code> if not found
- */
- public static final Stereotype getAppliedStereotype(final Element el, final String stereotypeQN) {
- final Stereotype appliedStereotype = el.getAppliedStereotype(stereotypeQN);
- if(appliedStereotype != null) {
- return appliedStereotype;
- } else if(appliedStereotype == null) {//the property can comes from inheritance...
- for(Stereotype appliedSte : el.getAppliedStereotypes()) {
- final Collection<Stereotype> superClasses = StereotypeUtil.getAllSuperStereotypes(appliedSte);
- for(final Stereotype current : superClasses) {
- if(current.getQualifiedName().equals(stereotypeQN)) {
- return appliedSte;
- }
- }
- }
- }
- return null;
- }
-
- /**
- *
- * @param el
- * an element
- * @param facet
- * the facet representing a stereotype
- * @return
- * the stereotype represented by the facet or a sub-stereotype which inherits of the stereotype represented by a facet or
- * <code>null</code> if not found
- */
- public static final Stereotype getAppliedStereotype(final Element el, final StereotypeFacet facet) {
- return getAppliedStereotype(el, facet.getStereotypeQualifiedName());
- }
-
- /**
- *
- * @param el
- * an element
- * @param facetElement
- * a facet element which represents a property of a stereotype
- * @return
- * the stereotype required by the facet element or a sub-stereotype which inherits of the stereotype required by the facetElement or
- * <code>null</code> if not found
- */
- public static final Stereotype getAppliedStereotype(final Element el, final StereotypePropertyElement facetElement) {
- return getAppliedStereotype(el, (StereotypeFacet)facetElement.eContainer());
- }
-}

Back to the top